Home | History | Annotate | Download | only in Utils

Lines Matching defs:New

1 //===- CodeExtractor.cpp - Pull code region into a new function -----------===//
11 // individual loop or a parallel section, into a new function, replacing it with
12 // a call to the new function.
218 // We only want to code extract the second block now, and it becomes the new
225 // Okay, update dominator sets. The blocks that dominate the new one are the
226 // blocks that dominate TIBB plus the new block itself.
231 // region to go to the new header block instead of the old header block.
246 // Create a new PHI node in the new region, which has an incoming value
269 BasicBlock *New = (*I)->splitBasicBlock(RI, (*I)->getName()+".ret");
271 // Old dominates New. New node dominates all other nodes dominated
279 DomTreeNode *NewNode = DT->addNewBlock(New, *I);
344 // Create the new function
349 // If the old function is no-throw, so is the new one.
369 RewriteVal = new LoadInst(GEP, "loadgep_" + inputs[i]->getName(), TI);
390 // Rewrite branches to basic blocks outside of the loop to new dummy blocks
391 // within the new function. This must be done before we lose track of which
396 // modify the branch target to a new block
424 // Emit a call to the new function, passing in: *pointer to struct (if
443 new AllocaInst((*i)->getType(), nullptr, (*i)->getName()+".loc",
460 new AllocaInst(StructArgTy, nullptr, "structArg",
472 StoreInst *SI = new StoreInst(StructValues[i], GEP);
502 LoadInst *load = new LoadInst(Output, outputs[i]->getName()+".reload");
518 // Since there may be multiple exits from the original region, make the new
532 // add a new basic block which returns the appropriate value
613 new StoreInst(outputs[out], GEP, NTRet);
615 new StoreInst(outputs[out], OAI, NTRet);
623 // rewrite the original branch instruction with this new target
683 // Insert this basic block into the new function
712 // The new function needs a root node because other nodes can branch to the
729 // Construct new function based on inputs/outputs & add allocas for all defs.
740 // references to the old incoming edge to be the new incoming edge.
770 //cerr << "NEW FUNCTION: " << *newFunction;