diff options
author | David Green <david.green@arm.com> | 2018-09-12 10:19:10 +0000 |
---|---|---|
committer | David Green <david.green@arm.com> | 2018-09-12 10:19:10 +0000 |
commit | e27e87cdcb0b4dd56806434bc31fabe8e24e9972 (patch) | |
tree | db23aeee10eeec3140c7a1b13e1f0450682703df /llvm/lib/CodeGen | |
parent | 10fb67728593478671d75403c6bf8683db60c9d3 (diff) | |
download | bcm5719-llvm-e27e87cdcb0b4dd56806434bc31fabe8e24e9972.tar.gz bcm5719-llvm-e27e87cdcb0b4dd56806434bc31fabe8e24e9972.zip |
[CGP] Ensure splitgep gives deterministic output
The output of splitLargeGEPOffsets does not appear to be deterministic because
of the way that we iterate over a DenseMap. I've changed it to a MapVector for
consistent output.
The test here isn't particularly great, only showing a consmetic difference in
output. The original reproducer is much larger but show a diffierence in
instruction ordering, leading to different codegen.
Differential Revision: https://reviews.llvm.org/D51851
llvm-svn: 342043
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index 2083869b032..cf1966f4677 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -278,7 +278,7 @@ class TypePromotionTransaction; /// Keep track of GEPs accessing the same data structures such as structs or /// arrays that are candidates to be split later because of their large /// size. - DenseMap< + MapVector< AssertingVH<Value>, SmallVector<std::pair<AssertingVH<GetElementPtrInst>, int64_t>, 32>> LargeOffsetGEPMap; |