[SelectionDAG] Make isConstantIntBuildVectorOrConstantInt and isConstantFPBuildVectorOrConstantFP methods const.
This commit is contained in:
parent
edde2eb1d2
commit
f9ef3a6003
@ -1959,14 +1959,14 @@ public:
|
||||
}
|
||||
|
||||
/// Test whether the given value is a constant int or similar node.
|
||||
SDNode *isConstantIntBuildVectorOrConstantInt(SDValue N);
|
||||
SDNode *isConstantIntBuildVectorOrConstantInt(SDValue N) const;
|
||||
|
||||
/// Test whether the given value is a constant FP or similar node.
|
||||
SDNode *isConstantFPBuildVectorOrConstantFP(SDValue N);
|
||||
SDNode *isConstantFPBuildVectorOrConstantFP(SDValue N) const ;
|
||||
|
||||
/// \returns true if \p N is any kind of constant or build_vector of
|
||||
/// constants, int or float. If a vector, it may not necessarily be a splat.
|
||||
inline bool isConstantValueOfAnyType(SDValue N) {
|
||||
inline bool isConstantValueOfAnyType(SDValue N) const {
|
||||
return isConstantIntBuildVectorOrConstantInt(N) ||
|
||||
isConstantFPBuildVectorOrConstantFP(N);
|
||||
}
|
||||
|
||||
@ -10068,7 +10068,7 @@ bool ShuffleVectorSDNode::isSplatMask(const int *Mask, EVT VT) {
|
||||
|
||||
// Returns the SDNode if it is a constant integer BuildVector
|
||||
// or constant integer.
|
||||
SDNode *SelectionDAG::isConstantIntBuildVectorOrConstantInt(SDValue N) {
|
||||
SDNode *SelectionDAG::isConstantIntBuildVectorOrConstantInt(SDValue N) const {
|
||||
if (isa<ConstantSDNode>(N))
|
||||
return N.getNode();
|
||||
if (ISD::isBuildVectorOfConstantSDNodes(N.getNode()))
|
||||
@ -10085,7 +10085,7 @@ SDNode *SelectionDAG::isConstantIntBuildVectorOrConstantInt(SDValue N) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
SDNode *SelectionDAG::isConstantFPBuildVectorOrConstantFP(SDValue N) {
|
||||
SDNode *SelectionDAG::isConstantFPBuildVectorOrConstantFP(SDValue N) const {
|
||||
if (isa<ConstantFPSDNode>(N))
|
||||
return N.getNode();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user