summaryrefslogtreecommitdiff
path: root/omegalib/code_gen/src/CG_suifRepr.cc
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2016-09-17 04:25:09 +0000
committerTuowen Zhao <ztuowen@gmail.com>2016-09-17 04:25:09 +0000
commit2e88432af2303327fa504cb452ee0a580e066f03 (patch)
treed51367aba3c360a4e8ab5e0f55642c1d8a96eb7b /omegalib/code_gen/src/CG_suifRepr.cc
parent7717fda8cdb8499514407238c4822914f6bb9e5f (diff)
downloadchill-2e88432af2303327fa504cb452ee0a580e066f03.tar.gz
chill-2e88432af2303327fa504cb452ee0a580e066f03.tar.bz2
chill-2e88432af2303327fa504cb452ee0a580e066f03.zip
Further cleanup
Diffstat (limited to 'omegalib/code_gen/src/CG_suifRepr.cc')
-rw-r--r--omegalib/code_gen/src/CG_suifRepr.cc81
1 files changed, 0 insertions, 81 deletions
diff --git a/omegalib/code_gen/src/CG_suifRepr.cc b/omegalib/code_gen/src/CG_suifRepr.cc
deleted file mode 100644
index f4f987d..0000000
--- a/omegalib/code_gen/src/CG_suifRepr.cc
+++ /dev/null
@@ -1,81 +0,0 @@
-/*****************************************************************************
- Copyright (C) 2008 University of Southern California.
- All Rights Reserved.
-
- Purpose:
- omega holder for suif implementaion
-
- Notes:
-
- History:
- 02/01/06 - Chun Chen - created
-*****************************************************************************/
-
-#include <code_gen/CG_suifRepr.h>
-#include <stdio.h>
-
-namespace omega {
-
-CG_suifRepr::CG_suifRepr(): tnl_(NULL), op_() {
-}
-
-CG_suifRepr::CG_suifRepr(tree_node_list *tnl): tnl_(tnl),op_() {
-}
-
-CG_suifRepr::CG_suifRepr(operand op): tnl_(NULL), op_(op) {
-}
-
-CG_suifRepr::~CG_suifRepr() {
- // delete nothing here. operand or tree_node_list should already be
- // grafted to other expression tree or statement list
-}
-
-CG_outputRepr* CG_suifRepr::clone() {
- if (!op_.is_null() ) {
- operand op = op_.clone();
- return new CG_suifRepr(op);
- }
- else if (tnl_ != NULL) {
- tree_node_list *tnl = tnl_->clone();
- return new CG_suifRepr(tnl);
- }
- else
- return new CG_suifRepr();
-}
-
-void CG_suifRepr::clear() {
- if (!op_.is_null()) {
- if (op_.is_instr())
- delete op_.instr();
- op_.set_null();
- }
- else if (tnl_ != NULL) {
- delete tnl_;
- tnl_ = NULL;
- }
-}
-
-tree_node_list* CG_suifRepr::GetCode() const {
- return tnl_;
-}
-
-operand CG_suifRepr::GetExpression() const {
- return op_;
-}
-
-void CG_suifRepr::Dump() const {
- if (tnl_ != NULL)
- tnl_->print();
- else if (!op_.is_null())
- op_.print();
-}
-
-void CG_suifRepr::DumpToFile(FILE *fp) const {
- if (tnl_ != NULL)
- tnl_->print(fp);
- else if (!op_.is_null())
- op_.print(fp);
-}
-
-
-} // namespace