22 bool functionModified =
false;
29 if (allocaInst && isa<ConstantInt>(allocaInst->
getArraySize())) {
31 functionModified =
true;
36 return functionModified;
41 X(
"alloca-hoisting",
"Hoisting alloca instructions in non-entry "
42 "blocks to the entry block");
const_iterator end(StringRef path)
Get end iterator over path.
virtual bool runOnFunction(Function &function)
enable_if_c<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
FunctionPass * createAllocaHoisting()
const Value * getArraySize() const
void moveBefore(Instruction *MovePos)
static RegisterPass< NVPTXAllocaHoisting > X("alloca-hoisting","Hoisting alloca instructions in non-entry ""blocks to the entry block")