[PATCH] D83708: Remove TwoAddressInstructinoPass::sink3AddrInstruction.
James Y Knight via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 13 11:51:09 PDT 2020
jyknight created this revision.
jyknight added reviewers: craig.topper, nickdesaulniers, void.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
This function has a bug which will incorrectly reschedule instructions
after an INLINEASM_BR (which can branch). (The bug may also allow
scheduling past a throwing-CALL, I'm not certain.)
I could fix that bug, but, as the removed FIXME noted, attempting to
move instructions _before_ converting to 3-addr, so as to avoid
needing to make the conversion in the first place is a better
idea. And, in fact, the code to do such reodering was added to this
pass in 2011, via the addition of the function rescheduleMIBelowKill
- only a few months after the FIXME was added. That reschedule code
does not contain the same bug.
The removal of this funciton is not a no-op: in some cases
sink3AddrInstruction would move an instruction after converting it to
3-addr form, when rescheduleMIBelowKill would not move before
converison. However, this does not appear to be important: the
machine instruction scheduler can reorder the after-conversion
instructions, in any case.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D83708
Files:
llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
llvm/test/CodeGen/X86/callbr-asm-sink.ll
llvm/test/CodeGen/X86/masked-iv-unsafe.ll
llvm/test/CodeGen/X86/reverse_branches.ll
llvm/test/CodeGen/X86/rotate-extract.ll
llvm/test/CodeGen/X86/twoaddr-lea.ll
llvm/test/CodeGen/X86/twoaddr-pass-sink.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83708.277517.patch
Type: text/x-patch
Size: 15454 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200713/0290c6c1/attachment-0001.bin>
More information about the llvm-commits
mailing list