File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 26
26
#include " llvm/ADT/DenseMap.h"
27
27
#include " llvm/ADT/SmallVector.h"
28
28
#include " llvm/ADT/StringRef.h"
29
- #include " llvm/CodeGen/LivePhysRegs .h"
29
+ #include " llvm/CodeGen/LiveRegUnits .h"
30
30
#include " llvm/CodeGen/MachineBasicBlock.h"
31
31
#include " llvm/CodeGen/MachineFunction.h"
32
32
#include " llvm/CodeGen/MachineFunctionPass.h"
@@ -346,14 +346,8 @@ bool HexagonGenMux::genMuxInBlock(MachineBasicBlock &B) {
346
346
347
347
// Fix up kill flags.
348
348
349
- LivePhysRegs LPR (*HRI);
349
+ LiveRegUnits LPR (*HRI);
350
350
LPR.addLiveOuts (B);
351
- auto IsLive = [&LPR, this ](unsigned Reg) -> bool {
352
- for (MCPhysReg S : HRI->subregs_inclusive (Reg))
353
- if (LPR.contains (S))
354
- return true ;
355
- return false ;
356
- };
357
351
for (MachineInstr &I : llvm::reverse (B)) {
358
352
if (I.isDebugInstr ())
359
353
continue ;
@@ -365,7 +359,7 @@ bool HexagonGenMux::genMuxInBlock(MachineBasicBlock &B) {
365
359
if (!Op.isReg () || !Op.isUse ())
366
360
continue ;
367
361
assert (Op.getSubReg () == 0 && " Should have physical registers only" );
368
- bool Live = IsLive (Op.getReg ());
362
+ bool Live = !LPR. available (Op.getReg ());
369
363
Op.setIsKill (!Live);
370
364
}
371
365
LPR.stepBackward (I);
You can’t perform that action at this time.
0 commit comments