llvm-project/llvm/test/Transforms/PhaseOrdering
Sanjay Patel bfb9b8e075 [Passes] add a tail-call-elim pass near the end of the opt pipeline
We call tail-call-elim near the beginning of the pipeline,
but that is too early to annotate calls that get added later.

In the motivating case from issue #47852, the missing 'tail'
on memset leads to sub-optimal codegen.

I experimented with removing the early instance of
tail-call-elim instead of just adding another pass, but that
appears to be slightly worse for compile-time:
+0.15% vs. +0.08% time.
"tailcall" shows adding the pass; "tailcall2" shows moving
the pass to later, then adding the original early pass back
(so 1596886802 is functionally equivalent to 180b0439dc ):
https://llvm-compile-time-tracker.com/index.php?config=NewPM-O3&stat=instructions&remote=rotateright

Note that there was an effort to split the tail call functionality
into 2 passes - that could help reduce compile-time if we find
that this change costs more in compile-time than expected based
on the preliminary testing:
D60031

Differential Revision: https://reviews.llvm.org/D130374
2022-07-25 15:25:47 -04:00
..
AArch64 [Passes] add a tail-call-elim pass near the end of the opt pipeline 2022-07-25 15:25:47 -04:00
ARM [Passes] add a tail-call-elim pass near the end of the opt pipeline 2022-07-25 15:25:47 -04:00
SystemZ [PhaseOrdering] add explanatory comment for test; NFC 2022-07-24 17:07:17 -04:00
X86 [Passes] add a tail-call-elim pass near the end of the opt pipeline 2022-07-25 15:25:47 -04:00
2010-03-22-empty-baseclass.ll Revert "[NFCI] Regenerate PhaseOrdering test checks" 2022-04-04 15:30:57 +05:00
PR6627.ll
assume-explosion.ll Revert "[NFCI] Regenerate PhaseOrdering test checks" 2022-04-04 15:30:57 +05:00
basic.ll Revert "[NFCI] Regenerate PhaseOrdering test checks" 2022-04-04 15:30:57 +05:00
bitfield-bittests.ll
cmp-logic.ll [InstCombine] canonicalize 'icmp (trunc X), C' to 'icmp (X & Mask), C' 2022-06-30 15:51:39 -04:00
d83507-knowledge-retention-bug.ll Revert "[NFCI] Regenerate PhaseOrdering test checks" 2022-04-04 15:30:57 +05:00
dce-after-argument-promotion.ll [Pipelines] Add a test how DCE works after ArgumentPromotion 2022-06-30 12:56:08 +03:00
deletion-of-loops-that-became-side-effect-free.ll Inliner: don't mark call sites as 'nounwind' if that would be redundant 2022-07-20 14:17:23 +02:00
expect.ll Revert "[NFCI] Regenerate PhaseOrdering test checks" 2022-04-04 15:30:57 +05:00
fast-basictest.ll [Reassociate] Enable FP reassociation via 'reassoc' and 'nsz' 2022-07-15 11:44:35 -07:00
fast-reassociate-gvn.ll
gdce.ll
globalaa-retained.ll [PhaseOrdering] Remove RUN lines for legacy PM (NFC) 2022-04-21 14:43:00 +02:00
inlining-alignment-assumptions.ll
instcombine-sroa-inttoptr.ll Revert "[NFCI] Regenerate PhaseOrdering test checks" 2022-04-04 15:30:57 +05:00
lifetime-sanitizer.ll
loop-rotation-vs-common-code-hoisting.ll [PhaseOrdering] Remove RUN lines for legacy PM (NFC) 2022-04-21 14:43:00 +02:00
lto-licm.ll
memset-tail.ll [Passes] add a tail-call-elim pass near the end of the opt pipeline 2022-07-25 15:25:47 -04:00
min-max-abs-cse.ll [Passes] add a tail-call-elim pass near the end of the opt pipeline 2022-07-25 15:25:47 -04:00
minmax.ll [Passes] add a tail-call-elim pass near the end of the opt pipeline 2022-07-25 15:25:47 -04:00
openmp-opt-module.ll
partialord-ule.ll
pr32544.ll
pr36760.ll [PhaseOrdering] Remove RUN lines for legacy PM (NFC) 2022-04-21 14:43:00 +02:00
pr39116.ll
pr39282.ll [PhaseOrdering] Remove RUN lines for legacy PM (NFC) 2022-04-21 14:43:00 +02:00
pr40750.ll
pr44461-br-to-switch-rotate.ll
pr45682.ll
pr45687.ll [PhaseOrdering] Remove RUN lines for legacy PM (NFC) 2022-04-21 14:43:00 +02:00
reassociate-after-unroll.ll [PhaseOrdering] Remove RUN lines for legacy PM (NFC) 2022-04-21 14:43:00 +02:00
reassociate-gvn-bdce.ll
reassociate-instcombine.ll
recompute-globalsaa.ll [GlobalOpt] Perform store->dominated load forwarding for stored once globals 2022-06-24 09:09:26 -07:00
rotate.ll
scev-custom-dl.ll
scev.ll
simplifycfg-options.ll
simplifycfg-switch-lowering-vs-correlatedpropagation.ll [PhaseOrdering] Remove RUN lines for legacy PM (NFC) 2022-04-21 14:43:00 +02:00
single-iteration-loop-sroa.ll [Passes] add a tail-call-elim pass near the end of the opt pipeline 2022-07-25 15:25:47 -04:00
two-shifts-by-sext.ll
unsigned-multiply-overflow-check.ll Revert "[NFCI] Regenerate PhaseOrdering test checks" 2022-04-04 15:30:57 +05:00
vector-select.ll
vector-trunc-inseltpoison.ll
vector-trunc.ll