"llvm/lib/git@repo.hca.bsc.es:rferrer/llvm-epi-0.8.git" did not exist on "ba3fa6c6e15d0db6205a52f2f080bad10f093430"
Newer
Older
RepeatInstruction = processMemMove(M);
else if (CallSite CS = (Value*)I) {
for (unsigned i = 0, e = CS.arg_size(); i != e; ++i)
Nick Lewycky
committed
if (CS.isByValArgument(i))
MadeChange |= processByValArgument(CS, i);
}
// Reprocess the instruction if desired.
if (RepeatInstruction) {
Chris Lattner
committed
if (BI != BB->begin()) --BI;
MadeChange = true;
Owen Anderson
committed
}
}
Owen Anderson
committed
}
// MemCpyOpt::runOnFunction - This is the main transformation entry point for a
// function.
//
bool MemCpyOpt::runOnFunction(Function &F) {
if (skipOptnoneFunction(F))
return false;
bool MadeChange = false;
MD = &getAnalysis<MemoryDependenceAnalysis>();
DataLayoutPass *DLP = getAnalysisIfAvailable<DataLayoutPass>();
DL = DLP ? &DLP->getDataLayout() : 0;
TLI = &getAnalysis<TargetLibraryInfo>();
// If we don't have at least memset and memcpy, there is little point of doing
// anything here. These are required by a freestanding implementation, so if
// even they are disabled, there is no point in trying hard.
if (!TLI->has(LibFunc::memset) || !TLI->has(LibFunc::memcpy))
return false;
while (1) {
if (!iterateOnFunction(F))
break;
MadeChange = true;
}
return MadeChange;
}