]> granicus.if.org Git - llvm/commitdiff
ShrinkWrap: Add skipFunction() call
authorMatthias Braun <matze@braunis.de>
Tue, 16 May 2017 18:43:30 +0000 (18:43 +0000)
committerMatthias Braun <matze@braunis.de>
Tue, 16 May 2017 18:43:30 +0000 (18:43 +0000)
ShrinkWrapping is a performance optimization that can safely be skipped,
so we can add `if (!skipFunction()) return;`

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303197 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/ShrinkWrap.cpp

index e9df915bad14513d7bd1a8be78d93a4a89d9c78a..2638702da152e5bd01b6bfc2ed0201c330eb2c11 100644 (file)
@@ -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');