diff --git a/hpvm/include/SupportHPVM/HPVMUtils.h b/hpvm/include/SupportHPVM/HPVMUtils.h index 9a91494a41d6109cda8a8b9b885919fd197fb768..781306956dad0eacc85eadaaf60be4c8ce0e7b21 100644 --- a/hpvm/include/SupportHPVM/HPVMUtils.h +++ b/hpvm/include/SupportHPVM/HPVMUtils.h @@ -404,6 +404,7 @@ bool tagIncludesTarget(hpvm::Target Tag, hpvm::Target T) { return false; default: assert(false && "Unknown Target\n"); + return false; // What kind of compiler doesn't know this is unreachable?! } } diff --git a/hpvm/lib/Transforms/BuildDFG/BuildDFG.cpp b/hpvm/lib/Transforms/BuildDFG/BuildDFG.cpp index 7ebdc39c28bdd49c193c5ae980439439178492a3..e7293a0640b5d7e45614459ed9687768998142a4 100644 --- a/hpvm/lib/Transforms/BuildDFG/BuildDFG.cpp +++ b/hpvm/lib/Transforms/BuildDFG/BuildDFG.cpp @@ -58,19 +58,7 @@ bool BuildDFG::runOnModule(Module &M) { Roots.push_back(Root); BuildGraph(Root, F); - for (DFGraph::children_iterator i = Root->getChildGraph()->begin(), - e = Root->getChildGraph()->end(); - i != e; i++) { - DFNode *N = *i; - // DEBUG(errs() << "\t" << N->getFuncPointer()->getName() << "\n"); - } Root->getChildGraph()->sortChildren(); - for (DFGraph::children_iterator i = Root->getChildGraph()->begin(), - e = Root->getChildGraph()->end(); - i != e; i++) { - DFNode *N = *i; - // DEBUG(errs() << "\t" << N->getFuncPointer()->getName() << "\n"); - } viewDFGraph(Root->getChildGraph()); } } diff --git a/hpvm/lib/Transforms/DFG2LLVM_CPU/DFG2LLVM_CPU.cpp b/hpvm/lib/Transforms/DFG2LLVM_CPU/DFG2LLVM_CPU.cpp index a44b79b3fe20cb52383ff7458466a72d041b90fc..d5904bd83c0eadcbdd912a79443bd7126acc36c5 100644 --- a/hpvm/lib/Transforms/DFG2LLVM_CPU/DFG2LLVM_CPU.cpp +++ b/hpvm/lib/Transforms/DFG2LLVM_CPU/DFG2LLVM_CPU.cpp @@ -283,30 +283,6 @@ void CGT_CPU::addWhileLoop(Instruction *CondBlockStart, Instruction *BodyStart, ReplaceInstWithInst(WhileBody->getTerminator(), UnconditionalBranch); } -Instruction *CGT_CPU::addWhileLoopCounter(BasicBlock *Entry, BasicBlock *Cond, - BasicBlock *Body) { - Module *M = Entry->getParent()->getParent(); - Type *Int64Ty = Type::getInt64Ty(M->getContext()); - - // Insert a PHI instruction at the beginning of the condition block - Instruction *IB = Cond->getFirstNonPHI(); - PHINode *CounterPhi = PHINode::Create(Int64Ty, 2, "cnt", IB); - - ConstantInt *IConst = - ConstantInt::get(Type::getInt64Ty(M->getContext()), 1, true); - Instruction *CounterIncr = - BinaryOperator::CreateNSW(Instruction::BinaryOps::Add, CounterPhi, IConst, - "cnt_incr", Body->getTerminator()); - - // Set incoming values for Phi node - IConst = ConstantInt::get(Type::getInt64Ty(M->getContext()), 0, true); - CounterPhi->addIncoming(IConst, Entry); - CounterPhi->addIncoming(CounterIncr, Body); - - // Return the pointer to the created PHI node in the corresponding argument - return CounterPhi; -} - /* Add Loop around the instruction I * Algorithm: * (1) Split the basic block of instruction I into three parts, where the diff --git a/hpvm/lib/Transforms/DFG2LLVM_CUDNN/DFG2LLVM_CUDNN.cpp b/hpvm/lib/Transforms/DFG2LLVM_CUDNN/DFG2LLVM_CUDNN.cpp index 4653ad0f8a4c4ddd8d76e984b1750d9f94d813a9..0559e8136da6bff441e3c1fb0b948bcaaeb954ee 100644 --- a/hpvm/lib/Transforms/DFG2LLVM_CUDNN/DFG2LLVM_CUDNN.cpp +++ b/hpvm/lib/Transforms/DFG2LLVM_CUDNN/DFG2LLVM_CUDNN.cpp @@ -540,9 +540,6 @@ void CGT_CUDNN::codeGen(DFLeafNode *N) { case Intrinsic::hpvm_node_id: { /* llvm.hpvm.node.id */ DEBUG(errs() << F_cudnn->getName() << "\t: Handling Node ID Intrinsic \n"); - // Get uint32 argument - Value *Op = II->getOperand(0); - // Argument list for the runtime call std::vector<Value *> Args; Args.push_back(II->getOperand(0)); diff --git a/hpvm/projects/hpvm-tensor-rt/soc_simulator/promise_timing_model.cpp b/hpvm/projects/hpvm-tensor-rt/soc_simulator/promise_timing_model.cpp index 87150f45a3a967443a947cf1b95b0e8d6fbae842..5bcd8173a5966888d89238cd94c50484cd719a69 100644 --- a/hpvm/projects/hpvm-tensor-rt/soc_simulator/promise_timing_model.cpp +++ b/hpvm/projects/hpvm-tensor-rt/soc_simulator/promise_timing_model.cpp @@ -27,7 +27,7 @@ Scratchpad::Scratchpad(const bool enable, const unsigned size, const double dram_latency, const double dram_bandwidth) - : enable_(enable), dram_(dram_latency, dram_bandwidth) { + : dram_(dram_latency, dram_bandwidth), enable_(enable) { num_lines_ = size / line_size; lines_.resize(num_lines_); @@ -78,7 +78,7 @@ std::pair<double, double> Scratchpad::access(const unsigned address, // Keep reading line by line until everything is read while (num_bytes_remaining > 0) { - if (lines_[getIndex(addr)] == address) { + if ((unsigned) lines_[getIndex(addr)] == address) { // Hit hits++; } else {