| Index: src/IceTargetLoweringX8632.cpp
|
| diff --git a/src/IceTargetLoweringX8632.cpp b/src/IceTargetLoweringX8632.cpp
|
| index 55a0bfc638789fa9a2d49f03783d79762f9b0f5f..5fbc0f3a7e4c497ad1cc09b5fc9d48a09d6b2e46 100644
|
| --- a/src/IceTargetLoweringX8632.cpp
|
| +++ b/src/IceTargetLoweringX8632.cpp
|
| @@ -239,6 +239,14 @@ void TargetDataX8632::emitConstantPool(GlobalContext *Ctx) {
|
| Str << "\t.section\t.rodata.cst" << Align << ",\"aM\",@progbits," << Align
|
| << "\n";
|
| Str << "\t.align\t" << Align << "\n";
|
| +
|
| + // If reorder-pooled-constants option is set to true, we need to shuffle the
|
| + // constant pool before emitting it.
|
| + if (Ctx->getFlags().shouldReorderPooledConstants())
|
| + RandomShuffle(Pool.begin(), Pool.end(), [Ctx](uint64_t N) {
|
| + return (uint32_t)Ctx->getRNG().next(N);
|
| + });
|
| +
|
| for (Constant *C : Pool) {
|
| if (!C->getShouldBePooled())
|
| continue;
|
|
|