[PATCH] D115808: [DAGCombiner] Avoid combining adjacent stores at -O0 to improve debug experience

Shivam Gupta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 17 22:13:33 PST 2021


xgupta added a comment.

Thank you suggestions. I get to know many things.



================
Comment at: llvm/test/CodeGen/RISCV/dbg-combine.ll:37
+entry:
+  %size = alloca i32, align 4
+  store i32 8, i32* %size, align 4
----------------
jrtc27 wrote:
> Generally load/store tests will take a pointer as an argument to the function rather than complicating things with an alloca (i.e. `@foo(i32* %p)`)
Sorry, I am not sure how that test will look like. But if the test case should not have alloca, I make it to disappear.  If the current test is not good please share an example c code.


================
Comment at: llvm/test/CodeGen/RISCV/dbg-combine.ll:44
+
+attributes #0 = { noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+64bit,+a,+c,+m,+relax,-save-restore" }
+
----------------
jrtc27 wrote:
> Way too complicated, all you care about is optnone (and _possibly_ nounwind depending on whether excluding it ends up cluttering the assembly with CFI directives), and those should both be specified inline rather than indirectly via `#0`
Adding noinline also because without that -
Exit Code: 2
Command Output (stderr):
Attribute 'optnone' requires 'noinline'!



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115808/new/

https://reviews.llvm.org/D115808



More information about the llvm-commits mailing list