| Index: src/IceTargetLoweringX8632.cpp
|
| diff --git a/src/IceTargetLoweringX8632.cpp b/src/IceTargetLoweringX8632.cpp
|
| index 4570d9f50b485cbf03e4ebbca8e7f8b6d0795532..6b59ef5d9a408b56bafb2286541639e7e0ce24bf 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;
|
|
|