This avoids recomputing it between regalloc runs.
Diff Detail
Event Timeline
lib/CodeGen/VirtRegMap.cpp | ||
---|---|---|
274 ↗ | (On Diff #176842) | DebugVars may be nullptr IIRC what getAnalysisIfAvailable API does. Make sure to test for it. |
llvm/lib/CodeGen/VirtRegMap.cpp | ||
---|---|---|
273 | I think we should push the test on DebugVars before this block.
I.e., if (DebugVars) DebugVars->emitDebugValues(VRM). if (ClearVirtRegs) { VRM->clearAllVirt(); MRI->clearAllVirt(); } |
llvm/lib/CodeGen/VirtRegMap.cpp | ||
---|---|---|
273 |
Looks like it would be okay, since you had: if (!ClearVirtRegs) AU.addPreserved<LiveDebugVariables>(); Still, it is okay to assume ClearVirtRegs will be set eventually. E.g., what happens for WebAssembly? |
llvm/lib/CodeGen/VirtRegMap.cpp | ||
---|---|---|
273 | I think this was to avoid double-emitting the debug values, since this will be run twice |
llvm/lib/CodeGen/VirtRegMap.cpp | ||
---|---|---|
273 | Without this, the debug values end up getting emitted twice. It doesn't matter for webassembly since the allocator passes are never run |
I think we should push the test on DebugVars before this block.
Otherwise
I.e.,