[PATCH] D22466: Avoid false dependencies of undef machine operands
Marina Yatsina via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 18 09:30:02 PDT 2016
myatsina created this revision.
myatsina added reviewers: atrick, danielcdh, mkuper, spatel.
myatsina added subscribers: llvm-commits, DavidKreitzer.
myatsina set the repository for this revision to rL LLVM.
This patch helps avoid false dependencies on undef registers by updating the machine instructions' undef operand to use a register that the instruction is truly dependent on, or use a register with the largest clearance.
Pseudo example:
loop:
xmm0 = ...
xmm1 = vcvtsi2sdl eax, xmm0<undef>
... = inst xmm0
jmp loop
In this example, selecting xmm0 as the undef register creates false dependency between loop iterations.
This false dependency cannot be solved by inserting an xor before vcvtsi2sdl because xmm0 is alive at the point of the vcvtsi2sdl instruction.
Selecting a different register instead of xmm0, especially a register that is not used in the loop, will eliminate this problem.
Repository:
rL LLVM
https://reviews.llvm.org/D22466
Files:
lib/CodeGen/ExecutionDepsFix.cpp
test/CodeGen/X86/break-false-dep.ll
test/CodeGen/X86/copy-propagation.ll
test/CodeGen/X86/half.ll
test/CodeGen/X86/vec_int_to_fp.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22466.64335.patch
Type: text/x-patch
Size: 43267 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160718/c15003ef/attachment-0001.bin>
More information about the llvm-commits
mailing list