[PATCH] D14945: Expose isXxxConstant() functions from TargetLowering base class (NFC)
A. Skrobov via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 24 15:50:31 PST 2015
tyomitch added a comment.
In http://reviews.llvm.org/D14945#296197, @MatzeB wrote:
> 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.
That would require qualifying each invocation with a `ConstantSDNode::`, which is a bit of a mouthful...
Would it be reasonable to define a new class in TargetLowering.h with the four static methods, and to inherit the six affected TargetLowerings, as well as DAGCombiner, from the new class?
http://reviews.llvm.org/D14945
More information about the llvm-commits
mailing list