Along with https://reviews.llvm.org/D27804, debug locations need to be merged when hoisting store instructions as well. Not sure if just dropping debug locations would make more sense for this case, but as the branch instruction will have at least different discriminator with the hoisted store instruction, I think there will be no difference in practice.
Details
Diff Detail
- Build Status
Buildable 3375 Build 3375: arc lint + arc unit
Event Timeline
Code LGTM, testcase could be improved a bit (comment inline).
test/Transforms/SimplifyCFG/remove-debug-2.ll | ||
---|---|---|
4 | These CHECKs could be improved by adding a little more context so it is more obvious what is being checked. This also makes it easier to update the test in the future. |
Address comments on test from @aprantl. Thanks for the comments. Wonder if it looks better now.
Friendly ping @aprantl. If the new test looks good to you, I'll commit this patch. Thanks!
test/Transforms/SimplifyCFG/remove-debug-2.ll | ||
---|---|---|
4 | Sorry for the delay! e.g. CHECK: define @bar CHECK-NOT: ret CHECK: void call @foo, !dbg ![[LOC1:[0-9]+]] CHECK: ![[LOC1]] = DILocation(line: 2 |
These CHECKs could be improved by adding a little more context so it is more obvious what is being checked. This also makes it easier to update the test in the future.