[PATCH] D94691: [ARM] Don't run the block placement pass at O0
Sam Tebbs via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 15 06:00:03 PST 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5e4480b6c0f0: [ARM] Don't run the block placement pass at O0 (authored by samtebbs).
Changed prior to commit:
https://reviews.llvm.org/D94691?vs=316671&id=316922#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94691/new/
https://reviews.llvm.org/D94691
Files:
llvm/lib/Target/ARM/ARMBlockPlacement.cpp
llvm/lib/Target/ARM/ARMTargetMachine.cpp
Index: llvm/lib/Target/ARM/ARMTargetMachine.cpp
===================================================================
--- llvm/lib/Target/ARM/ARMTargetMachine.cpp
+++ llvm/lib/Target/ARM/ARMTargetMachine.cpp
@@ -553,11 +553,11 @@
return MF.getSubtarget<ARMSubtarget>().isThumb2();
}));
- addPass(createARMBlockPlacementPass());
-
- // Don't optimize barriers at -O0.
- if (getOptLevel() != CodeGenOpt::None)
+ // Don't optimize barriers or block placement at -O0.
+ if (getOptLevel() != CodeGenOpt::None) {
+ addPass(createARMBlockPlacementPass());
addPass(createARMOptimizeBarriersPass());
+ }
}
void ARMPassConfig::addPreEmitPass2() {
Index: llvm/lib/Target/ARM/ARMBlockPlacement.cpp
===================================================================
--- llvm/lib/Target/ARM/ARMBlockPlacement.cpp
+++ llvm/lib/Target/ARM/ARMBlockPlacement.cpp
@@ -58,6 +58,8 @@
false)
bool ARMBlockPlacement::runOnMachineFunction(MachineFunction &MF) {
+ if (skipFunction(MF.getFunction()))
+ return false;
const ARMSubtarget &ST = static_cast<const ARMSubtarget &>(MF.getSubtarget());
if (!ST.hasLOB())
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94691.316922.patch
Type: text/x-patch
Size: 1167 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210115/f6136a3b/attachment.bin>
More information about the llvm-commits
mailing list