diff options
author | Alexandros Lamprineas <alexandros.lamprineas@arm.com> | 2018-12-17 10:45:43 +0000 |
---|---|---|
committer | Alexandros Lamprineas <alexandros.lamprineas@arm.com> | 2018-12-17 10:45:43 +0000 |
commit | 490ae11717b8da8c50a6d73e6c392df8dfd28553 (patch) | |
tree | 7c97bde49276f140fee7fcce3698eb464c6922d4 /llvm/lib/Target/AArch64/AArch64TargetMachine.cpp | |
parent | 6ece0ad4292b12962bf98fce5610664108a0023c (diff) | |
download | bcm5719-llvm-490ae11717b8da8c50a6d73e6c392df8dfd28553.tar.gz bcm5719-llvm-490ae11717b8da8c50a6d73e6c392df8dfd28553.zip |
[AArch64] Re-run load/store optimizer after aggressive tail duplication
The Load/Store Optimizer runs before Machine Block Placement. At O3 the
Tail Duplication Threshold is set to 4 instructions and this can create
new opportunities for the Load/Store Optimizer. It seems worthwhile to
run it once again.
llvm-svn: 349338
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64TargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64TargetMachine.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp index d5e24708ece..32c853483e3 100644 --- a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp +++ b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp @@ -556,6 +556,12 @@ void AArch64PassConfig::addPreSched2() { } void AArch64PassConfig::addPreEmitPass() { + // Machine Block Placement might have created new opportunities when run + // at O3, where the Tail Duplication Threshold is set to 4 instructions. + // Run the load/store optimizer once more. + if (TM->getOptLevel() >= CodeGenOpt::Aggressive && EnableLoadStoreOpt) + addPass(createAArch64LoadStoreOptimizationPass()); + if (EnableA53Fix835769) addPass(createAArch64A53Fix835769()); // Relax conditional branch instructions if they're otherwise out of |