summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2017-01-26 16:54:04 -0700
committerTuowen Zhao <ztuowen@gmail.com>2017-01-26 16:54:04 -0700
commit699e49d2b1d0c3eca680bfc19e79aa8406f42d6a (patch)
treed7a63e1ca794ea83675dd9caaa308e76cd883840
parente36a3da23b104174084093882f939820dc4470e9 (diff)
downloadchill-699e49d2b1d0c3eca680bfc19e79aa8406f42d6a.tar.gz
chill-699e49d2b1d0c3eca680bfc19e79aa8406f42d6a.tar.bz2
chill-699e49d2b1d0c3eca680bfc19e79aa8406f42d6a.zip
bugfixesHEADclang
-rw-r--r--examples/test_datacopy.py12
-rw-r--r--lib/parserel/src/parseRel.cc2
-rw-r--r--src/ast/node.cpp1
-rwxr-xr-xsrc/ir_chill.cc1
4 files changed, 13 insertions, 3 deletions
diff --git a/examples/test_datacopy.py b/examples/test_datacopy.py
new file mode 100644
index 0000000..12246ef
--- /dev/null
+++ b/examples/test_datacopy.py
@@ -0,0 +1,12 @@
+from chill import *
+
+source('mm.c')
+procedure('mm')
+#format: rose
+loop(0)
+
+known('ambn == 100')
+known('an == 100')
+known('bm == 100')
+
+datacopy(1,3,'C')
diff --git a/lib/parserel/src/parseRel.cc b/lib/parserel/src/parseRel.cc
index 43d7494..2c37138 100644
--- a/lib/parserel/src/parseRel.cc
+++ b/lib/parserel/src/parseRel.cc
@@ -63,7 +63,7 @@ simap_t* make_cond_item_add(simap_t* lhs, simap_t* rhs) {
simap_t* make_cond_item_sub(simap_t* lhs, simap_t* rhs) {
for(simap_t::iterator it = lhs->begin(); it != lhs->end(); it++)
- (*rhs)[it->first] -= it->second;
+ (*rhs)[it->first] = it->second - (*rhs)[it->first];
delete lhs;
return rhs;
}
diff --git a/src/ast/node.cpp b/src/ast/node.cpp
index cad5f4c..53b39e4 100644
--- a/src/ast/node.cpp
+++ b/src/ast/node.cpp
@@ -102,7 +102,6 @@ void chillAST_Node::replaceChild(chillAST_Node *old, chillAST_Node *newchild) {
}
}
CHILL_ERROR("Replace Child Falure, oldchild not a child\n");
- exit(-1);
};
void chillAST_Node::loseLoopWithLoopVar(char *var) {
diff --git a/src/ir_chill.cc b/src/ir_chill.cc
index 8ff9ed1..74f8306 100755
--- a/src/ir_chill.cc
+++ b/src/ir_chill.cc
@@ -1141,7 +1141,6 @@ void IR_clangCode::ReplaceExpression(IR_Ref *old, omega::CG_outputRepr *repr) {
CHILL_ERROR("IR_clangCode::ReplaceExpression() old has no parent ??\n");
exit(-1);
}
-
CASE->getParent()->replaceChild(CASE, newthing);
} else if (typeid(*old) == typeid(IR_chillScalarRef)) {