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
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
CallPrinter.h
CaptureTracking.h
CFG.h
CFGPrinter.h
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
ConstantsScanner.h
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
IntervalIterator.h Reduce double set lookups. NFC. 2014-10-10 15:32:50 +00:00
IntervalPartition.h
IVUsers.h
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
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
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
LoopPass.h Fix assertion in LICM doFinalization() 2014-09-24 16:48:31 +00:00
MemoryBuiltins.h
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
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
RegionPass.h
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
ScalarEvolutionExpressions.h [cleanup] Re-sort all the #include lines in LLVM using 2015-01-14 11:23:27 +00:00
ScalarEvolutionNormalization.h
SparsePropagation.h
TargetFolder.h
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
ValueTracking.h Fold fcmp in cases where value is provably non-negative. By Arch Robison. 2015-01-28 08:03:58 +00:00