Skip to content

Commit 905730e

Browse files
committed
[Hexagon] Use LiveRegUnits
1 parent f448b8e commit 905730e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

llvm/lib/Target/Hexagon/HexagonGenMux.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "llvm/ADT/DenseMap.h"
2727
#include "llvm/ADT/SmallVector.h"
2828
#include "llvm/ADT/StringRef.h"
29-
#include "llvm/CodeGen/LivePhysRegs.h"
29+
#include "llvm/CodeGen/LiveRegUnits.h"
3030
#include "llvm/CodeGen/MachineBasicBlock.h"
3131
#include "llvm/CodeGen/MachineFunction.h"
3232
#include "llvm/CodeGen/MachineFunctionPass.h"
@@ -346,11 +346,11 @@ bool HexagonGenMux::genMuxInBlock(MachineBasicBlock &B) {
346346

347347
// Fix up kill flags.
348348

349-
LivePhysRegs LPR(*HRI);
349+
LiveRegUnits LPR(*HRI);
350350
LPR.addLiveOuts(B);
351351
auto IsLive = [&LPR, this](unsigned Reg) -> bool {
352352
for (MCPhysReg S : HRI->subregs_inclusive(Reg))
353-
if (LPR.contains(S))
353+
if (!LPR.available(S))
354354
return true;
355355
return false;
356356
};
@@ -365,8 +365,7 @@ bool HexagonGenMux::genMuxInBlock(MachineBasicBlock &B) {
365365
if (!Op.isReg() || !Op.isUse())
366366
continue;
367367
assert(Op.getSubReg() == 0 && "Should have physical registers only");
368-
bool Live = IsLive(Op.getReg());
369-
Op.setIsKill(!Live);
368+
Op.setIsKill(!LPR.available(Op.getReg()));
370369
}
371370
LPR.stepBackward(I);
372371
}

0 commit comments

Comments
 (0)