[PATCH] D135488: [codegen] Add a remarks based Stack Layout Analysis pass

Paul Kirth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 12 15:37:33 PST 2023


paulkirth added inline comments.


================
Comment at: llvm/test/CodeGen/AArch64/O0-pipeline.ll:76-77
 ; CHECK-NEXT:       Insert CFI remember/restore state instructions
+; CHECK-NEXT:       Lazy Machine Block Frequency Analysis
+; CHECK-NEXT:       Machine Optimization Remark Emitter
+; CHECK-NEXT:       Stack Frame Layout Analysis
----------------
nickdesaulniers wrote:
> Dang, this adds a bunch of passes to O0 pipelines...any creative ideas on how to not do that?
This seems to be the norm w/ other Analysis passes, or anything that uses remarks, really. 

I'm not really sure what we can do about that other than to move this into an existing pass that already uses remarks. I didn't see any good candidates at the point in the pipeline that we'd like to run this though.



================
Comment at: llvm/test/CodeGen/AArch64/arm64-opt-remarks-lazy-bfi.ll:43-46
+; HOTNESS:      Executing Pass 'Stack Frame Layout Analysis'
+; HOTNESS-NEXT: Freeing Pass 'Machine Optimization Remark Emitter'
+; HOTNESS-NEXT: Freeing Pass 'Lazy Machine Block Frequency Analysis'
+; HOTNESS-NEXT: Freeing Pass 'Stack Frame Layout Analysis'
----------------
nickdesaulniers wrote:
> what's going on in this test? Looks like the pass is being run twice or something?
not sure I follow. The block here is executing the pass then freeing the pass. I tried to follow the pattern used around this, but we could change it to

```
HOTNESS:      Executing Pass 'Stack Frame Layout Analysis'
HOTNESS:      Freeing Pass 'Stack Frame Layout Analysis'
```
and skip the rest


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135488



More information about the cfe-commits mailing list