Skip to content
Snippets Groups Projects
Commit d3670c76 authored by Vir Narula's avatar Vir Narula Committed by Yifan Zhao
Browse files

Add update debug statements

parent 641618d5
No related branches found
No related tags found
No related merge requests found
...@@ -291,6 +291,7 @@ Function *CodeGenTraversal::addArgument(Function *F, Type *Ty, ...@@ -291,6 +291,7 @@ Function *CodeGenTraversal::addArgument(Function *F, Type *Ty,
// Return new function with additional index and limit arguments. // Return new function with additional index and limit arguments.
// The original function is removed from the module and erased. // The original function is removed from the module and erased.
Function *CodeGenTraversal::addIdxDimArgs(Function *F) { Function *CodeGenTraversal::addIdxDimArgs(Function *F) {
DEBUG(errs() << "Adding dimension and limit arguments to Function: " << F->getName());
DEBUG(errs() << "Function Type: " << *F->getFunctionType() << "\n"); DEBUG(errs() << "Function Type: " << *F->getFunctionType() << "\n");
// Add Index and Dim arguments // Add Index and Dim arguments
std::string names[] = {"idx_x", "idx_y", "idx_z", "dim_x", "dim_y", "dim_z"}; std::string names[] = {"idx_x", "idx_y", "idx_z", "dim_x", "dim_y", "dim_z"};
......
...@@ -175,14 +175,15 @@ void replaceNodeFunctionInIR(Module &M, Function *F, Function *G) { ...@@ -175,14 +175,15 @@ void replaceNodeFunctionInIR(Module &M, Function *F, Function *G) {
continue; continue;
// Otherwise, replace F with G // Otherwise, replace F with G
DEBUG(errs() << *G->getType() << "\n"); DEBUG(errs() << "Fixing use: " << *CI << "\n");
DEBUG(errs() << *CI->getArgOperand(1)->getType() << "\n"); DEBUG(errs() << "in function: " << Func.getName() << "\n");
CI->setArgOperand(1, G); CI->setArgOperand(1, G);
DEBUG(errs() << "Fixed use: " << *CI << "\n");
} }
} }
for (auto I : toBeErased) { for (auto I : toBeErased) {
DEBUG(errs() << "\tErasing " << *I << "\n"); DEBUG(errs() << "\tErasing Instruction: " << *I << "\n");
I->eraseFromParent(); I->eraseFromParent();
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment