llvm/lib/Transforms/InstCombine
Matthias Braun e152c1527d InstCombine: Restrict computeKnownBits() on all Values to OptLevel > 2
As part of r251146 InstCombine was extended to call computeKnownBits on
every value in the function to determine whether it happens to be
constant. This increases typical compiletime by 1-3% (5% in irgen+opt
time) in my measurements. On the other hand this case did not trigger
once in the whole llvm-testsuite.

This patch introduces the notion of ExpensiveCombines which are only
enabled for OptLevel > 2. I removed the check in InstructionSimplify as
that is called from various places where the OptLevel is not known but
given the rarity of the situation I think a check in InstCombine is
enough.

Differential Revision: http://reviews.llvm.org/D16835

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263047 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-09 18:47:11 +00:00
..
CMakeLists.txt Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
InstCombineAddSub.cpp Remove uses of builtin comma operator. 2016-02-18 22:09:30 +00:00
InstCombineAndOrXor.cpp [InstCombine] transform bitcasted bitwise logic ops with constants (PR26702) 2016-03-03 19:19:04 +00:00
InstCombineCalls.cpp [x86, InstCombine] transform more x86 masked loads to LLVM intrinsics 2016-02-29 23:59:00 +00:00
InstCombineCasts.cpp Revert "[InstCombine] Combine A->B->A BitCast" 2016-03-08 07:09:46 +00:00
InstCombineCompares.cpp Remove uses of builtin comma operator. 2016-02-18 22:09:30 +00:00
InstCombineInternal.h InstCombine: Restrict computeKnownBits() on all Values to OptLevel > 2 2016-03-09 18:47:11 +00:00
InstCombineLoadStoreAlloca.cpp Explode store of arrays in instcombine 2016-03-02 22:36:45 +00:00
InstCombineMulDivRem.cpp Remove uses of builtin comma operator. 2016-02-18 22:09:30 +00:00
InstCombinePHI.cpp Fixed typo in r260530 2016-02-11 16:46:13 +00:00
InstCombineSelect.cpp function names start with a lowercase letter; NFC 2016-02-01 22:23:39 +00:00
InstCombineShifts.cpp function names start with a lowercase letter; NFC 2016-02-01 22:23:39 +00:00
InstCombineSimplifyDemanded.cpp function names start with a lowercase letter; NFC 2016-02-01 22:23:39 +00:00
InstCombineVectorOps.cpp Fix an issue where fast math flags were dropped during scalarization. 2016-03-01 19:35:52 +00:00
InstructionCombining.cpp InstCombine: Restrict computeKnownBits() on all Values to OptLevel > 2 2016-03-09 18:47:11 +00:00
LLVMBuild.txt Update libdeps since TLI was moved from Target to Analysis in r226078. 2015-01-15 05:21:00 +00:00