[PATCH] D42251: [globalisel][legalizer] Adapt LegalizerInfo to support inter-type dependencies and other things.
Justin Bogner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 26 18:38:33 PST 2018
bogner accepted this revision.
bogner added a comment.
This revision is now accepted and ready to land.
This is looking pretty good. Let's get it in tree so people can start using it and we can iterate more based on feedback.
================
Comment at: include/llvm/CodeGen/GlobalISel/LegalizerInfo.h:348
+ },
+ LegalizeMutations::pick(TypeIdx, Ty));
+ }
----------------
dsanders wrote:
> reames wrote:
> > You might want to choose a different verb than "pick" here. Or at least, it isn't obvious from just reading the code what this does.
> One of my colleagues has said the same thing in person a couple days ago but I haven't come up with anything better yet. The intent is that it returns a mutation function that always returns the given typeidx and type.
I'd probably just go with "identity". It's not great, but I think it's clearer/more precise than pick.
================
Comment at: include/llvm/CodeGen/GlobalISel/LegalizerInfo.h:291-301
+#if 0
+ LegalizeRuleSet &lowerFor(std::initializer_list<LLT> Types) {
+ using namespace LegalityPredicates;
+ return lowerIf(typeInSet(0, Types));
+ }
+
+ LegalizeRuleSet &lowerFor(std::initializer_list<std::pair<LLT, LLT>> Types) {
----------------
Remove this for now, we can add it back when it's actually implemented.
https://reviews.llvm.org/D42251
More information about the llvm-commits
mailing list