summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-05-16 18:43:30 +0000
committerMatthias Braun <matze@braunis.de>2017-05-16 18:43:30 +0000
commitd625bedb405b32e669566c1a2eceeddfc2ba2f5e (patch)
treecc06d44bf1d943fe8c1f1efc24868d29510d9194 /llvm
parent56a08b40d26d2b0296ae9c4480daf2c224ffb345 (diff)
downloadbcm5719-llvm-d625bedb405b32e669566c1a2eceeddfc2ba2f5e.tar.gz
bcm5719-llvm-d625bedb405b32e669566c1a2eceeddfc2ba2f5e.zip
ShrinkWrap: Add skipFunction() call
ShrinkWrapping is a performance optimization that can safely be skipped, so we can add `if (!skipFunction()) return;` llvm-svn: 303197
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/CodeGen/ShrinkWrap.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/ShrinkWrap.cpp b/llvm/lib/CodeGen/ShrinkWrap.cpp
index e9df915bad1..2638702da15 100644
--- a/llvm/lib/CodeGen/ShrinkWrap.cpp
+++ b/llvm/lib/CodeGen/ShrinkWrap.cpp
@@ -425,7 +425,7 @@ static bool isIrreducibleCFG(const MachineFunction &MF,
}
bool ShrinkWrap::runOnMachineFunction(MachineFunction &MF) {
- if (MF.empty() || !isShrinkWrapEnabled(MF))
+ if (skipFunction(*MF.getFunction()) || MF.empty() || !isShrinkWrapEnabled(MF))
return false;
DEBUG(dbgs() << "**** Analysing " << MF.getName() << '\n');
OpenPOWER on IntegriCloud