1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00
Go to file
Andrea Di Biagio 0e53532aeb [llvm-mca][BtVer2] Teach how to identify dependency-breaking idioms.
This patch teaches llvm-mca how to identify dependency breaking instructions on
btver2.

An example of dependency breaking instructions is the zero-idiom XOR (example:
`XOR %eax, %eax`), which always generates zero regardless of the actual value of
the input register operands.
Dependency breaking instructions don't have to wait on their input register
operands before executing. This is because the computation is not dependent on
the inputs.

Not all dependency breaking idioms are also zero-latency instructions. For
example, `CMPEQ %xmm1, %xmm1` is independent on
the value of XMM1, and it generates a vector of all-ones.
That instruction is not eliminated at register renaming stage, and its opcode is
issued to a pipeline for execution. So, the latency is not zero. 

This patch adds a new method named isDependencyBreaking() to the MCInstrAnalysis
interface. That method takes as input an instruction (i.e. MCInst) and a
MCSubtargetInfo.
The default implementation of isDependencyBreaking() conservatively returns
false for all instructions. Targets may override the default behavior for
specific CPUs, and return a value which better matches the subtarget behavior.

In future, we should teach to Tablegen how to automatically generate the body of
isDependencyBreaking from scheduling predicate definitions. This would allow us
to expose the knowledge about dependency breaking instructions to the machine
schedulers (and, potentially, other codegen passes).

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

llvm-svn: 338372
2018-07-31 13:21:43 +00:00
bindings [LLVM-C] [OCaml] Remove LLVMAddBBVectorizePass 2018-05-28 16:58:10 +00:00
cmake [CMake] Followup for r337366: Only export LLVM_LINK_LLVM_DYLIB if it's set to ON 2018-07-27 10:57:51 +00:00
docs [llvm-mca][docs] Add instruction flow documentation. NFC. 2018-07-30 22:30:14 +00:00
examples [ORC] Update JITCompileCallbackManager to support multi-threaded code. 2018-05-30 01:57:45 +00:00
include [llvm-mca][BtVer2] Teach how to identify dependency-breaking idioms. 2018-07-31 13:21:43 +00:00
lib [llvm-mca][BtVer2] Teach how to identify dependency-breaking idioms. 2018-07-31 13:21:43 +00:00
projects [cmake] Support moving debuginfo-tests to llvm/projects 2017-12-12 17:06:08 +00:00
resources
runtimes Revert "[CMake] Pass Clang defaults to runtimes builds" 2018-07-13 20:01:55 +00:00
test [llvm-mca][BtVer2] Teach how to identify dependency-breaking idioms. 2018-07-31 13:21:43 +00:00
tools [llvm-mca][BtVer2] Teach how to identify dependency-breaking idioms. 2018-07-31 13:21:43 +00:00
unittests [VPlan] Introduce VPLoopInfo analysis. 2018-07-31 01:57:29 +00:00
utils Revert r338365: [X86] Improved sched models for X86 BT*rr instructions. 2018-07-31 13:00:51 +00:00
.arcconfig [llvm] Set up .arcconfig to point to Diffusion L repository 2018-01-12 15:37:41 +00:00
.clang-format
.clang-tidy
.gitattributes [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
.gitignore gitignore: Ignore .vs folder (VS2017 config files) 2017-04-08 00:16:58 +00:00
CMakeLists.txt Add PerfJITEventListener for perf profiling support. 2018-07-24 00:54:06 +00:00
CODE_OWNERS.TXT CODE_OWNERS: Take ownership of the MIPS backend 2018-06-21 09:59:44 +00:00
configure
CREDITS.TXT Update my information in the CREDITS file. 2018-06-15 20:02:11 +00:00
LICENSE.TXT Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm.spec.in
LLVMBuild.txt
README.txt Test commit: remove a blank line 2018-06-08 21:21:55 +00:00
RELEASE_TESTERS.TXT Remove myself from the release testers list. (NFC) 2018-06-20 21:25:50 +00:00

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.