DBG_VALUES placed between memory instructions would change
codegen. Skip over these and re-insert them after the bundle instead
of giving up on bundling.
Details
Diff Detail
Event Timeline
llvm/lib/Target/AMDGPU/SIFormMemoryClauses.cpp | ||
---|---|---|
389 | Why don't just create DbgInstrs here? | |
llvm/test/CodeGen/AMDGPU/soft-clause-dbg-value.mir | ||
2 ↗ | (On Diff #320357) | Am I right that we need phi-node-elimination, before to remove IsSSA property to avoid verifier' fail? |
llvm/lib/Target/AMDGPU/SIFormMemoryClauses.cpp | ||
---|---|---|
325 | Since https://reviews.llvm.org/D92522, if you don't have a strong reason for choosing 8 | |
391–393 | When does Next != BundleNext after this for terminates? It seems like you should be able to just use Next below when re-inserting the DBG instructions? |
llvm/lib/Target/AMDGPU/SIFormMemoryClauses.cpp | ||
---|---|---|
389 | Right, it can be local to this block and cleared/destroyed after re-insertion. It will take less memory. |
llvm/lib/Target/AMDGPU/SIFormMemoryClauses.cpp | ||
---|---|---|
391–393 | I disagree that it doesn't matter, after reading to this point I have to assume either (a) I don't understand the code, or (b) there is a missing assert(BundleNext == Next); Can you either delete BundleNext or add an assert? |
llvm/lib/Target/AMDGPU/SIFormMemoryClauses.cpp | ||
---|---|---|
391–393 | BundleNext is needed for incrementing the inner loop up to Next |
llvm/lib/Target/AMDGPU/SIFormMemoryClauses.cpp | ||
---|---|---|
389 | I didn't notice this when I first read, but it doesn't really seem necessary to buffer up the debug instrs at all. Can't we just MBB.insert(Next, BI->removeFromParent()) below? Did you do the buffering and extra loop because it makes tracking when to end iteration simpler, and because the largest the vector can get is amdgpu-max-memory-clause anyway? | |
391–393 | Thank you for changing this in the committed version! |
Since https://reviews.llvm.org/D92522, if you don't have a strong reason for choosing 8