From f27e01a039195c379fd6716c4870858789941365 Mon Sep 17 00:00:00 2001 From: Tuowen Zhao Date: Thu, 22 Sep 2016 12:11:16 -0600 Subject: new debug interface --- src/chill.cc | 4 ++-- src/chillmodule.cc | 2 +- src/ir_clang.cc | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/chill.cc b/src/chill.cc index b91d383..a3ad57f 100644 --- a/src/chill.cc +++ b/src/chill.cc @@ -28,7 +28,7 @@ std::vector loops; //--- int main( int argc, char* argv[] ) { - DEBUG_PRINT("%s main()\n", argv[0]); + CHILL_DEBUG_PRINT("%s main()\n", argv[0]); if (argc > 2) { fprintf(stderr, "Usage: %s [script_file]\n", argv[0]); exit(-1); @@ -74,7 +74,7 @@ int main( int argc, char* argv[] ) int lnum_end; lnum_start = get_loop_num_start(); lnum_end = get_loop_num_end(); - DEBUG_PRINT("calling ROSE code gen? loop num %d\n", lnum); + CHILL_DEBUG_PRINT("calling ROSE code gen? loop num %d\n", lnum_start); delete ir_code; } Py_Finalize(); diff --git a/src/chillmodule.cc b/src/chillmodule.cc index fa6e001..5a7d575 100644 --- a/src/chillmodule.cc +++ b/src/chillmodule.cc @@ -771,7 +771,7 @@ static void register_globals(PyObject* m) { PyMODINIT_FUNC initchill(void) // pass C methods to python { - DEBUG_PRINT("in C, initchill() to set up C methods to be called from python\n"); + CHILL_DEBUG_PRINT("in C, initchill() to set up C methods to be called from python\n"); PyObject* m = Py_InitModule("chill", ChillMethods); register_globals(m); } diff --git a/src/ir_clang.cc b/src/ir_clang.cc index 0157436..16deff3 100755 --- a/src/ir_clang.cc +++ b/src/ir_clang.cc @@ -41,6 +41,7 @@ History: #include "code_gen/CG_chillRepr.h" #include "code_gen/CG_chillBuilder.h" #include +#include #include "chill_ast.hh" @@ -2473,6 +2474,7 @@ IR_ArrayRef *IR_clangCode::CreateArrayRef(const IR_ArraySymbol *sym, std::vector // now we've got the vardecl AND the indeces to make a chillAST that represents the array reference // TODO Passing NULL for chillAST node? + CHILL_DEBUG_PRINT("Passed NULL as chillAST node"); chillAST_ArraySubscriptExpr *ASE = new chillAST_ArraySubscriptExpr( vd, inds, NULL); auto ref = new IR_chillArrayRef( this, ASE, 0 ); -- cgit v1.2.3-70-g09d2