Handling of DBG_VALUE in ConnectedVNInfoEqClasses::Distribute() was fixed in
PR16110. However DBG_VALUE register operands are not getting updated. This
patch properly resolves the value location.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 20416 Build 20416: arc lint + arc unit
Event Timeline
Comment Actions
Makes sense, thanks for the patch.
Some comments:
- Remove "WebAssembly" from the title as this should affect other targets too.
lib/CodeGen/LiveInterval.cpp | ||
---|---|---|
1312–1323 |
const VNInfo *VNI; if (MI->isDebugValue()) { // DBG_VALUE instructions don't have slot indexes, so get the index of the // instruction before them. The value is defined there too. SlotIndex Idx = LIS.getSlotIndexes()->getIndexBefore(*MI); VNI = LI.Query(Idx).valueOut(); } else { SlitIndex Idx = LIS.getInstructionIndex(*MI); LiveQueryResult LRQ = LI.Query(Idx); VNI = ValueIn ? LRQ.valueIn() : LRQ.valueDefined(); } |
Comment Actions
- Use valueOut() instead of valueDefined()
- Make the debug value special case more obvious
Comment Actions
Thanks for the patch!
I don't have any substantive comments, but here are a few suggestions for reducing the test case further:
- Remove unnecessary attributes.
- Remove unnecessary lifetime markers.
- Remove dbg.values which don't reference the variable "a" (i.e metadata !15).
Comment Actions
Reducing the test case further: remove attributes, lifetime markers and non-"a" variable metadata.
Comment Actions
LGTM
Just change the title when committing since this is in generic code and will affect every target and not just "WebAssembly"