1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/include/llvm
Andrea Di Biagio 7ca0db442c [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

llvm-svn: 228923
2015-02-12 14:17:24 +00:00
..
ADT BitVector: Remove manual bit width dispatch, this is handled by templates 2015-02-12 14:02:58 +00:00
Analysis [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
AsmParser Pass a MemoryBufferRef when we can avoid taking ownership. 2014-08-26 21:49:01 +00:00
Bitcode IR: Assembly and bitcode for GenericDebugNode 2015-02-03 21:54:14 +00:00
CodeGen [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
Config Define HAVE_DIA_SDK on Windows when DIA is present. 2015-02-10 05:04:25 +00:00
DebugInfo Rewrite llvm-pdbdump in terms of LLVMDebugInfoPDB. 2015-02-10 22:43:25 +00:00
ExecutionEngine [Orc] Fix a bug in the LazyEmittingLayer - capture names by value (as 2015-02-10 07:35:39 +00:00
IR Generalize DIBuilder's createReplaceableForwardDecl() to a more flexible 2015-02-11 17:45:05 +00:00
IRReader Pass a MemoryBufferRef when we can avoid taking ownership. 2014-08-26 21:49:01 +00:00
LineEditor [C++11] Replace OwningPtr with std::unique_ptr in places where it doesn't break the API. 2014-04-21 09:34:48 +00:00
Linker Use the DiagnosticHandler to print diagnostics when reading bitcode. 2015-01-10 00:07:30 +00:00
LTO [LTO API] split lto_codegen_compile to lto_codegen_optimize and 2015-02-03 18:39:15 +00:00
MC [MC] Remove various unused MCAsmInfo parameters. 2015-02-05 00:58:51 +00:00
Object dd the option, -link-opt-hints to llvm-objdump used with -macho to print the 2015-01-27 21:28:24 +00:00
Option Add an overload of getLastArgNoClaim taking two OptSpecifiers. 2014-09-12 19:42:53 +00:00
ProfileData InstrProf: Make CounterMappingRegions less confusing to construct 2015-02-03 23:59:33 +00:00
Support MathExtras: Parametrize count(Trailing|Leading)Zeros on the type size. 2015-02-12 13:47:29 +00:00
TableGen Make MultiClass::DefPrototypes own their Records to fix memory leaks. 2014-12-11 05:25:33 +00:00
Target [CodeGen] Add hook/combine to form vector extloads, enabled on X86. 2015-02-05 18:31:02 +00:00
Transforms Add missing include. 2015-02-04 18:16:53 +00:00
CMakeLists.txt Remove llvm_headers_do_not_build for the benefit of XCode and Visual Studio users. 2014-08-14 00:51:47 +00:00
InitializePasses.h Introduce print-memderefs to test isDereferenceablePointer 2015-02-06 01:46:42 +00:00
LinkAllIR.h [cleanup] Move the Dominators.h and Verifier.h headers into the IR 2014-01-13 09:26:24 +00:00
LinkAllPasses.h Introduce print-memderefs to test isDereferenceablePointer 2015-02-06 01:46:42 +00:00
module.modulemap Bring the modules buildbot back to life after r226940. 2015-01-24 01:55:52 +00:00
module.modulemap.build [modules] Add module maps for LLVM. These are not quite ready for prime-time 2014-05-21 02:46:14 +00:00
Pass.h Revert "[PM] Add pass run listeners to the pass manager." 2014-05-15 17:49:20 +00:00
PassAnalysisSupport.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
PassInfo.h Remove pimpl class from PassRegistry. 2014-06-12 16:06:51 +00:00
PassManager.h
PassRegistry.h [PM] Remove an unused and rather expensive mapping from an analysis 2014-10-06 00:30:59 +00:00
PassSupport.h Defining a new API for debug options that doesn't rely on static global cl::opts. 2014-10-15 21:54:35 +00:00