llvm-project/llvm/test/Other
Florian Hahn acea6e9cfa
[Passes] Only run extra vector passes if loops have been vectorized.
This patch uses a similar trick as in D113947 to only run the extra
passes after vectorization on functions where loops have been
vectorized.

The reason for running the 'extra vector passes' is
simplification/unswitching of the runtime checks created by LV, there
should be no need to run them if nothing got vectorized

To do that, a new dummy analysis ShouldRunExtraVectorPasses has been
added. If loops have been vectorized for a function, LV will cache the
analysis. At the moment it uses MadeCFGChanges as proxy for loop
vectorized, which isn't perfect (it could be too aggressive, e.g.
because no runtime checks have been added), but should be good enough
for now.

The extra passes are now managed by a new FunctionPassManager that
runs its passes only if ShouldRunExtraVectorPasses has been cached.

Without this patch, `-extra-vectorizer-passes` has the following
compile-time impact:

NewPM-O3: +4.86%
NewPM-ReleaseThinLTO: +3.56%
NewPM-ReleaseLTO-g: +7.17%

http://llvm-compile-time-tracker.com/compare.php?from=ead3979a92fc33add4710c4510d6906260dcb4ad&to=c292da649e2c6e88a31e702fdc474727d09c72bc&stat=instructions

With this patch, that gets reduced to

NewPM-O3: +1.43%
NewPM-ReleaseThinLTO: +1.00%
NewPM-ReleaseLTO-g: +1.58%

http://llvm-compile-time-tracker.com/compare.php?from=ead3979a92fc33add4710c4510d6906260dcb4ad&to=e67d86b57810011cf285eb9aa1944781be6096f0&stat=instructions

It is probably still too high to enable by default, but much better.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D115052
2021-12-10 11:42:45 +00: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
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
cfg-printer-branch-weights.ll
cfg-printer-filter.ll Use `-cfg-func-name` value as filter for `-view-cfg`, etc. 2021-06-16 23:54:51 +02:00
cfg_deopt_unreach.ll
cgscc-devirt-iteration.ll [funcattrs] Add the maximal set of implied attributes to definitions 2021-04-16 14:22:19 -07: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
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
force-opaque-ptrs-typed-dis.ll [OpaquePtr] Forbid mixing typed and opaque pointers 2021-09-10 15:18:23 +02:00
force-opaque-ptrs.ll [OpaquePtr] Forbid mixing typed and opaque pointers 2021-09-10 15:18:23 +02: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
module-pass-printer.ll [NewPM] Cleanup IR printing instrumentation 2021-04-15 09:50:55 -07:00
new-pass-manager-verify-each.ll
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
new-pm-cspgo.ll
new-pm-defaults.ll [NewPM] Test more options in pipeline test (NFC) 2021-12-04 17:30:30 +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 [Passes] Move AggressiveInstCombine after InstCombine 2021-12-04 14:22:43 +03:00
new-pm-pgo-O0.ll
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 [NPM] Fix LoopNestPasses in -print-pipeline-passes 2021-12-01 07:57:17 +01: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 [Passes] Move AggressiveInstCombine after InstCombine 2021-12-04 14:22:43 +03:00
new-pm-thinlto-postlink-pgo-defaults.ll [Passes] Move AggressiveInstCombine after InstCombine 2021-12-04 14:22:43 +03:00
new-pm-thinlto-postlink-samplepgo-defaults.ll [Passes] Move AggressiveInstCombine after InstCombine 2021-12-04 14:22:43 +03: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
opt-override-denormal-fp-math-mixed.ll
opt-override-denormal-fp-math.ll
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
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