File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -320,6 +320,13 @@ void RISCVLiveVariables::computeGlobalLiveness(MachineFunction &MF) {
320320 const MachineBasicBlock &EntryBB = MF.front ();
321321 NumLiveRegsAtEntry += BlockLiveness[&EntryBB].LiveIn .size ();
322322 }
323+
324+ for (auto &BB : MF) {
325+ auto &computedLivein = BlockLiveness[&BB].LiveIn ;
326+ for (auto &LI : BB.getLiveIns ()) {
327+ assert (0 && computedLivein.count (LI.PhysReg ));
328+ }
329+ }
323330}
324331
325332bool RISCVLiveVariables::isLiveAt (Register Reg,
Original file line number Diff line number Diff line change @@ -559,7 +559,6 @@ void RISCVPassConfig::addPreEmitPass() {
559559 addPass (createRISCVIndirectBranchTrackingPass ());
560560 addPass (&BranchRelaxationPassID);
561561 addPass (createRISCVMakeCompressibleOptPass ());
562- addPass (createRISCVLiveVariablesPass ());
563562}
564563
565564void RISCVPassConfig::addPreEmitPass2 () {
@@ -589,7 +588,6 @@ void RISCVPassConfig::addMachineSSAOptimization() {
589588 TargetPassConfig::addMachineSSAOptimization ();
590589
591590 if (TM->getTargetTriple ().isRISCV64 ()) {
592- addPass (createRISCVLiveVariablesPass ());
593591 addPass (createRISCVOptWInstrsPass ());
594592 }
595593}
@@ -621,6 +619,8 @@ void RISCVPassConfig::addPostRegAlloc() {
621619 if (TM->getOptLevel () != CodeGenOptLevel::None &&
622620 EnableRedundantCopyElimination)
623621 addPass (createRISCVRedundantCopyEliminationPass ());
622+
623+ addPass (createRISCVLiveVariablesPass ());
624624}
625625
626626bool RISCVPassConfig::addILPOpts () {
You can’t perform that action at this time.
0 commit comments