[PATCH] D75207: GlobalISel: Move Localizer::shouldLocalize(..) to TargetLowering

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 28 13:33:16 PST 2020


aemerson accepted this revision.
aemerson added a comment.
This revision is now accepted and ready to land.

In D75207#1896372 <https://reviews.llvm.org/D75207#1896372>, @volkan wrote:

> In D75207#1894581 <https://reviews.llvm.org/D75207#1894581>, @aemerson wrote:
>
> > The change itself is ok but is there any way to have more granular overriding of this behavior, instead of overriding the whole shouldLocalize()?
>
>
> We can have two functions (one for checking the opcode and another one for the cost), but this doesn't allow targets to localize target specific instruction. That's why I decided move the whole thing to TargetLowering. Do you think having two targets hooks would be better?


I suppose this is fine, overriding implementations can just call this base class version if the opcode is something they don't want to override.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75207





More information about the llvm-commits mailing list