Modifies the selection DAG scheduler to randomize instruction selection to introduce diversity with the goal of increasing security against most return-oriented programming attacks.
Command line options:
-sched-randomize // Enable the schedule randomizer. -sched-randomize-percentage=X // X% of instructions are scheduled randomly (default: 50%, requires -sched-randomize).
This is the llvm part of the patch.
clang part: D3395
Same as other review: cl::cat, and check that this isn't over 100%.
Actually why would you ever set scheduler randomization to less than 100%? IMO you should either randomize all-out, or not at all. Could you just drop the percentage from this change?