We fail to produce bit-to-bit matching stage2 and stage3 compiler in PGO bootstrap build. The reason is because LoopBlockSet is of SmallPtrSet type whose iterating order depends on the pointer value.
This patch fixes this issue.
Differential D26634
Make block placement determinisatic xur on Nov 14 2016, 1:39 PM. Authored by
Details We fail to produce bit-to-bit matching stage2 and stage3 compiler in PGO bootstrap build. The reason is because LoopBlockSet is of SmallPtrSet type whose iterating order depends on the pointer value. This patch fixes this issue.
Diff Detail
Event Timeline
Comment Actions Note that SetVector::remove is O(n) whereas SmallPtrSet::erase was O(1). I guess it doesn't matter too much, land this now to make codegen deterministic again. If perf issues arise we can come up with a more clever way (e.g. sorting by block number before iterating over the set). |