llvm.org GIT mirror llvm / 30aef42
Use the new interface, simplifies code Delete a bunch of commented out code git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8240 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 16 years ago
1 changed file(s) with 4 addition(s) and 43 deletion(s). Raw diff Collapse all Expand all
2626 static void getTriggerCode(Module *M, BasicBlock *BB, int MethNo, Value *pathNo,
2727 Value *cnt, Instruction *rInst){
2828
29 vector args;
30 //args.push_back(PointerType::get(Type::SByteTy));
31 args.push_back(Type::IntTy);
32 args.push_back(Type::IntTy);
33 //args.push_back(Type::IntTy);
34 args.push_back(PointerType::get(Type::IntTy));
35 args.push_back(PointerType::get(Type::IntTy));
36 const FunctionType *MTy = FunctionType::get(Type::VoidTy, args, false);
37
3829 vector tmpVec;
3930 tmpVec.push_back(Constant::getNullValue(Type::LongTy));
4031 tmpVec.push_back(Constant::getNullValue(Type::LongTy));
4132 Instruction *Idx = new GetElementPtrInst(cnt, tmpVec, "");//,
4233 BB->getInstList().push_back(Idx);
4334
44 Function *trigMeth = M->getOrInsertFunction("trigger", MTy);
35 const Type *PIntTy = PointerType::get(Type::IntTy);
36 Function *trigMeth = M->getOrInsertFunction("trigger", Type::VoidTy,
37 Type::IntTy, Type::IntTy,
38 PIntTy, PIntTy, 0);
4539 assert(trigMeth && "trigger method could not be inserted!");
4640
4741 vector trargs;
276270
277271 //store uint 0, uint *%R
278272 new StoreInst(Int0, rVar, here);
279
280 //insert initialize function for initializing
281 //vector inCountArgs;
282 //inCountArgs.push_back(PointerType::get(Type::IntTy));
283 //inCountArgs.push_back(Type::IntTy);
284
285 //const FunctionType *cFty = FunctionType::get(Type::VoidTy, inCountArgs,
286 // false);
287 //Function *inCountMth = front->getParent()->getParent()->getOrInsertFunction("llvmInitializeCounter", cFty);
288 //assert(inCountMth && "Initialize method could not be inserted!");
289
290 //vector iniArgs;
291 //iniArgs.push_back(countVar);
292 //iniArgs.push_back(ConstantSInt::get(Type::IntTy, k));
293 //new CallInst(inCountMth, iniArgs, "", here);
294
295 /*
296 if(front->getParent()->getName() == "main"){
297 //intialize threshold
298 vector initialize_args;
299 initialize_args.push_back(PointerType::get(Type::IntTy));
300
301 const FunctionType *Fty = FunctionType::get(Type::VoidTy, initialize_args,
302 false);
303 Function *initialMeth = front->getParent()->getParent()->getOrInsertFunction("reoptimizerInitialize", Fty);
304 assert(initialMeth && "Initialize method could not be inserted!");
305
306 vector trargs;
307 trargs.push_back(threshold);
308
309 new CallInst(initialMeth, trargs, "", here);
310 }
311 */
312273 }
313274
314275