-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Similar to the __ornext() compiler hint that instructs RATools to use OrNext rather than Alt groups, it would be helpful to have a __nooptimize() directive that would disable RATools' optimization for any code inside. There are a lot of ways to build useful structures (such as Measured and Trigger in separate alts, or a useless Measured in an Alt with an always_true alt to provide a tracker) that are optimized out (correctly) by RATools, but still have useful functionality.
Core:
checkpoint hit
challenge resets
Trigger win condition
Alt 1:
Measured data
Alt 2:
Trigger 0 = 1
A structure like the above allows you to have both a Measured and a Trigger on the same achievement, but unfortunately would be almost entirely optimized out. Currently, as far as I know, the only way to add these sorts of helpful-but-redundant substructures to an RATools-built set is to add the redundant features manually after the fact, which makes it complicated for maintenance. If there is another way that I'm unaware of, please let me know.
I'm willing to believe this request might not really be compatible with the way RATools works and therefore might not be worth implementing.
In writing this, I realized that most of the cases that I would want a __nooptimize() directive are situations in which a Measured or a Trigger is getting removed, as those are the only situations that the player would be impacted by. Maybe it would be worth considering an option that forces those specifically to not be optimized out, maybe in the measured() or trigger_when() functions themselves.