Skip to content

Commit 924dd47

Browse files
committed
Auto merge of #49479 - nox:merge-funcs, r=<try>
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. For those wondering, [here are the docs from LLVM about this pass](http://llvm.org/docs/MergeFunctions.html).
2 parents f9ae5bc + f8fbd8c commit 924dd47

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

.travis.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ matrix:
1313
include:
1414
# Images used in testing PR and try-build should be run first.
1515
- env: IMAGE=x86_64-gnu-llvm-3.9 RUST_BACKTRACE=1
16-
if: type = pull_request OR branch = auto
16+
if: type = disabled
1717

1818
- env: IMAGE=dist-x86_64-linux DEPLOY=1
19-
if: branch = try OR branch = auto
19+
if: type = disabled
2020

2121
# "alternate" deployments, these are "nightlies" but have LLVM assertions
2222
# turned on, they're deployed to a different location primarily for
2323
# additional testing.
2424
- env: IMAGE=dist-x86_64-linux DEPLOY_ALT=1 CI_JOB_NAME=dist-x86_64-linux-alt
25-
if: branch = try OR branch = auto
25+
if: type = disabled
2626

2727
- env: >
2828
RUST_CHECK_TARGET=dist
@@ -112,8 +112,8 @@ matrix:
112112
if: branch = auto
113113
- env: IMAGE=armhf-gnu
114114
if: branch = auto
115-
- env: IMAGE=dist-various-1 DEPLOY=1
116-
if: branch = auto
115+
- env: IMAGE=dist-various-1 DEPLOY_ALT=1
116+
if: branch = try
117117
- env: IMAGE=dist-various-2 DEPLOY=1
118118
if: branch = auto
119119
- env: IMAGE=dist-aarch64-linux DEPLOY=1
@@ -177,7 +177,7 @@ matrix:
177177
- env: IMAGE=x86_64-gnu-distcheck
178178
if: branch = auto
179179
- env: IMAGE=mingw-check
180-
if: type = pull_request OR branch = auto
180+
if: type = disabled
181181

182182
- stage: publish toolstate
183183
if: branch = master AND type = push

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)