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 @@ -564,7 +564,6 @@ void RISCVPassConfig::addPreEmitPass() {
564564 addPass (createRISCVIndirectBranchTrackingPass ());
565565 addPass (&BranchRelaxationPassID);
566566 addPass (createRISCVMakeCompressibleOptPass ());
567- addPass (createRISCVLiveVariablesPass ());
568567}
569568
570569void RISCVPassConfig::addPreEmitPass2 () {
@@ -597,7 +596,6 @@ void RISCVPassConfig::addMachineSSAOptimization() {
597596 TargetPassConfig::addMachineSSAOptimization ();
598597
599598 if (TM->getTargetTriple ().isRISCV64 ()) {
600- addPass (createRISCVLiveVariablesPass ());
601599 addPass (createRISCVOptWInstrsPass ());
602600 }
603601}
@@ -629,6 +627,8 @@ void RISCVPassConfig::addPostRegAlloc() {
629627 if (TM->getOptLevel () != CodeGenOptLevel::None &&
630628 EnableRedundantCopyElimination)
631629 addPass (createRISCVRedundantCopyEliminationPass ());
630+
631+ addPass (createRISCVLiveVariablesPass ());
632632}
633633
634634bool RISCVPassConfig::addILPOpts () {
You can’t perform that action at this time.
0 commit comments