diff options
author | Paul Robinson <paul_robinson@playstation.sony.com> | 2014-03-31 17:43:35 +0000 |
---|---|---|
committer | Paul Robinson <paul_robinson@playstation.sony.com> | 2014-03-31 17:43:35 +0000 |
commit | 5fa58a5b232be0b8261041a651ed1be3ae8d3848 (patch) | |
tree | d0a611cc58c2a47e14b47d6f709b765379bd4ac8 /lib/CodeGen/BranchFolding.cpp | |
parent | b6f3f9ba45d33bd52ececdda05f018c621fa9c6a (diff) | |
download | llvm-5fa58a5b232be0b8261041a651ed1be3ae8d3848.tar.gz llvm-5fa58a5b232be0b8261041a651ed1be3ae8d3848.tar.bz2 llvm-5fa58a5b232be0b8261041a651ed1be3ae8d3848.tar.xz |
Disable each MachineFunctionPass for 'optnone' functions, unless that
pass normally runs at optimization level None, or is part of the
register allocation pipeline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205228 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/BranchFolding.cpp')
-rw-r--r-- | lib/CodeGen/BranchFolding.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/BranchFolding.cpp b/lib/CodeGen/BranchFolding.cpp index bf6d56ceac..b39777edf4 100644 --- a/lib/CodeGen/BranchFolding.cpp +++ b/lib/CodeGen/BranchFolding.cpp @@ -82,6 +82,9 @@ INITIALIZE_PASS(BranchFolderPass, "branch-folder", "Control Flow Optimizer", false, false) bool BranchFolderPass::runOnMachineFunction(MachineFunction &MF) { + if (skipOptnoneFunction(*MF.getFunction())) + return false; + TargetPassConfig *PassConfig = &getAnalysis<TargetPassConfig>(); // TailMerge can create jump into if branches that make CFG irreducible for // HW that requires structurized CFG. |