mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-19 12:33:51 +00:00
Bitcode: Use std::stable_partition for reproducible builds
Caught by inspection while working on partitioning metadata. It's nice to produce the same bitcode if you run the compiler twice. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264381 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f206a2c034
commit
93e5944cd8
@ -472,8 +472,8 @@ void ValueEnumerator::OptimizeConstants(unsigned CstStart, unsigned CstEnd) {
|
||||
// Ensure that integer and vector of integer constants are at the start of the
|
||||
// constant pool. This is important so that GEP structure indices come before
|
||||
// gep constant exprs.
|
||||
std::partition(Values.begin()+CstStart, Values.begin()+CstEnd,
|
||||
isIntOrIntVectorValue);
|
||||
std::stable_partition(Values.begin() + CstStart, Values.begin() + CstEnd,
|
||||
isIntOrIntVectorValue);
|
||||
|
||||
// Rebuild the modified portion of ValueMap.
|
||||
for (; CstStart != CstEnd; ++CstStart)
|
||||
|
Loading…
x
Reference in New Issue
Block a user