-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Description
| Bugzilla Link | 8991 |
| Version | trunk |
| OS | Linux |
| Reporter | LLVM Bugzilla Contributor |
| CC | @lattner |
Extended Description
Running the Early-CSE several times in succession results in more
simplifications than running it once, for example:
$ opt -disable-output -stats gcc.bc -early-cse
===-------------------------------------------------------------------------===
... Statistics Collected ...
===-------------------------------------------------------------------------===
24 early-cse - Number of call instructions CSE'd
190990 early-cse - Number of instructions CSE'd
68115 early-cse - Number of instructions simplified or DCE'd
44538 early-cse - Number of load instructions CSE'd
140 early-cse - Number of trivial dead stores removed
2 instsimplify - Number of expansions
31 instsimplify - Number of reassociations
$ opt -disable-output -stats gcc.bc -early-cse -early-cse -early-cse -early-cse -early-cse -early-cse -early-cse -early-cse -early-cse -early-cse -early-cse -early-cse -early-cse -early-cse -early-cse -early-cse -early-cse
===-------------------------------------------------------------------------===
... Statistics Collected ...
===-------------------------------------------------------------------------===
24 early-cse - Number of call instructions CSE'd
190993 early-cse - Number of instructions CSE'd
70166 early-cse - Number of instructions simplified or DCE'd
44587 early-cse - Number of load instructions CSE'd
176 early-cse - Number of trivial dead stores removed
18 instsimplify - Number of expansions
271 instsimplify - Number of reassociations
That's about a 3% increase in "Number of instructions simplified or DCE'd"
and a 25% increase in "Number of trivial dead stores removed".
My guess is that when an instruction is CSE'd/simplified, its uses are not
being revisited/recursively CSE'd/simplified. I think this can only occur
in loops when uses occur before the instruction.