[PATCH] D37034: Insert IMPLICIT_DEFS for undef uses in tail merging

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 5 14:29:05 PDT 2017


MatzeB updated this revision to Diff 113913.
MatzeB added a comment.

Rework branchfolding code to behave like this:

- Make sure all the undef flags are merged
- Compute new live-ins to NewDest (but do not set them yet)
- Insert IMP_DEFS into NewDest predecessors where LiveOuts mismatch the new live-ins
- Set new live-in of NewDest
- For all other blocks with common tail:
  - Compute liveness at the position where we will cut the common tail and place the branch.
  - Insert IMP_DEFS as necessary where liveness mismatches live-ins of NewDest
  - Replace common tail with branch


Repository:
  rL LLVM

https://reviews.llvm.org/D37034

Files:
  include/llvm/CodeGen/LivePhysRegs.h
  lib/CodeGen/BranchFolding.cpp
  lib/CodeGen/BranchFolding.h
  lib/CodeGen/BranchRelaxation.cpp
  lib/CodeGen/LivePhysRegs.cpp
  lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
  lib/Target/ARM/ARMExpandPseudoInsts.cpp
  test/CodeGen/Hexagon/branchfolder-insert-impdef.mir
  test/CodeGen/Hexagon/livephysregs-lane-masks2.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37034.113913.patch
Type: text/x-patch
Size: 19090 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170905/4d22eb5c/attachment.bin>


More information about the llvm-commits mailing list