LLVM API Documentation

Public Member Functions | |
| CodeExtractor (DominatorTree *dt=0, bool AggArgs=false) | |
| Function * | ExtractCodeRegion (const std::vector< BasicBlock * > &code) |
| bool | isEligible (const std::vector< BasicBlock * > &code) |
|
||||||||||||
|
Definition at line 52 of file CodeExtractor.cpp. References AggregateArgsOpt. |
|
|
ExtractRegion - Removes a loop from a function, replaces it with a call to new function. Returns pointer to the new function. algorithm: find inputs and outputs for the region for inputs: add to function as args, map input instr* to arg# for outputs: add allocas for scalars, add to func as args, map output instr* to arg# rewrite func to use argument #s instead of instr* for each scalar output in the function: at every exit, store intermediate computed result back into memory. Definition at line 608 of file CodeExtractor.cpp. References DEBUG, llvm::PHINode::getIncomingBlock(), llvm::BasicBlock::getInstList(), llvm::PHINode::getNumIncomingValues(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), isEligible(), llvm::pred_begin(), llvm::pred_end(), llvm::pred_iterator, llvm::PHINode::removeIncomingValue(), llvm::PHINode::setIncomingBlock(), llvm::succ_begin(), llvm::succ_end(), and llvm::verifyFunction(). |
|
|
Definition at line 705 of file CodeExtractor.cpp. References llvm::CallInst::getCalledFunction(), and llvm::Function::getIntrinsicID(). Referenced by ExtractCodeRegion(). |