[PATCH] D52410: Use TRI->regsOverlap() in MachineBasicBlock::computeRegisterLiveness
Mikael Holmén via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 24 23:14:37 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL342944: Use TRI->regsOverlap() in MachineBasicBlock::computeRegisterLiveness (authored by uabelho, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D52410?vs=166654&id=166813#toc
Repository:
rL LLVM
https://reviews.llvm.org/D52410
Files:
llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
Index: llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
+++ llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
@@ -1404,9 +1404,8 @@
// no successor has it live in.
if (I == end()) {
for (MachineBasicBlock *S : successors()) {
- for (MCSubRegIterator SubReg(Reg, TRI, /*IncludeSelf*/true);
- SubReg.isValid(); ++SubReg) {
- if (S->isLiveIn(*SubReg))
+ for (const MachineBasicBlock::RegisterMaskPair &LI : S->liveins()) {
+ if (TRI->regsOverlap(LI.PhysReg, Reg))
return LQR_Live;
}
}
@@ -1460,9 +1459,8 @@
// Did we get to the start of the block?
if (I == begin()) {
// If so, the register's state is definitely defined by the live-in state.
- for (MCRegAliasIterator RAI(Reg, TRI, /*IncludeSelf=*/true); RAI.isValid();
- ++RAI)
- if (isLiveIn(*RAI))
+ for (const MachineBasicBlock::RegisterMaskPair &LI : liveins())
+ if (TRI->regsOverlap(LI.PhysReg, Reg))
return LQR_Live;
return LQR_Dead;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52410.166813.patch
Type: text/x-patch
Size: 1117 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180925/7be84da8/attachment.bin>
More information about the llvm-commits
mailing list