hanchenye-llvm-project/llvm/test/Other
Jessica Paquette e49374d009 Add remarks describing when a pass changes the IR instruction count of a module
This patch adds a remark which tells the user when a pass changes the number of
IR instructions in a module.

It can be enabled by using -Rpass-analysis=size-info.

The point of this is to make it easier to collect statistics on how passes
modify programs in terms of code size. This is similar in concept to timing
reports, but using a remark-based interface makes it easy to diff changes over
multiple compilations of the same program.

By adding functionality like this, we can see
  * Which passes impact code size the most
  * How passes impact code size at different optimization levels
  * Which pass might have contributed the most to an overall code size
    regression

The patch lives in the legacy pass manager, but since it's simply emitting
remarks, it shouldn't be too difficult to adapt the functionality to the new
pass manager as well. This can also be adapted to handle MachineInstr counts in
code gen passes.

https://reviews.llvm.org/D38768

llvm-svn: 332739
2018-05-18 17:26:39 +00:00
..
Inputs Rename invariant.group.barrier to launder.invariant.group 2018-05-03 11:03:01 +00:00
X86
2002-01-31-CallGraph.ll
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
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-earlycse.ll [EarlyCSE] Add debug counter for debugging mis-optimizations. NFC. 2018-04-06 18:47:33 +00:00
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
launder.invariant.group.ll Rename invariant.group.barrier to launder.invariant.group 2018-05-03 11:03:01 +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 [NewPM] Emit inliner NoDefinition missed optimization remark 2018-05-08 01:45:46 +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 [NewPM] Emit inliner NoDefinition missed optimization remark 2018-05-08 01:45:46 +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 [lit] Fix several Python 2/3 compatibility issues and tests 2018-04-07 00:21:28 +00:00
opt-override-mcpu-mattr.ll
opt-twice.ll
optimization-remarks-inline.ll
optimization-remarks-invalidation.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
optimization-remarks-lazy-bfi.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
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 Use no-op opt run to eliminate the difference in bb pred comment, per chandler's suggestion. It is better than using sed on portability. 2018-05-01 17:19:25 +00:00
print-module-scope.ll IR printing improvement for function passes - introducing -print-module-scope 2017-12-01 17:42:46 +00:00
size-remarks.ll Add remarks describing when a pass changes the IR instruction count of a module 2018-05-18 17:26:39 +00:00
spir_cc.ll
statistic.ll
umask.ll
writing-to-stdout.ll