From abfea1f388dbb576ef424c6f9e6a3d769cd08451 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Mon, 12 Dec 2016 07:40:46 -0800 Subject: [PATCH] feat(library/compiler/cse): ignore 0-ary macros during common subexpression elimination --- src/library/compiler/cse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/library/compiler/cse.cpp b/src/library/compiler/cse.cpp index e2d7edebef..e9e3cef68c 100644 --- a/src/library/compiler/cse.cpp +++ b/src/library/compiler/cse.cpp @@ -74,7 +74,7 @@ class cse_fn : public compiler_step_visitor { virtual void visit_macro(expr const & e) override { if (check_visited(e)) return; - add_candidate(e); + if (macro_num_args(e) > 0) add_candidate(e); for (unsigned i = 0; i < macro_num_args(e); i++) visit(macro_arg(e, i)); }