From e64b57c1b50fdeea8dbc1ddbc5e5ffc3c8c8a887 Mon Sep 17 00:00:00 2001 From: Lucas Kramer Date: Wed, 15 Apr 2020 11:53:35 -0500 Subject: [PATCH] Revert "Allow for rewriting of for loops resulting from extension forwards" This reverts commit a8e43c9ea9d2086469c214e06adb7d65c4018c58. --- .../abstractsyntax/IterStmt.sv | 41 +------------------ 1 file changed, 1 insertion(+), 40 deletions(-) diff --git a/grammars/edu.umn.cs.melt.exts.ableC.halide/abstractsyntax/IterStmt.sv b/grammars/edu.umn.cs.melt.exts.ableC.halide/abstractsyntax/IterStmt.sv index 27108fc..9afadc1 100644 --- a/grammars/edu.umn.cs.melt.exts.ableC.halide/abstractsyntax/IterStmt.sv +++ b/grammars/edu.umn.cs.melt.exts.ableC.halide/abstractsyntax/IterStmt.sv @@ -18,7 +18,7 @@ top::Stmt ::= s::Stmt t::Transformation ppConcat([pp"transform ", braces(nestlines(2, s.pp)), pp" by ", braces(nestlines(2, t.pp))]); top.functionDefs := []; - local normalizedS::Stmt = rewriteWith(normalizeLoops, s.hostStmts).fromJust; + local normalizedS::Stmt = rewriteWith(normalizeLoops, new(s)).fromJust; normalizedS.env = s.env; normalizedS.returnType = s.returnType; @@ -40,45 +40,6 @@ top::Stmt ::= s::Stmt t::Transformation else transResult.hostTrans; } --- Translate away extensions that forward down to for loops before applying rewrites -synthesized attribute hostStmts::Stmt occurs on Stmt; - -aspect default production -top::Stmt ::= -{ - top.hostStmts = top; -} - -aspect production seqStmt -top::Stmt ::= h::Stmt t::Stmt -{ - propagate hostStmts; -} - -aspect production compoundStmt -top::Stmt ::= s::Stmt -{ - propagate hostStmts; -} - -aspect production forDeclStmt -top::Stmt ::= i::Decl c::MaybeExpr s::MaybeExpr b::Stmt -{ - propagate hostStmts; -} - -aspect production ifStmt -top::Stmt ::= c::Expr t::Stmt e::Stmt -{ - propagate hostStmts; -} - -aspect production decStmt -top::Stmt ::= s::Decorated Stmt -{ - top.hostStmts = s.hostStmts; -} - function rename s:Strategy ::= n1::String n2::String {