Currently, variadic dbg.values (i.e. those using a DIArgList as part of their location) are not handled properly by FastIsel or GlobalIsel. A full implementation may take some time to complete, but these pipelines must not produce invalid debug info in the absence of a full implementation. Maintaining current behaviour in this case means producing undef DBG_VALUE instructions for each variadic dbg.value; currently these passes instead produce DBG_VALUE instructions as normal, but only using the first value in the DIArgList - this is not only incorrect, but also invalid as the set of valid DIExpressions for variadic and non-variadic dbg.values are disjoint. This may result in errors further along the pipeline.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Do we expect cases where this feature is useful when doing -O0? I guess no, right? So the FastISel is OK, since it is being used at -O0 case only.
Comment Actions
You're right for the most part, but there are some edge cases: a function which is "always inline" called from a function marked "optnone" can result in FastIsel being run on a variadic dbg.value.
Comment Actions
LGTM given that I've seen a reproducer where this causes an assertion failure -- it's clearly best to avoid the assertion failure. We should re-visit this in the future as there are quite legitimate scenarios where this would be important, for example using optimised LLVM-IR with llc -O0.