mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:43:36 +01:00
c19db3b1d5
registers. The goal of this patch is to improve the throughput analysis in llvm-mca for the case where instructions perform partial register writes. On x86, partial register writes are quite difficult to model, mainly because different processors tend to implement different register merging schemes in hardware. When the code contains partial register writes, the IPC (instructions per cycles) estimated by llvm-mca tends to diverge quite significantly from the observed IPC (using perf). Modern AMD processors (at least, from Bulldozer onwards) don't rename partial registers. Quoting Agner Fog's microarchitecture.pdf: " The processor always keeps the different parts of an integer register together. For example, AL and AH are not treated as independent by the out-of-order execution mechanism. An instruction that writes to part of a register will therefore have a false dependence on any previous write to the same register or any part of it." This patch is a first important step towards improving the analysis of partial register updates. It changes the semantic of RegisterFile descriptors in tablegen, and teaches llvm-mca how to identify false dependences in the presence of partial register writes (for more details: see the new code comments in include/Target/TargetSchedule.h - class RegisterFile). This patch doesn't address the case where a write to a part of a register is followed by a read from the whole register. On Intel chips, high8 registers (AH/BH/CH/DH)) can be stored in separate physical registers. However, a later (dirty) read of the full register (example: AX/EAX) triggers a merge uOp, which adds extra latency (and potentially affects the pipe usage). This is a very interesting article on the subject with a very informative answer from Peter Cordes: https://stackoverflow.com/questions/45660139/how-exactly-do-partial-registers-on-haswell-skylake-perform-writing-al-seems-to In future, the definition of RegisterFile can be extended with extra information that may be used to identify delays caused by merge opcodes triggered by a dirty read of a partial write. Differential Revision: https://reviews.llvm.org/D49196 llvm-svn: 337123 |
||
---|---|---|
.. | ||
bugpoint | ||
bugpoint-passes | ||
dsymutil | ||
gold | ||
llc | ||
lli | ||
llvm-ar | ||
llvm-as | ||
llvm-as-fuzzer | ||
llvm-bcanalyzer | ||
llvm-c-test | ||
llvm-cat | ||
llvm-cfi-verify | ||
llvm-config | ||
llvm-cov | ||
llvm-cvtres | ||
llvm-cxxdump | ||
llvm-cxxfilt | ||
llvm-demangle-fuzzer | ||
llvm-diff | ||
llvm-dis | ||
llvm-dwarfdump | ||
llvm-dwp | ||
llvm-exegesis | ||
llvm-extract | ||
llvm-go | ||
llvm-isel-fuzzer | ||
llvm-jitlistener | ||
llvm-link | ||
llvm-lto | ||
llvm-lto2 | ||
llvm-mc | ||
llvm-mc-assemble-fuzzer | ||
llvm-mc-disassemble-fuzzer | ||
llvm-mca | ||
llvm-modextract | ||
llvm-mt | ||
llvm-nm | ||
llvm-objcopy | ||
llvm-objdump | ||
llvm-opt-fuzzer | ||
llvm-opt-report | ||
llvm-pdbutil | ||
llvm-profdata | ||
llvm-rc | ||
llvm-readobj | ||
llvm-rtdyld | ||
llvm-shlib | ||
llvm-size | ||
llvm-special-case-list-fuzzer | ||
llvm-split | ||
llvm-stress | ||
llvm-strings | ||
llvm-symbolizer | ||
llvm-xray | ||
lto | ||
msbuild | ||
obj2yaml | ||
opt | ||
opt-viewer | ||
sancov | ||
sanstats | ||
verify-uselistorder | ||
xcode-toolchain | ||
yaml2obj | ||
CMakeLists.txt | ||
LLVMBuild.txt |