mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-04 05:31:51 +00:00
Tidy up a loop to be more idiomatic for LLVM's codebase, and remove some
extraneous whitespace. Trying to clean-up this pass as much as I can before I start making functional changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142780 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5679ec3b52
commit
22c8946239
@ -424,34 +424,25 @@ bool BranchProbabilityAnalysis::calcFloatingPointHeuristics(BasicBlock *BB) {
|
||||
}
|
||||
|
||||
bool BranchProbabilityAnalysis::runOnFunction(Function &F) {
|
||||
|
||||
for (Function::iterator I = F.begin(), E = F.end(); I != E; ) {
|
||||
BasicBlock *BB = I++;
|
||||
|
||||
if (calcMetadataWeights(BB))
|
||||
for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I) {
|
||||
if (calcMetadataWeights(I))
|
||||
continue;
|
||||
|
||||
if (calcLoopBranchHeuristics(BB))
|
||||
if (calcLoopBranchHeuristics(I))
|
||||
continue;
|
||||
|
||||
if (calcReturnHeuristics(BB))
|
||||
if (calcReturnHeuristics(I))
|
||||
continue;
|
||||
|
||||
if (calcPointerHeuristics(BB))
|
||||
if (calcPointerHeuristics(I))
|
||||
continue;
|
||||
|
||||
if (calcZeroHeuristics(BB))
|
||||
if (calcZeroHeuristics(I))
|
||||
continue;
|
||||
|
||||
calcFloatingPointHeuristics(BB);
|
||||
calcFloatingPointHeuristics(I);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void BranchProbabilityInfo::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired<LoopInfo>();
|
||||
AU.setPreservesAll();
|
||||
AU.addRequired<LoopInfo>();
|
||||
AU.setPreservesAll();
|
||||
}
|
||||
|
||||
bool BranchProbabilityInfo::runOnFunction(Function &F) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user