[llvm] [ReachingDefAnalysis] Extend the analysis to stack objects. (PR #118097)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 6 11:55:35 PST 2025
================
@@ -54,6 +71,11 @@ void ReachingDefAnalysis::enterBasicBlock(MachineBasicBlock *MBB) {
"Unexpected basic block number.");
MBBReachingDefs.startBasicBlock(MBBNumber, NumRegUnits);
+ MBBFrameObjsReachingDefs[MBBNumber].resize(NumStackObjects);
----------------
topperc wrote:
Cab we do something like this to avoid the loop?
```
MBBFrameObjsReachingDefs[MBBNumber].resize(NumStackObjects, {-1})
```
or
```
MBBFrameObjsReachingDefs[MBBNumber].resize(NumStackObjects, std::vector({-1}))
````
https://github.com/llvm/llvm-project/pull/118097
More information about the llvm-commits
mailing list