llvm-project/llvm/test/Other
Fedor Sergeev 6660fd0f95 [PM][FunctionAttrs] add NoUnwind attribute inference to PostOrderFunctionAttrs pass
Summary:
This was motivated by absence of PrunEH functionality in new PM.
It was decided that a proper way to do PruneEH is to add NoUnwind inference
into PostOrderFunctionAttrs and then perform normal SimplifyCFG on top.

This change generalizes attribute handling implemented for (a removal of)
Convergent attribute, by introducing a generic builder-like class
   AttributeInferer

It registers all the attribute inference requests, storing per-attribute
predicates into a vector, and then goes through an SCC Node, scanning all
the instructions for not breaking attribute assumptions.

The main idea is that as soon all the instructions from all the functions
of SCC Node conform to attribute assumptions then we are free to infer
the attribute as set for all the functions of SCC Node.

It handles two distinct cases of attributes:
   - those that might break due to derefinement of the function code

     for these attributes we are allowed to apply inference only if all the
     functions are "exact definitions". Example - NoUnwind.

   - those that do not care about derefinement

     for these attributes we are allowed to apply inference as soon as we see
     any function definition. Example - removal of Convergent attribute.

Also in this commit:
* Converted all the FunctionAttrs tests to use FileCheck and added new-PM
  invocations to them

* FunctionAttrs/convergent.ll test demonstrates a difference in behavior between
   new and old PM implementations. Marked with FIXME.

* PruneEH tests were converted to new-PM as well, using function-attrs+simplify-cfg
  combo as intended

* some of "other" tests were updated since function-attrs now infers 'nounwind'
  even for old PM pipeline

* -disable-nounwind-inference hidden option added as a possible workaround for a supposedly
  rare case when nounwind being inferred by default presents a problem

Reviewers: chandlerc, jlebar

Reviewed By: jlebar

Subscribers: eraman, llvm-commits

Differential Revision: https://reviews.llvm.org/D44415

llvm-svn: 328377
2018-03-23 21:46:16 +00:00
..
Inputs Add test coverage for new PM PGOOpt handling. 2017-07-26 02:00:43 +00:00
X86
2002-01-31-CallGraph.ll Make shell redirection construct portable 2017-07-12 13:24:46 +00:00
2002-02-24-InlineBrokePHINodes.ll
2002-03-11-ConstPropCrash.ll
2003-02-19-LoopInfoNestingBug.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-04-24-eliminate-mostly-empty-blocks.ll
2007-06-05-PassID.ll
2007-06-28-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-03-31-CallGraph.ll
2009-06-05-no-implicit-float.ll
2009-09-14-function-elements.ll
2010-05-06-Printer.ll
FileCheck-space.txt
ResponseFile.ll
attribute-comment.ll
bcanalyzer-block-info.txt
can-execute.txt REQUIRES: shell a couple of tests that require the shell 2018-02-10 00:14:54 +00:00
cgscc-devirt-iteration.ll [PM][FunctionAttrs] add NoUnwind attribute inference to PostOrderFunctionAttrs pass 2018-03-23 21:46:16 +00:00
cgscc-disconnected-invalidation.ll [PM/CGSCC] Teach the CGSCC pass manager components to gracefully handle 2017-09-14 08:33:57 +00:00
cgscc-iterate-function-mutation.ll
cgscc-libcall-update.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
cgscc-observe-devirt.ll
cleanup-lcssa.ll
close-stderr.ll
constant-fold-gep-address-spaces.ll
constant-fold-gep.ll
debugcounter-newgvn.ll
debugcounter-predicateinfo.ll
extract-alias.ll
extract-linkonce.ll
extract-weak-odr.ll
extract.ll Make GlobalValues with non-default visibilility dso_local. 2018-01-18 02:08:23 +00:00
invalid-commandline-option.ll
invariant.group.barrier.ll Let llvm.invariant.group.barrier accepts pointer to any address space 2017-11-16 16:32:16 +00:00
lint.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
lit-globbing.ll Fix more inconsistent line endings. NFC. 2017-12-18 19:46:56 +00:00
lit-quoting.txt
lit-unicode.txt
llvm-nm-without-aliases.ll
loop-pass-ordering.ll
loop-pass-printer.ll IR printing improvement for loop passes - handle -print-module-scope 2017-12-01 18:33:58 +00:00
loop-pm-invalidation.ll [PM] pass -debug-pass-manager flag into FunctionToLoopPassAdaptor's canonicalization PM 2017-12-29 08:16:06 +00:00
new-pass-manager.ll [PM] pass -debug-pass-manager flag into FunctionToLoopPassAdaptor's canonicalization PM 2017-12-29 08:16:06 +00:00
new-pm-defaults.ll Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00
new-pm-lto-defaults.ll Recommit r325001: [CallSiteSplitting] Support splitting of blocks with instrs before call. 2018-02-14 13:59:12 +00:00
new-pm-pgo.ll [PM] Add pgo-memop-opt pass to the new pass manager 2017-10-23 22:21:29 +00:00
new-pm-thinlto-defaults.ll Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00
opt-O0-pipeline.ll [test] Allow for optional No-Op Barrier Pass in O0 pipeline 2018-03-23 12:47:54 +00:00
opt-O2-pipeline.ll [test] Try to unbreak hexagon bots after r328160. 2018-03-21 22:57:33 +00:00
opt-O3-pipeline.ll [test] Try to unbreak hexagon bots after r328160. 2018-03-21 22:57:33 +00:00
opt-Os-pipeline.ll [test] Try to unbreak hexagon bots after r328160. 2018-03-21 22:57:33 +00:00
opt-bisect-helper.py
opt-bisect-legacy-pass-manager.ll
opt-override-mcpu-mattr.ll
opt-twice.ll
optimization-remarks-inline.ll
optimization-remarks-invalidation.ll
optimization-remarks-lazy-bfi.ll
optimize-options.ll
pass-pipeline-parsing.ll
pass-pipelines.ll Re-commit : [PowerPC] Add handling for ColdCC calling convention and a pass to mark 2018-01-30 16:17:22 +00:00
pipefail.txt
pr32085.ll Simplify the CFG after loop pass cleanup. 2017-04-26 12:02:41 +00:00
print-module-scope.ll IR printing improvement for function passes - introducing -print-module-scope 2017-12-01 17:42:46 +00:00
spir_cc.ll
statistic.ll
umask.ll
writing-to-stdout.ll Bring back r297624. 2017-03-13 20:00:25 +00:00