llvm-project/llvm/test
Guozhi Wei 62d6414465 [TargetTransformInfo] Add a new public interface getInstructionCost
Current TargetTransformInfo can support throughput cost model and code size model, but sometimes we also need instruction latency cost model in different optimizations. Hal suggested we need a single public interface to query the different cost of an instruction. So I proposed following interface:

  enum TargetCostKind {
    TCK_RecipThroughput, ///< Reciprocal throughput.
    TCK_Latency,         ///< The latency of instruction.
    TCK_CodeSize         ///< Instruction code size.
  };

  int getInstructionCost(const Instruction *I, enum TargetCostKind kind) const;

All clients should mainly use this function to query the cost of an instruction, parameter <kind> specifies the desired cost model.

This patch also provides a simple default implementation of getInstructionLatency.

The default getInstructionLatency provides latency numbers for only small number of instruction classes, those latency numbers are only reasonable for modern OOO processors. It can be extended in following ways:

   Add more detail into this function.
   Add getXXXLatency function and call it from here.
   Implement target specific getInstructionLatency function.

Differential Revision: https://reviews.llvm.org/D37170

llvm-svn: 312832
2017-09-08 22:29:17 +00:00
..
Analysis [TargetTransformInfo] Add a new public interface getInstructionCost 2017-09-08 22:29:17 +00:00
Assembler Parse and print DIExpressions inline to ease IR and MIR testing 2017-08-23 20:31:27 +00:00
Bindings [llvm] Get rid of "%T" expansions 2017-08-15 20:29:24 +00:00
Bitcode Object: Downgrade invalid weak externals from an assert fail to an llvm::Error when creating an irsymtab. 2017-09-07 01:33:52 +00:00
BugPoint
CodeGen AMDGPU: Recompute scc liveness 2017-09-08 18:51:26 +00:00
DebugInfo Migrate llvm-symbolizer tests to not use %T 2017-09-08 21:10:01 +00:00
DllTool [llvm-dlltool] Fix creating stdcall/fastcall import libraries for i386 2017-08-16 05:18:36 +00:00
Examples
ExecutionEngine [AsmParser] Recommit: Hash is not a comment on some targets 2017-08-21 09:58:37 +00:00
Feature Add ‘llvm.experimental.constrained.fma‘ Intrinsic. 2017-08-24 04:18:24 +00:00
FileCheck
Instrumentation [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer 2017-08-30 22:49:31 +00:00
Integer
JitListener
LTO Canonicalize the representation of empty an expression in DIGlobalVariableExpression 2017-08-30 18:06:51 +00:00
LibDriver [llvm] Get rid of "%T" expansions 2017-08-15 20:29:24 +00:00
Linker Canonicalize the representation of empty an expression in DIGlobalVariableExpression 2017-08-30 18:06:51 +00:00
MC [WebAssembly] Only treat imports/exports as symbols when reading relocatable object files 2017-09-06 22:05:41 +00:00
Object Use the section name if a STT_SECTION symbol has empty name. 2017-09-06 00:57:53 +00:00
ObjectYAML [WebAssembly] Update relocation names to match spec 2017-09-01 17:32:01 +00:00
Other revert failing test 2017-08-19 12:24:41 +00:00
SafepointIRVerifier
SymbolRewriter
TableGen Address r311914 review comments 2017-08-28 20:11:27 +00:00
ThinLTO/X86 ModuleSummaryAnalysis: Correctly handle all function operand references. 2017-09-07 05:35:35 +00:00
Transforms [SLP] Support for horizontal min/max reduction. 2017-09-08 13:49:36 +00:00
Unit
Verifier Revert "Revert r312139 "Verifier: Verify the correctness of fragment expressions attached to globals."" 2017-08-31 00:07:33 +00:00
YAMLParser
tools [llvm-cov] Use portable output redirection in a test 2017-09-08 20:24:23 +00:00
.clang-format
CMakeLists.txt Add llvm-isel-fuzzer to test/CMakeLists.txt 2017-09-03 03:00:27 +00:00
TestRunner.sh
lit.cfg llvm-isel-fuzzer: Add some basic tests 2017-09-03 00:37:39 +00:00
lit.site.cfg.in Correctly enable the llvm-mt tests, now that build flags changed. 2017-07-26 16:35:44 +00:00