llvm-6502/include/llvm/Analysis
Andrea Di Biagio 44926033f6 [TTI] Teach the cost heuristic how to query TLI to check if a zext/trunc is 'free' for the target.
Now that SimplifyCFG uses TTI for the cost heuristic, we can teach BasicTTIImpl
how to query TLI in order to get a more accurate cost for truncates and
zero-extends.

Before this patch, the basic cost heuristic in TargetTransformInfoImplCRTPBase
would have conservatively returned a 'default' TCC_Basic for all zero-extends,
and TCC_Free for truncates on native types.

This patch improves the heuristic so that we query TLI (if available) to get
more accurate answers. If TLI is available, then methods 'isZExtFree' and
'isTruncateFree' can be used to check if a zext/trunc is free for the target.

Added more test cases to SimplifyCFG/X86/speculate-cttz-ctlz.ll.
With this change, SimplifyCFG is now able to speculate a 'cheap' cttz/ctlz
immediately followed by a free zext/trunc.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228923 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-12 14:17:24 +00:00
..
AliasAnalysis.h Sink store based on alias analysis 2014-12-15 14:09:53 +00:00
AliasSetTracker.h AliasSetTracker: UnknownInsts should contribute to the refcount 2014-11-19 09:41:05 +00:00
AssumptionCache.h [PM] Actually add the new pass manager support for the assumption cache. 2015-01-22 21:53:09 +00:00
BlockFrequencyInfo.h blockfreq: Remove unnecessary template parameters 2014-04-11 23:21:02 +00:00
BlockFrequencyInfoImpl.h Fix typo in comment 2014-10-08 23:30:45 +00:00
BranchProbabilityInfo.h [stack protector] Set edge weights for newly created basic blocks. 2014-12-01 04:27:03 +00:00
CallGraph.h Fix GraphTraits for "const CallGraphNode *" and "const CallGraph *" 2014-11-17 17:51:45 +00:00
CallGraphSCCPass.h [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-05 07:30:04 +00:00
CallPrinter.h Added -view-callgraph module pass. 2013-01-11 17:28:14 +00:00
CaptureTracking.h Match semantics of PointerMayBeCapturedBefore to its name by default 2014-07-21 21:30:22 +00:00
CFG.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 04:59:12 +00:00
CFGPrinter.h Tweak CFGPrinter to wrap very long names. 2014-08-20 17:38:12 +00:00
CGSCCPassManager.h [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
CodeMetrics.h [PM] Split the AssumptionTracker immutable pass into two separate APIs: 2015-01-04 12:03:27 +00:00
ConstantFolding.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-14 00:51:57 +00:00
ConstantsScanner.h [Modules] Move InstIterator out of the Support library, where it had no 2014-03-04 10:30:26 +00:00
DependenceAnalysis.h [DependenceAnalysis] Allow subscripts of different types 2014-11-16 16:52:44 +00:00
DominanceFrontier.h These functions are not actually defined for NDEBUG or !LLVM_DUMP_ENABLED, so guarding the declarations as well. NFC, silences MSVC warnings in release builds. 2014-10-24 15:16:39 +00:00
DominanceFrontierImpl.h Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool> 2014-11-19 07:49:26 +00:00
DomPrinter.h
DOTGraphTraitsPass.h Modernize raw_fd_ostream's constructor a bit. 2014-08-25 18:16:47 +00:00
InlineCost.h [multiversion] Thread a function argument through all the callers of the 2015-02-01 12:01:35 +00:00
InstructionSimplify.h [InstSimplify] Add SimplifyFPBinOp function. 2015-02-06 20:02:51 +00:00
Interval.h Remove copy ctors that did the same thing as the default one. 2014-03-11 11:32:49 +00:00
IntervalIterator.h Reduce double set lookups. NFC. 2014-10-10 15:32:50 +00:00
IntervalPartition.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 04:59:12 +00:00
IVUsers.h Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid needing to mention the size. 2014-08-21 05:55:13 +00:00
JumpInstrTableInfo.h [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
LazyCallGraph.h Revert r225854: [PM] Move the LazyCallGraph printing functionality to 2015-01-14 00:27:45 +00:00
LazyValueInfo.h remove function names from comments; NFC 2015-01-08 22:36:56 +00:00
LibCallAliasAnalysis.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 04:59:12 +00:00
LibCallSemantics.h Don't promote asynch EH invokes of nounwind functions to calls 2015-02-11 01:23:16 +00:00
Lint.h
Loads.h AA metadata refactoring (introduce AAMDNodes) 2014-07-24 12:16:19 +00:00
LoopAccessAnalysis.h [LV] Move addRuntimeCheck to LoopAccessAnalysis 2015-02-06 18:31:04 +00:00
LoopInfo.h [PM] Don't spend time making self moves no-ops. They're allowed to leave 2015-01-20 18:54:16 +00:00
LoopInfoImpl.h [PM] Now that LoopInfo isn't in the Pass type hierarchy, it is much 2015-01-18 01:25:51 +00:00
LoopIterator.h Remove unneeded #includes. 2013-02-09 13:29:10 +00:00
LoopPass.h Fix assertion in LICM doFinalization() 2014-09-24 16:48:31 +00:00
MemoryBuiltins.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 04:59:12 +00:00
MemoryDependenceAnalysis.h Pass QueryInst down through non-local dependency calculation 2015-01-26 18:39:52 +00:00
Passes.h Introduce print-memderefs to test isDereferenceablePointer 2015-02-06 01:46:42 +00:00
PHITransAddr.h [PM] Split the AssumptionTracker immutable pass into two separate APIs: 2015-01-04 12:03:27 +00:00
PostDominators.h Fix typos in comments, NFC 2014-08-29 21:53:01 +00:00
PtrUseVisitor.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 04:59:12 +00:00
RegionInfo.h These functions are not actually defined for NDEBUG or !LLVM_DUMP_ENABLED, so guarding the declarations as well. NFC, silences MSVC warnings in release builds. 2014-10-24 15:16:39 +00:00
RegionInfoImpl.h [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
RegionIterator.h Templatify RegionInfo so it works on MachineBasicBlocks 2014-07-19 18:29:29 +00:00
RegionPass.h [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-05 07:30:04 +00:00
RegionPrinter.h
ScalarEvolution.h Address post-commit review for rL228587: make it explicit that the 2015-02-09 19:39:00 +00:00
ScalarEvolutionExpander.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 04:59:12 +00:00
ScalarEvolutionExpressions.h [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
ScalarEvolutionNormalization.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
SparsePropagation.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 04:59:12 +00:00
TargetFolder.h Add CreatePointerBitCastOrAddrSpaceCast to IRBuilder and co. 2014-07-14 17:24:35 +00:00
TargetLibraryInfo.h [PM] Rework how the TargetLibraryInfo pass integrates with the new pass 2015-01-24 02:06:09 +00:00
TargetTransformInfo.h Use estimated number of optimized insns in unroll-threshold computation. 2015-02-06 20:20:40 +00:00
TargetTransformInfoImpl.h [TTI] Teach the cost heuristic how to query TLI to check if a zext/trunc is 'free' for the target. 2015-02-12 14:17:24 +00:00
Trace.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
ValueTracking.h Fold fcmp in cases where value is provably non-negative. By Arch Robison. 2015-01-28 08:03:58 +00:00