This is an archive of the discontinued LLVM Phabricator instance.

use register iterators that include self to reduce code duplication in CriticalAntiDepBreaker
ClosedPublic

Authored by spatel on Jul 17 2014, 10:27 AM.

Details

Summary

This patch addresses 2 FIXME comments that I added to CriticalAntiDepBreaker while fixing PR20020.

I've initialized an MCSubRegIterator and an MCRegAliasIterator to include the self reg.

Assuming that works as advertised, there should be functional difference with this patch, just less code.

Diff Detail

Repository
rL LLVM

Event Timeline

spatel updated this revision to Diff 11589.Jul 17 2014, 10:27 AM
spatel retitled this revision from to use register iterators that include self to reduce code duplication in CriticalAntiDepBreaker.
spatel updated this object.
spatel edited the test plan for this revision. (Show Details)
spatel added reviewers: atrick, hfinkel.
spatel added a subscriber: Unknown Object (MLST).
atrick accepted this revision.Aug 5 2014, 9:55 PM
atrick edited edge metadata.

Looks like a good cleanup. Thanks.

Although the assert looks like nonsense to me. Can you see any purpose for it? Please either explain it or remove it.

This revision is now accepted and ready to land.Aug 5 2014, 9:55 PM
spatel added a comment.Aug 6 2014, 9:02 AM

Thanks for looking this over!
Yes, those asserts look bogus - the only way they could fire is if Count is ~0u since we're setting both Kills and Defs right ahead of the asserts. I'll remove them.

spatel closed this revision.Aug 6 2014, 9:07 AM
spatel updated this revision to Diff 12237.

Closed by commit rL214973 (authored by @spatel).