This is an archive of the discontinued LLVM Phabricator instance.

DAG: Add helper for creating shifts with correct type
ClosedPublic

Authored by arsenm on Jul 9 2018, 1:22 AM.

Details

Reviewers
bogner

Diff Detail

Event Timeline

arsenm created this revision.Jul 9 2018, 1:22 AM

I'm not really a fan of the LegalTypes boolean; it's just asking for people to pass the wrong value. Can we just check whether the type is legal, or something like that?

bogner accepted this revision.Sep 20 2018, 5:29 PM

Patch LGTM.

I'm not really a fan of the LegalTypes boolean; it's just asking for people to pass the wrong value. Can we just check whether the type is legal, or something like that?

I agree the LegalTypes boolean isn't ideal, but it isn't actually being introduced here (getShiftAmount already had it) so I don't see that conversation as blocking for this change.

lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
571

Mark what the boolean argument is please (ie, /*LegalTypes=*/false or so)

This revision is now accepted and ready to land.Sep 20 2018, 5:29 PM
arsenm closed this revision.Feb 21 2019, 7:38 PM

r354649