Subzero: Randomize register assignment.
Randomize the order that registers appear in the free list. Only
randomize fully "equivalent" registers to ensure no extra spills.
This adds the -randomize-regalloc option.
This is a continuation of https://codereview.chromium.org/456033003/ which Matt owns.
BUG= none
R=jfb@chromium.org
Review URL: https://codereview.chromium.org/807293003
diff --git a/src/IceRNG.h b/src/IceRNG.h
index 5f862a8..bb2ac45 100644
--- a/src/IceRNG.h
+++ b/src/IceRNG.h
@@ -42,7 +42,7 @@
operator=(const RandomNumberGeneratorWrapper &) = delete;
public:
- uint64_t next(uint64_t Max) { return RNG.next(Max); }
+ uint64_t operator()(uint64_t Max) { return RNG.next(Max); }
bool getTrueWithProbability(float Probability);
RandomNumberGeneratorWrapper(RandomNumberGenerator &RNG) : RNG(RNG) {}