[PATCH] D132623: [CodeGen] Disable tail calls at -O0/-O1

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 12 15:09:06 PDT 2022


nemanjai added a comment.

In D132623#3784292 <https://reviews.llvm.org/D132623#3784292>, @probinson wrote:

>> It would be interesting to have some sort of monolithic pipeline where we embed -O0/1/2/3/s/z attributes per-function in the frontend and don't have per-optimization-level pipelines.
>
> I would balk at this.  A single generic pipeline at -O0 would be a compile-time performance hit, compared to the separate pipeline, and one of the explicit goals of -O0 is fast compilation.  I'd expect a hit also at -O1 although probably less noticeable.
> (You could experiment with this today, by compiling `-emit-llvm -O0` to get IR with `optnone` everywhere, then compare compiling that IR at O0 vs O3 <https://reviews.llvm.org/owners/package/3/>.)

+1
I would be very much against a single pipeline that would run a bunch of passes that check an attribute to decide whether they should do anything. Sounds like it would also prevent building dynamic pass pipelines which ORC JIT currently allows the user to do IIRC.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132623



More information about the llvm-commits mailing list