[PATCH] D12620: Fix for bz24500: Avoid non-deterministic code generation triggered by the x86 call frame optimization

David Kreitzer via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 3 17:44:16 PDT 2015


DavidKreitzer created this revision.
DavidKreitzer added reviewers: rnk, mkuper.
DavidKreitzer added a subscriber: llvm-commits.

The root cause of the problem in bz24500 is that the x86 call frame optimization uses iteration over a DenseMap with pointer keys to determine the order in which calls are optimized. The immediate effect is a non-deterministic ordering in the virtual register use-def lists. Ultimately, the different list order results in different behavior in the register allocator.

The fix is to change the DenseMap structure that is currently used to hold the calls to be optimized into a SmallVector, which serves its purpose equally well or better but provides a deterministic iteration order.


http://reviews.llvm.org/D12620

Files:
  X86CallFrameOptimization.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12620.33994.patch
Type: text/x-patch
Size: 5388 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150904/026e32d8/attachment.bin>


More information about the llvm-commits mailing list