wrap long lines

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36807 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2007-05-05 22:32:24 +00:00
parent 5e14b0d3e6
commit d717c1859a
3 changed files with 15 additions and 14 deletions

View File

@ -353,9 +353,9 @@ bool CEE::TransformRegion(BasicBlock *BB, std::set<BasicBlock*> &VisitedBlocks){
// //
std::vector<BasicBlock*> children; std::vector<BasicBlock*> children;
EF->getChildren(BB, children); EF->getChildren(BB, children);
if (!RI.empty()) { // Time opt: only propagate if we can change something if (!RI.empty()) { // Time opt: only propagate if we can change something
for (std::vector<BasicBlock*>::iterator CI = children.begin(), E = children.end(); for (std::vector<BasicBlock*>::iterator CI = children.begin(),
CI != E; ++CI) { E = children.end(); CI != E; ++CI) {
assert(RegionInfoMap.find(*CI) == RegionInfoMap.end() && assert(RegionInfoMap.find(*CI) == RegionInfoMap.end() &&
"RegionInfo should be calculated in dominanace order!"); "RegionInfo should be calculated in dominanace order!");
getRegionInfo(*CI) = RI; getRegionInfo(*CI) = RI;
@ -383,8 +383,8 @@ bool CEE::TransformRegion(BasicBlock *BB, std::set<BasicBlock*> &VisitedBlocks){
} }
// Now that all of our successors have information, recursively process them. // Now that all of our successors have information, recursively process them.
for (std::vector<BasicBlock*>::iterator CI = children.begin(), E = children.end(); for (std::vector<BasicBlock*>::iterator CI = children.begin(),
CI != E; ++CI) E = children.end(); CI != E; ++CI)
Changed |= TransformRegion(*CI, VisitedBlocks); Changed |= TransformRegion(*CI, VisitedBlocks);
return Changed; return Changed;

View File

@ -6419,7 +6419,7 @@ Instruction *InstCombiner::commonPointerCastTransforms(CastInst &CI) {
Offset += TySize; Offset += TySize;
assert(Offset >= 0); assert(Offset >= 0);
} }
assert((uint64_t)Offset < (uint64_t)TySize && "Out of range offset"); assert((uint64_t)Offset < (uint64_t)TySize &&"Out of range offset");
} }
NewIndices.push_back(ConstantInt::get(IntPtrTy, FirstIdx)); NewIndices.push_back(ConstantInt::get(IntPtrTy, FirstIdx));
@ -6932,8 +6932,8 @@ Instruction *InstCombiner::visitBitCast(BitCastInst &CI) {
if (Instruction *V = PromoteCastOfAllocation(CI, *AI)) if (Instruction *V = PromoteCastOfAllocation(CI, *AI))
return V; return V;
// If the source and destination are pointers, and this cast is equivalent to // If the source and destination are pointers, and this cast is equivalent
// a getelementptr X, 0, 0, 0... turn it into the appropriate getelementptr. // to a getelementptr X, 0, 0, 0... turn it into the appropriate gep.
// This can enhance SROA and other transforms that want type-safe pointers. // This can enhance SROA and other transforms that want type-safe pointers.
Constant *ZeroUInt = Constant::getNullValue(Type::Int32Ty); Constant *ZeroUInt = Constant::getNullValue(Type::Int32Ty);
unsigned NumZeros = 0; unsigned NumZeros = 0;
@ -8973,15 +8973,15 @@ bool InstCombiner::SimplifyStoreAtEndOfBlock(StoreInst &SI) {
if (!OtherStore || OtherStore->getOperand(1) != SI.getOperand(1)) if (!OtherStore || OtherStore->getOperand(1) != SI.getOperand(1))
return false; return false;
} else { } else {
// Otherwise, the other block ended with a conditional branch. If one of the // Otherwise, the other block ended with a conditional branch. If one of the
// destinations is StoreBB, then we have the if/then case. // destinations is StoreBB, then we have the if/then case.
if (OtherBr->getSuccessor(0) != StoreBB && if (OtherBr->getSuccessor(0) != StoreBB &&
OtherBr->getSuccessor(1) != StoreBB) OtherBr->getSuccessor(1) != StoreBB)
return false; return false;
// Okay, we know that OtherBr now goes to Dest and StoreBB, so this is an // Okay, we know that OtherBr now goes to Dest and StoreBB, so this is an
// if/then triangle. See if there is a store to the same ptr as SI that lives // if/then triangle. See if there is a store to the same ptr as SI that
// in OtherBB. // lives in OtherBB.
for (;; --BBI) { for (;; --BBI) {
// Check to see if we find the matching store. // Check to see if we find the matching store.
if ((OtherStore = dyn_cast<StoreInst>(BBI))) { if ((OtherStore = dyn_cast<StoreInst>(BBI))) {
@ -8989,8 +8989,8 @@ bool InstCombiner::SimplifyStoreAtEndOfBlock(StoreInst &SI) {
return false; return false;
break; break;
} }
// If we find something that may be using the stored value, or if we run out // If we find something that may be using the stored value, or if we run
// of instructions, we can't do the xform. // out of instructions, we can't do the xform.
if (isa<LoadInst>(BBI) || BBI->mayWriteToMemory() || if (isa<LoadInst>(BBI) || BBI->mayWriteToMemory() ||
BBI == OtherBB->begin()) BBI == OtherBB->begin())
return false; return false;

View File

@ -55,7 +55,8 @@ namespace {
if (!F.isDeclaration()) { if (!F.isDeclaration()) {
//give us a clean block //give us a clean block
BasicBlock* bbold = &F.getEntryBlock(); BasicBlock* bbold = &F.getEntryBlock();
BasicBlock* bbnew = new BasicBlock("allocablock", &F, &F.getEntryBlock()); BasicBlock* bbnew = new BasicBlock("allocablock", &F,
&F.getEntryBlock());
new BranchInst(bbold, bbnew); new BranchInst(bbold, bbnew);
//find the instructions //find the instructions