[llvm] [ReachingDefAnalysis] Extend the analysis to stack objects. (PR #118097)

Mikhail Gudim via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 11 06:47:39 PST 2025


================
@@ -422,7 +507,7 @@ void ReachingDefAnalysis::getLiveOuts(MachineBasicBlock *MBB, MCRegister Reg,
   VisitedBBs.insert(MBB);
   LiveRegUnits LiveRegs(*TRI);
   LiveRegs.addLiveOuts(*MBB);
-  if (LiveRegs.available(Reg))
+  if (Register::isPhysicalRegister(Reg) && LiveRegs.available(Reg))
----------------
mgudim wrote:

I don't think that we HAVE TO extend LiveRegs to stack slots now.  If we only look at `getGlobalReachingDefs`  as I understand these checks are early-exit checks.  Do you think this is correct?

Maybe we can extend this in future MRs

https://github.com/llvm/llvm-project/pull/118097


More information about the llvm-commits mailing list