[PATCH] D57243: GlobalISel: Allow bitcount ops to have different result type

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 5 10:06:21 PST 2019


dsanders added a comment.

In D57243#1385507 <https://reviews.llvm.org/D57243#1385507>, @qcolombet wrote:

> >   Personally, I'd like to replace the LegalizationAction with a function pointer that just performs the desired change and have a standard library of actions that can be called for the common changes. 
>
> @dsanders didn't we try something like that for ISel and the performance was terrible?


You're thinking of the hundreds-thousands of single-use lambdas that were generated. It was the ugly temporary code that was used to inject multiple statements inside an if-statement condition and looked like this:

  if ([&](...) {
      if (!...) return false;
      if (!...) return false;
      if (!...) return false;
      if (!...) return false;
      return true;
      }(Arg1, Arg2)) {
        ...
  }

The legalizer is already done the way I'm talking about on the rule matching side and performance was marginally better on average than the old setAction() interface.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57243/new/

https://reviews.llvm.org/D57243





More information about the llvm-commits mailing list