This is an archive of the discontinued LLVM Phabricator instance.

[LCSSA] Remove redundant check
AbandonedPublic

Authored by davide on Apr 5 2017, 3:17 PM.

Details

Summary

formLCSSA checks that the set of exit block is not empty, and then calls formLCSSAForInstructions which does the same check again.
AFAICT there's nothing changing the set of exit blocks in the meanwhile, making the second check redundant.

Diff Detail

Event Timeline

davide created this revision.Apr 5 2017, 3:17 PM
mzolotukhin edited edge metadata.Apr 5 2017, 3:46 PM

Can you verify that by inserting an assertion there?

One thing that I'm not 100% sure there is that we might be looking at different loops in formLCSSA and formLCSSAForInstructions. In the latter we might look at subloops as far as I can tell.

Michael

davide abandoned this revision.Apr 5 2017, 4:30 PM

Can you verify that by inserting an assertion there?

One thing that I'm not 100% sure there is that we might be looking at different loops in formLCSSA and formLCSSAForInstructions. In the latter we might look at subloops as far as I can tell.

Michael

Nevermind, I read the code again and I realized we actually can call that on subloops.