[llvm] r303197 - ShrinkWrap: Add skipFunction() call
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Tue May 16 11:43:30 PDT 2017
Author: matze
Date: Tue May 16 13:43:30 2017
New Revision: 303197
URL: http://llvm.org/viewvc/llvm-project?rev=303197&view=rev
Log:
ShrinkWrap: Add skipFunction() call
ShrinkWrapping is a performance optimization that can safely be skipped,
so we can add `if (!skipFunction()) return;`
Modified:
llvm/trunk/lib/CodeGen/ShrinkWrap.cpp
Modified: llvm/trunk/lib/CodeGen/ShrinkWrap.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ShrinkWrap.cpp?rev=303197&r1=303196&r2=303197&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ShrinkWrap.cpp (original)
+++ llvm/trunk/lib/CodeGen/ShrinkWrap.cpp Tue May 16 13:43:30 2017
@@ -425,7 +425,7 @@ static bool isIrreducibleCFG(const Machi
}
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');
More information about the llvm-commits
mailing list