Page MenuHomePhabricator

[DebugInfo] Test that LiveDebugVariables un-coalesces ranges over block boundaries

Authored by jmorse on Aug 16 2019, 6:47 AM.



LiveDebugVariables can coalesce ranges of variable locations across multiple basic blocks. However when it recreates DBG_VALUE instructions, it has to recreate one DBG_VALUE per block, otherwise it doesn't represent the pre-regalloc layout and variable assignments can go missing.

This feature works -- however while mucking around with LiveDebugVariables, I commented it out (the loop here [0]) and no tests failed. Thus, here's a test that checks LiveDebugVariables preserves DBG_VALUEs across block boundaries.


Diff Detail


Event Timeline

jmorse created this revision.Aug 16 2019, 6:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 16 2019, 6:47 AM
aprantl accepted this revision.Aug 16 2019, 9:12 AM
aprantl added inline comments.
3 ↗(On Diff #215584)

Nitpick: this isn't consistent with either name :-)

#define DEBUG_TYPE "livedebugvars"

static cl::opt<bool>
EnableLDV("live-debug-variables", cl::init(true),

cl::desc("Enable the live debug variables pass"), cl::Hidden);

Also, we should probably unify those two...

This revision is now accepted and ready to land.Aug 16 2019, 9:12 AM
This revision was automatically updated to reflect the committed changes.