This caused incorrect debug information for parameters:
Previously, after a COPY of a parameter that changes the width,
we would emit a DBG_VALUE that continues to be associated to that
parameter, even though it now used a different width.
This made the LiveDebugValues pass assume the parameter value
got clobbered and it stopped tracking the parameter entry
value, leading to incorrect debug information.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Event Timeline
Comment Actions
Thanks for this! The discussion on the bugzilla PR covers some alternative ways to tackle this, which I won’t rehash here. I think it's reasonable to shoot for a narrow bugfix first.
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | ||
---|---|---|
624 | I missed this earlier, but: with this change, if the first copy use fails the width check, we'd emit a debug value if there’s a second copy use of the register. A narrow fix might be to move the width check to line 629, where we check whether CopyUseMI has been set and emit a debug value if so. |
Comment Actions
You can drop Reviewers: Subscribers: Tags: and the text Summary: with the following script
arcfilter () { arc amend git log -1 --pretty=%B | awk '/Reviewers:|Subscribers:/{p=1} /Reviewed By:|Differential Revision:/{p=0} !p && !/^Summary:$/ {sub(/^Summary: /,"");print}' | git commit --amend --date=now -F - }
Reviewed By: is considered important by some people. You should keep the tag. (I have updated my script to use --date=now (setting author date to committer date))
I missed this earlier, but: with this change, if the first copy use fails the width check, we'd emit a debug value if there’s a second copy use of the register.
A narrow fix might be to move the width check to line 629, where we check whether CopyUseMI has been set and emit a debug value if so.