[PATCH] D38768: Add remarks describing when a pass changes the IR instruction count of a module
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 17 11:26:57 PDT 2018
paquette updated this revision to Diff 147357.
paquette added a comment.
A few changes here after running this on some more complicated code.
- I had entirely forgotten to implement it for loop passes in this patch. Added that. ("Why is instcombine making this module 50% bigger? Oh; it's loop unrolling.")
- `Changed` and `LocalChanged` aren't reliable for this sort of task. Removed the reliance on that from emitting remarks.
- Getting the initial size of the module at the entry to `runOnBlah` is unreliable due to missing initialization steps/passes. Moved this down to near where the remark is emitted.
- Added documentation to the test to explain what it's doing, what behaviour it tests, why/why not.
- Made the test enforce that instruction counts and deltas must be within a certain range, and not just any old number.
https://reviews.llvm.org/D38768
Files:
include/llvm/IR/Function.h
include/llvm/IR/LegacyPassManagers.h
include/llvm/IR/Module.h
lib/Analysis/CallGraphSCCPass.cpp
lib/Analysis/LoopPass.cpp
lib/IR/Function.cpp
lib/IR/LegacyPassManager.cpp
lib/IR/Module.cpp
test/Other/size-remarks.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38768.147357.patch
Type: text/x-patch
Size: 16456 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180517/64e6bab6/attachment.bin>
More information about the llvm-commits
mailing list