[PATCH] D14945: Expose isXxxConstant() functions from TargetLowering base class (NFC)
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 24 14:54:26 PST 2015
MatzeB added a comment.
In http://reviews.llvm.org/D14945#296141, @tyomitch wrote:
> In http://reviews.llvm.org/D14945#296046, @MatzeB wrote:
>
> > I agree that the code here could be shared.
> > However TargetLoweringBase provides an interface to customizing the lowering process for a specific target. I do not believe it is the right place for common lowering code.
>
>
> Thanks Matthias!
>
> Do you have any suggestions where to put it?
I don't have a really good answer as there is no existing header/class that I would describe as containing shared utility functions for lowering
and adding a new header just for these 4 functions here seems overkill.
The best thing I can think of right now is adding something like "static bool isOneConstant(SDValue Value)" to the ConstantSDNode class.
http://reviews.llvm.org/D14945
More information about the llvm-commits
mailing list