Skip to content

Commit 1aa944d

Browse files
committed
Reenable the MergeFunctions pass
The crash that happened in #23566 doesn't happen anymore with the LLVM mergefunc pass enabled and it hugely reduces code size (for example it shaves off 10% of the final Servo executable). This patch reenables it.
1 parent b87070a commit 1aa944d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/rustllvm/PassWrapper.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,7 @@ extern "C" void LLVMRustConfigurePassManagerBuilder(
430430
LLVMPassManagerBuilderRef PMBR, LLVMRustCodeGenOptLevel OptLevel,
431431
bool MergeFunctions, bool SLPVectorize, bool LoopVectorize, bool PrepareForThinLTO,
432432
const char* PGOGenPath, const char* PGOUsePath) {
433-
// Ignore mergefunc for now as enabling it causes crashes.
434-
// unwrap(PMBR)->MergeFunctions = MergeFunctions;
433+
unwrap(PMBR)->MergeFunctions = MergeFunctions;
435434
unwrap(PMBR)->SLPVectorize = SLPVectorize;
436435
unwrap(PMBR)->OptLevel = fromRust(OptLevel);
437436
unwrap(PMBR)->LoopVectorize = LoopVectorize;

0 commit comments

Comments
 (0)