return isEqualImpl(M);
}
- /// isSafeToReorderWithPatternPredicate - Return true if it is safe to sink a
- /// PatternPredicate node past this one.
- virtual bool isSafeToReorderWithPatternPredicate() const {
- return false;
- }
-
/// isSimplePredicateNode - Return true if this is a simple predicate that
/// operates on the node or its children without potential side effects or a
/// change of the current node.
return N->getKind() == RecordNode;
}
- bool isSafeToReorderWithPatternPredicate() const override { return true; }
private:
void printImpl(raw_ostream &OS, unsigned indent) const override;
bool isEqualImpl(const Matcher *M) const override { return true; }
return N->getKind() == RecordChild;
}
- bool isSafeToReorderWithPatternPredicate() const override { return true; }
-
private:
void printImpl(raw_ostream &OS, unsigned indent) const override;
bool isEqualImpl(const Matcher *M) const override {
return N->getKind() == RecordMemRef;
}
- bool isSafeToReorderWithPatternPredicate() const override { return true; }
-
private:
void printImpl(raw_ostream &OS, unsigned indent) const override;
bool isEqualImpl(const Matcher *M) const override { return true; }
return N->getKind() == CaptureGlueInput;
}
- bool isSafeToReorderWithPatternPredicate() const override { return true; }
-
private:
void printImpl(raw_ostream &OS, unsigned indent) const override;
bool isEqualImpl(const Matcher *M) const override { return true; }
return N->getKind() == MoveChild;
}
- bool isSafeToReorderWithPatternPredicate() const override { return true; }
-
private:
void printImpl(raw_ostream &OS, unsigned indent) const override;
bool isEqualImpl(const Matcher *M) const override {
return N->getKind() == MoveParent;
}
- bool isSafeToReorderWithPatternPredicate() const override { return true; }
-
private:
void printImpl(raw_ostream &OS, unsigned indent) const override;
bool isEqualImpl(const Matcher *M) const override { return true; }
return N->getKind() == CheckSame;
}
- bool isSafeToReorderWithPatternPredicate() const override { return true; }
-
private:
void printImpl(raw_ostream &OS, unsigned indent) const override;
bool isEqualImpl(const Matcher *M) const override {
return N->getKind() == CheckChildSame;
}
- bool isSafeToReorderWithPatternPredicate() const override { return true; }
-
private:
void printImpl(raw_ostream &OS, unsigned indent) const override;
bool isEqualImpl(const Matcher *M) const override {
return N->getKind() == CheckPatternPredicate;
}
- bool isSafeToReorderWithPatternPredicate() const override { return true; }
-
private:
void printImpl(raw_ostream &OS, unsigned indent) const override;
bool isEqualImpl(const Matcher *M) const override {
return N->getKind() == CheckPredicate;
}
- // TODO: Ok?
- //virtual bool isSafeToReorderWithPatternPredicate() const { return true; }
-
private:
void printImpl(raw_ostream &OS, unsigned indent) const override;
bool isEqualImpl(const Matcher *M) const override {
return N->getKind() == CheckOpcode;
}
- bool isSafeToReorderWithPatternPredicate() const override { return true; }
-
private:
void printImpl(raw_ostream &OS, unsigned indent) const override;
bool isEqualImpl(const Matcher *M) const override;
return N->getKind() == CheckType;
}
- bool isSafeToReorderWithPatternPredicate() const override { return true; }
-
private:
void printImpl(raw_ostream &OS, unsigned indent) const override;
bool isEqualImpl(const Matcher *M) const override {
return N->getKind() == CheckChildType;
}
- bool isSafeToReorderWithPatternPredicate() const override { return true; }
-
private:
void printImpl(raw_ostream &OS, unsigned indent) const override;
bool isEqualImpl(const Matcher *M) const override {
return N->getKind() == CheckInteger;
}
- bool isSafeToReorderWithPatternPredicate() const override { return true; }
-
private:
void printImpl(raw_ostream &OS, unsigned indent) const override;
bool isEqualImpl(const Matcher *M) const override {
return N->getKind() == CheckChildInteger;
}
- bool isSafeToReorderWithPatternPredicate() const override { return true; }
-
private:
void printImpl(raw_ostream &OS, unsigned indent) const override;
bool isEqualImpl(const Matcher *M) const override {
return N->getKind() == CheckCondCode;
}
- bool isSafeToReorderWithPatternPredicate() const override { return true; }
-
private:
void printImpl(raw_ostream &OS, unsigned indent) const override;
bool isEqualImpl(const Matcher *M) const override {
return N->getKind() == CheckValueType;
}
- bool isSafeToReorderWithPatternPredicate() const override { return true; }
-
private:
void printImpl(raw_ostream &OS, unsigned indent) const override;
bool isEqualImpl(const Matcher *M) const override {
return N->getKind() == CheckComplexPat;
}
- // Not safe to move a pattern predicate past a complex pattern.
- bool isSafeToReorderWithPatternPredicate() const override { return false; }
-
private:
void printImpl(raw_ostream &OS, unsigned indent) const override;
bool isEqualImpl(const Matcher *M) const override {
return N->getKind() == CheckAndImm;
}
- bool isSafeToReorderWithPatternPredicate() const override { return true; }
-
private:
void printImpl(raw_ostream &OS, unsigned indent) const override;
bool isEqualImpl(const Matcher *M) const override {
return N->getKind() == CheckOrImm;
}
- bool isSafeToReorderWithPatternPredicate() const override { return true; }
-
private:
void printImpl(raw_ostream &OS, unsigned indent) const override;
bool isEqualImpl(const Matcher *M) const override {
return N->getKind() == CheckFoldableChainNode;
}
- bool isSafeToReorderWithPatternPredicate() const override { return true; }
-
private:
void printImpl(raw_ostream &OS, unsigned indent) const override;
bool isEqualImpl(const Matcher *M) const override { return true; }