forked from OSchip/llvm-project
				
			Fix some formatting, and use inLoop() when appropriate.
llvm-svn: 28694
This commit is contained in:
		
							parent
							
								
									9e81c1bb03
								
							
						
					
					
						commit
						ac601b4c4b
					
				| 
						 | 
					@ -78,7 +78,8 @@ namespace {
 | 
				
			||||||
                                  
 | 
					                                  
 | 
				
			||||||
    /// inLoop - returns true if the given block is within the current loop
 | 
					    /// inLoop - returns true if the given block is within the current loop
 | 
				
			||||||
    const bool inLoop(BasicBlock* B) {
 | 
					    const bool inLoop(BasicBlock* B) {
 | 
				
			||||||
           return std::binary_search(LoopBlocks.begin(), LoopBlocks.end(), B); }
 | 
					      return std::binary_search(LoopBlocks.begin(), LoopBlocks.end(), B);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  RegisterOpt<LCSSA> X("lcssa", "Loop-Closed SSA Form Pass");
 | 
					  RegisterOpt<LCSSA> X("lcssa", "Loop-Closed SSA Form Pass");
 | 
				
			||||||
| 
						 | 
					@ -242,8 +243,7 @@ SetVector<Instruction*> LCSSA::getLoopValuesUsedOutsideLoop(Loop *L) {
 | 
				
			||||||
      for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); UI != E;
 | 
					      for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); UI != E;
 | 
				
			||||||
           ++UI) {
 | 
					           ++UI) {
 | 
				
			||||||
        BasicBlock *UserBB = cast<Instruction>(*UI)->getParent();
 | 
					        BasicBlock *UserBB = cast<Instruction>(*UI)->getParent();
 | 
				
			||||||
        if (!std::binary_search(LoopBlocks.begin(), LoopBlocks.end(), UserBB))
 | 
					        if (!inLoop(UserBB)) {
 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          AffectedValues.insert(I);
 | 
					          AffectedValues.insert(I);
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue