[PATCH] D56401: [WebAssembly] Fix updating/moving DBG_VALUEs in RegStackify
Yury Delendik via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 9 08:47:27 PST 2019
yurydelendik marked 13 inline comments as done.
yurydelendik added a comment.
In D56401#1350516 <https://reviews.llvm.org/D56401#1350516>, @aheejin wrote:
> I haven't finished reading other parts, but I think I should understand this `AttachedDebugValues` constructor first to proceed.
I over-complicated search for MI's DBG_VALUE, but essentially it is collectDebugValues -- using that instead. Thank you for finding and pointing this out. I could not find this initially.
================
Comment at: lib/Target/WebAssembly/WebAssemblyRegStackify.cpp:517
+ }
+ }
}
----------------
aheejin wrote:
> Sorry, but I can't understand what this loop is doing. I thought what we were supposed to do to fix the 2nd point in [[ https://bugs.llvm.org/show_bug.cgi?id=40209 | PR40209 ]] was we needed to figure out which `DBG_VALUE` instruction was associated with which def, in case there were multiple defs to a register within a BB.
>
> What this loop seems to be doing is gather all use operands into `Operands` and get all defining instructions into `Instrs`, and I can't figure out how we are gonna figure out the mapping between MI and `DBG_VALUE`.
The `collectDebugValues` defines relationship between MI and `DBG_VALUE`. For the `updateRef` we could use `changeDebugValuesDefReg`, but we may need to perform subsequent move of the updated regs, so I just kept move the same as the second part of the `changeDebugValuesDefReg`.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56401/new/
https://reviews.llvm.org/D56401
More information about the llvm-commits
mailing list