31 bool preorder(
const IR::AssignmentStatement *)
override {
35 bool preorder(
const IR::MethodCallExpression *mc)
override {
40 if (refMap && typeMap) {
43 if (bm->name ==
"isValid") {
48 if (em->method->getAnnotation(IR::Annotation::noSideEffectsAnnotation))
return true;
55 bool preorder(
const IR::Primitive *)
override {
59 bool preorder(
const IR::Expression *)
override {
return !result; }
62 explicit hasSideEffects(
const IR::Expression *e) { e->apply(*
this); }
65 : refMap(rm), typeMap(tm) {
68 bool operator()(
const IR::Expression *e) {
73 explicit operator bool() {
return result; }
static MethodInstance * resolve(const IR::MethodCallExpression *mce, const DeclarationLookup *refMap, TypeMap *typeMap, bool useExpressionType=false, const Visitor::Context *ctxt=nullptr, bool incomplete=false)
Definition methodInstance.cpp:27