1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Const-ify some parameters, and some cosmetic cleanups. No functionality

change.

llvm-svn: 35842
This commit is contained in:
Owen Anderson 2007-04-09 22:54:50 +00:00
parent 148566d2e3
commit 3d132f812a

View File

@ -675,7 +675,7 @@ void LoopSimplify::InsertUniqueBackedgeBlock(Loop *L) {
// Returns true if BasicBlock A dominates at least one block in vector B
// Helper function for UpdateDomInfoForRevectoredPreds
static bool BlockDominatesAny(BasicBlock* A, std::vector<BasicBlock*>& B, ETForest& ETF) {
static bool BlockDominatesAny(BasicBlock* A, const std::vector<BasicBlock*>& B, const ETForest& ETF) {
for (std::vector<BasicBlock*>::iterator BI = B.begin(), BE = B.end(); BI != BE; ++BI) {
if (ETF.dominates(A, *BI))
return true;
@ -858,6 +858,7 @@ void LoopSimplify::UpdateDomInfoForRevectoredPreds(BasicBlock *NewBB,
// Only consider dominators of NewBBSucc
if (!DFI->second.count(NewBBSucc)) continue;
if (BlockDominatesAny(FI, PredBlocks, ETF)) {
// If NewBBSucc should not stay in our dominator frontier, remove it.
// We remove it unless there is a predecessor of NewBBSucc that we