You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[mandatory-combine] Eliminate trivially dead instructions aggressively when compiling with opts.
When originally made, the thought behind mandatory combine was that at -Onone,
we are at the end of the pipeline so we are going to be destroying our module
anyways, so there is no reason to delete dead instructions.
We are also running it at -O, -Osize, so why not eliminate these instructions
when we prepare for sil optimizations! So I put in some conditional code that
causes us to delete trivial instructions as we set up our worklist and if one
pops off the worklist during traversal.
The reason why I am doing this is that I realized that I do not want to use
SILGenCleanup to test InstSimplify code. In fact, I do not want any of my RAUW
code to be emitted by SILGenCleanup since I don't want to disturb the codegen of
the early passes so I don't have to update a bunch of tests = (. So instead, I
am going to use mandatory combine for this purpose and doing this cleans up the
tests a little bit. It also will just eliminate a bunch of early unnecessary
code as well.
0 commit comments