llvm-project/llvm/test/Other
Arthur Eubanks ddc702376a [NewPM] Don't skip SCCs not in current RefSCC
With D107249 I saw huge compile time regressions on a module (150s ->
5700s). This turned out to be due to a huge RefSCC in
the module. As we ran the function simplification pipeline on functions
in the SCCs in the RefSCC, some of those SCCs would be split out to
their RefSCC, a child of the current RefSCC. We'd skip the remaining
SCCs in the huge RefSCC because the current RefSCC is now the RefSCC
just split out, then revisit the original huge RefSCC from the
beginning.  This happened many times because many functions in the
RefSCC were optimizable to the point of becoming their own RefSCC.

This patch makes it so we don't skip SCCs not in the current RefSCC so
that we split out all the child RefSCCs on the first iteration of
RefSCC. When we split out a RefSCC, we invalidate the original RefSCC
and add the remainder of the SCCs into a new RefSCC in
RCWorklist. This happens repeatedly until we finish visiting all
SCCs, at which point there is only one valid RefSCC in
RCWorklist from the original RefSCC containing all the SCCs that
were not split out, and we visit that.

For example, in the newly added test cgscc-refscc-mutation-order.ll,
we'd previously run instcombine in this order:
f1, f2, f1, f3, f1, f4, f1

Now it's:
f1, f2, f3, f4, f1

This can cause more passes to be run in some specific cases,
e.g. if f1<->f2 gets optimized to f1<-f2, we'd previously run f1, f2;
now we run f1, f2, f2.

This improves kimwitu++ compile times by a lot (12-15% for various -O3 configs):
https://llvm-compile-time-tracker.com/compare.php?from=2371c5a0e06d22b48da0427cebaf53a5e5c54635&to=00908f1d67400cab1ad7bcd7cacc7558d1672e97&stat=instructions

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D121953
2022-03-18 14:16:29 -07:00
..
ChangePrinters Expand testing of necessary features for print-changed=dot-cfg. 2021-12-02 08:16:18 -05:00
Inputs
X86 Recommit "[LTO] Use lto::backend for code generation." 2021-02-15 10:05:42 +00:00
2002-01-31-CallGraph.ll [test] Remove legacy PM tests in llvm/test/Other 2021-09-02 12:23:24 -07:00
2002-02-24-InlineBrokePHINodes.ll
2004-08-16-PackedConstantInlineStore.ll
2004-08-16-PackedGlobalConstant.ll
2004-08-16-PackedSelect.ll
2004-08-16-PackedSimple.ll
2004-08-20-PackedControlFlow.ll
2006-02-05-PassManager.ll
2007-09-10-PassManager.ll
2008-02-14-PassManager.ll
2008-06-04-FieldSizeInPacked.ll
2008-10-06-RemoveDeadPass.ll
2008-10-15-MissingSpace.ll
2009-06-05-no-implicit-float.ll
2009-09-14-function-elements.ll
2010-05-06-Printer.ll Remove "Rewrite Symbols" from codegen pipeline 2021-05-31 08:32:36 -07:00
FileCheck-space.txt
ResponseFile.ll
attribute-comment.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
available-externally-lto.ll
bb-badref.ll [AsmWriter] Construct SlotTracker with the function 2020-10-20 15:01:40 -07:00
bcanalyzer-block-info.txt
bcanalyzer-dump-blockinfo-option.txt [BitcodeAnalyzer] allow a motivated user to dump BLOCKINFO 2021-10-10 10:15:14 +05:30
bcanalyzer-dump-option.txt
can-execute.txt
cfg-printer-branch-weights-percent.ll Reapply [lit] Read command stdout/stderr as text on Windows 2022-03-03 13:31:31 +02:00
cfg-printer-branch-weights.ll Reapply [lit] Read command stdout/stderr as text on Windows 2022-03-03 13:31:31 +02:00
cfg-printer-filter.ll Reapply [lit] Read command stdout/stderr as text on Windows 2022-03-03 13:31:31 +02:00
cfg_deopt_unreach.ll Reapply [lit] Read command stdout/stderr as text on Windows 2022-03-03 13:31:31 +02:00
cgscc-devirt-iteration.ll [funcattrs] Infer writeonly argument attribute [part 2] 2022-01-04 09:07:54 -08:00
cgscc-disconnected-invalidation.ll [NewPM] Consistently use 'simplifycfg' rather than 'simplify-cfg' 2021-07-09 09:47:03 +02:00
cgscc-iterate-function-mutation.ll [NewPM] Consistently use 'simplifycfg' rather than 'simplify-cfg' 2021-07-09 09:47:03 +02:00
cgscc-libcall-update.ll Revert "[BuildLibCalls/SimplifyLibCalls] Fix attributes on created CallInst instructions." 2021-06-24 19:24:34 -07:00
cgscc-observe-devirt.ll [funcattrs] Add the maximal set of implied attributes to definitions 2021-04-16 14:22:19 -07:00
cgscc-refscc-mutation-order.ll [NewPM] Don't skip SCCs not in current RefSCC 2022-03-18 14:16:29 -07:00
change-printer.ll [NewPM] Cleanup IR printing instrumentation 2021-04-15 09:50:55 -07:00
cleanup-lcssa.ll
codegenprepare-and-debug.ll
constant-fold-gep-address-spaces.ll
constant-fold-gep.ll [test] Remove legacy PM tests in llvm/test/Other 2021-09-02 12:23:24 -07:00
copy-metadata-of-declaration.ll [Cloning] Copy metadata of global declarations 2021-01-08 08:21:18 +08:00
debug-pass-manager.ll [NewPM][opt] Add -debug-pass-manager=quiet to not print analysis info 2021-07-19 15:08:26 -07:00
debugcounter-dce.ll
debugcounter-earlycse.ll
debugcounter-newgvn.ll
debugcounter-predicateinfo.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
devirt-invalidated.ll [NewPM] Bail out of devirtualization wrapper if the current SCC is invalidated 2021-07-19 15:07:30 -07:00
devirtualization-undef.ll Reland [CGSCC] Detect devirtualization in more cases 2020-11-23 21:28:59 -08:00
force-opaque-ptrs.ll [IR] Support ifuncs in opaque pointer mode 2022-01-27 13:01:33 +01:00
heat-colors-graphs.ll [test] Remove legacy PM tests in llvm/test/Other 2021-09-02 12:23:24 -07:00
invalid-commandline-option.ll
invariant.group.ll Remove a -O2 usage from a CSE specific test file 2021-04-13 10:29:36 -07:00
lint.ll [test] Properly match parameter/argument ABI attributes 2021-05-31 09:12:18 -07:00
lit-globbing.ll
lit-quoting.txt [test] Avoid unportable echo in Other/lit-quoting.txt 2021-08-15 00:20:47 +02:00
lit-unicode.txt
llvm-nm-without-aliases.ll
loop-deletion-printer.ll [NewPM] Print pre-transformation IR name in --print-after-all 2021-07-20 10:20:10 -07:00
loop-mssa-not-preserved.ll [LoopPassManager] Assert that MemorySSA is preserved if used 2021-08-20 22:48:04 +02:00
loop-pass-ordering.ll
loop-pass-printer.ll [test] Remove legacy PM tests in llvm/test/Other 2021-09-02 12:23:24 -07:00
loop-pm-invalidation.ll [InferAddressSpaces] Support assumed addrspaces from addrspace predicates. 2021-11-08 16:51:57 -05:00
loopnest-callback.ll Making Instrumentation aware of LoopNest Pass 2021-05-24 20:25:52 -07:00
loopnest-pass-ordering.ll Add NoOpLoopNestPass and LOOPNEST_PASS macro 2021-11-05 16:11:48 +00:00
machine-size-remarks.ll
mixed-opaque-ptrs-2.ll [OpaquePtr][LLParser] Automatically detect opaque pointers in .ll files 2022-03-17 08:37:18 -07:00
mixed-opaque-ptrs.ll [OpaquePtr][LLParser] Automatically detect opaque pointers in .ll files 2022-03-17 08:37:18 -07:00
module-pass-printer.ll [NewPM] Cleanup IR printing instrumentation 2021-04-15 09:50:55 -07:00
new-pass-manager-verify-each.ll [NewPM] Use PassInstrumentation for -verify-each 2020-10-07 19:24:25 -07:00
new-pass-manager.ll [InferAddressSpaces] Support assumed addrspaces from addrspace predicates. 2021-11-08 16:51:57 -05:00
new-pm-O0-defaults.ll [AnnotationRemarks] Support generating annotation remarks with -O0. 2021-12-02 15:01:02 +00:00
new-pm-O0-ep-callbacks.ll [NewPM] Fix tests for OptimizerLast extension point 2022-02-25 14:49:19 -08:00
new-pm-cspgo.ll
new-pm-defaults.ll [Tests] Update pipeline tests 2022-03-16 10:56:44 +01:00
new-pm-eager-invalidate.ll [NewPM] Only invalidate modified functions' analyses in CGSCC passes + turn on eagerly invalidate analyses 2021-11-15 14:44:53 -08:00
new-pm-lto-defaults.ll [NewPM] Add extension points to LTO pipeline in PassBuilder 2022-02-25 14:48:54 -08:00
new-pm-pgo-O0.ll [NPM] Move more O0 pass building into PassBuilder 2020-11-19 11:22:23 -08:00
new-pm-pgo-preinline.ll [NewPM] Only invalidate modified functions' analyses in CGSCC passes + turn on eagerly invalidate analyses 2021-11-15 14:44:53 -08:00
new-pm-pgo.ll [NFC] Rename GVN -> GVNPass and SROA -> SROAPass 2021-11-09 10:35:58 -08:00
new-pm-pr42726-cgscc.ll [NewPM][opt] Run the "default" AA pipeline by default 2021-01-21 21:08:54 -08:00
new-pm-print-pipeline.ll [LICM] Add allowspeculation pass options. 2022-03-18 16:51:57 +00:00
new-pm-pseudo-probe.ll Moving UniqueInternalLinkageNamesPass to the start of IR pipelines. 2021-01-02 14:26:21 -08:00
new-pm-thinlto-defaults.ll [Tests] Update pipeline tests 2022-03-16 10:56:44 +01:00
new-pm-thinlto-postlink-pgo-defaults.ll [Tests] Update pipeline tests 2022-03-16 10:56:44 +01:00
new-pm-thinlto-postlink-samplepgo-defaults.ll [Tests] Update pipeline tests 2022-03-16 10:56:44 +01:00
new-pm-thinlto-prelink-pgo-defaults.ll [Passes] Move AggressiveInstCombine after InstCombine 2021-12-04 14:22:43 +03:00
new-pm-thinlto-prelink-samplepgo-defaults.ll [Passes] Move AggressiveInstCombine after InstCombine 2021-12-04 14:22:43 +03:00
new-pm-time-trace.ll
no-rerun-function-simplification-pipeline.ll [NewPM] Add option to prevent rerunning function pipeline on functions in CGSCC adaptor 2021-11-17 09:06:46 -08:00
opt-On.ll [opt] Directly translate -O# to -passes='default<O#>' 2021-10-18 16:48:10 -07:00
opt-bisect-helper.py
opt-bisect-new-pass-manager.ll [NewPM] Mark BitcodeWriter as required. 2021-05-21 16:14:09 -07:00
opt-hot-cold-split.ll [test] Remove legacy PM tests in llvm/test/Other 2021-09-02 12:23:24 -07:00
opt-old-new-pm-passes.ll
opt-override-denormal-fp-math-f32.ll [test] Fix unused check prefixes in test/Linker/ and test/Other/ 2020-10-29 21:54:56 -07:00
opt-override-denormal-fp-math-mixed.ll [test] Fix unused check prefixes in test/Linker/ and test/Other/ 2020-10-29 21:54:56 -07:00
opt-override-denormal-fp-math.ll [test] Fix unused check prefixes in test/Linker/ and test/Other/ 2020-10-29 21:54:56 -07:00
opt-override-frame-pointer.ll
opt-override-mcpu-mattr.ll
opt-pipeline-vector-passes.ll [Passes] Only run extra vector passes if loops have been vectorized. 2021-12-10 11:42:45 +00:00
opt-twice.ll
optimization-remarks-auto.ll [test] Remove legacy PM tests in llvm/test/Other 2021-09-02 12:23:24 -07:00
optimization-remarks-inline.ll [InlineAdvisor] Add single quotes around caller/callee names 2021-08-10 11:51:31 -07:00
optimization-remarks-invalidation.ll [LICM] Remove AST-based implementation 2021-08-18 20:21:53 +02:00
optimization-remarks-lazy-bfi.ll
optimize-inrange-gep.ll
pass-pipeline-parsing.ll [NewPM] Add options to PrintPassInstrumentation 2021-05-18 20:59:35 -07:00
pipefail.txt
pr32085.ll
print-before-after.ll [NewPM] Rename 'unswitch' to 'simple-loop-unswitch' in PassRegistry 2021-07-09 09:47:33 +02:00
print-changed-deleted.ll [NewPM] Fix -print-changed when a -filter-print-funcs function is removed 2021-04-12 11:55:17 -07:00
print-debug-counter.ll
print-module-scope.ll [test] Remove legacy PM tests in llvm/test/Other 2021-09-02 12:23:24 -07:00
print-passes.ll Add NoOpLoopNestPass and LOOPNEST_PASS macro 2021-11-05 16:11:48 +00:00
print-slotindexes.ll [NFC] Disallow unused prefixes under Other 2021-01-19 12:22:29 -08:00
printer.ll [test] Remove legacy PM tests in llvm/test/Other 2021-09-02 12:23:24 -07:00
scalable-vector-array.ll
scalable-vector-struct-intrinsic.ll [IR] Allow scalable vectors in structs to support intrinsics returning multiple values. 2021-01-17 23:29:51 -08:00
scalable-vectors-core-ir.ll Precommit analysis/etc tests for inselt poison placeholder 2020-12-24 12:14:24 +09:00
scc-deleted-printer.ll [NewPM] Print pre-transformation IR name in --print-after-all 2021-07-20 10:20:10 -07:00
scc-pass-printer.ll [test] Remove legacy PM tests in llvm/test/Other 2021-09-02 12:23:24 -07:00
spir_cc.ll
statistic.ll [test] Remove legacy PM tests in llvm/test/Other 2021-09-02 12:23:24 -07:00
time-passes.ll [test] Remove legacy PM tests in llvm/test/Other 2021-09-02 12:23:24 -07:00
unroll-sroa.ll
writing-to-stdout.ll