[PATCH] D155638: [llvm-reduce] Reduce function calling convention
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 20 15:55:53 PDT 2023
arsenm added a comment.
In D155638#4517796 <https://reviews.llvm.org/D155638#4517796>, @nikic wrote:
> I think we have a lot of precedent for this. For example, we reduce away the "dso_local" flag, which is a simplification on the IR level, but likely makes codegen more complex. Similarly, we reduce globals to external linkage -- again, this likely makes codegen more complex. Etc.
This isn't a great analog. dso_local at least fits the mold of an optimization flag. It's not something mandatory. A target should have the right to not implement CCC at all and only use custom calling conventions (this was the case for AMDGPU at the very beginning for example).
> llvm-reduce at least right now favors producing minimal IR, not producing IR that gives you the minimum number of asm instructions after codegen.
>
> If we wanted llvm-reduce to optimize for codegen tests, it should probably do things like add `nounwind` attributes to functions to avoid CFI, convert globals to internal linkage to avoid relocations, etc.
I've thought about doing this, but it is a different thing
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155638/new/
https://reviews.llvm.org/D155638
More information about the llvm-commits
mailing list