From 34eb467434a593e5a5218b9892b8692845e69069 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Tue, 16 May 2017 18:43:30 +0000 Subject: [PATCH] ShrinkWrap: Add skipFunction() call 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/ShrinkWrap.cpp b/lib/CodeGen/ShrinkWrap.cpp index e9df915bad1..2638702da15 100644 --- a/lib/CodeGen/ShrinkWrap.cpp +++ b/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'); -- 2.50.1