From a58aa3512ac976a6495b47bad177d01fb9823db3 Mon Sep 17 00:00:00 2001
From: akashk4 <akashk4@illinois.edu>
Date: Wed, 8 Jan 2020 19:29:56 -0600
Subject: [PATCH] Fixing minor errors in DFG2LLVM.h

---
 hpvm/include/SupportVISC/DFG2LLVM.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/hpvm/include/SupportVISC/DFG2LLVM.h b/hpvm/include/SupportVISC/DFG2LLVM.h
index bf250dd5d3..439b630754 100644
--- a/hpvm/include/SupportVISC/DFG2LLVM.h
+++ b/hpvm/include/SupportVISC/DFG2LLVM.h
@@ -379,9 +379,8 @@ Function *CodeGenTraversal::addIdxDimArgs(Function* F) {
   Function *newF;
   for (int i = 0; i < 6; ++i) {
     newF = addArgument(F, Type::getInt64Ty(F->getContext()), names[i]);
-    ArgTypes.push_back(new_arg->getType());
     F->replaceAllUsesWith(UndefValue::get(F->getType()));
-   // F->eraseFromParent();
+    F->eraseFromParent();
     F = newF;
   }
   errs() << "Function Type after adding args: " << *newF->getFunctionType() << "\n";
@@ -453,7 +452,7 @@ void CodeGenTraversal::initTimerAPI() {
 // Timer Routines
 // Initialize the timer set
 void CodeGenTraversal::initializeTimerSet(Instruction* InsertBefore) {
-  DEBUG(errs() << "Inserting call to: " << *llvm_visc_initializeTimerSet << "\n");
+ //DEBUG(errs() << "Inserting call to: " << *llvm_visc_initializeTimerSet << "\n");
   TIMER(TimerSet = new GlobalVariable(M,
                                       Type::getInt8PtrTy(M.getContext()),
                                       false,
-- 
GitLab