SSAUpdater.cpp (198396) | SSAUpdater.cpp (200581) |
---|---|
1//===- SSAUpdater.cpp - Unstructured SSA Update Tool ----------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 281 unchanged lines hidden (view full) --- 290 OldVal->replaceAllUsesWith(SingularValue); 291 else 292 OldVal->replaceAllUsesWith(UndefValue::get(InsertedVal->getType())); 293 OldVal->eraseFromParent(); 294 } else { 295 InsertedVal = SingularValue; 296 } 297 | 1//===- SSAUpdater.cpp - Unstructured SSA Update Tool ----------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 281 unchanged lines hidden (view full) --- 290 OldVal->replaceAllUsesWith(SingularValue); 291 else 292 OldVal->replaceAllUsesWith(UndefValue::get(InsertedVal->getType())); 293 OldVal->eraseFromParent(); 294 } else { 295 InsertedVal = SingularValue; 296 } 297 |
298 // Either path through the 'if' should have set insertedVal -> SingularVal. 299 assert((InsertedVal == SingularValue || isa<UndefValue>(InsertedVal)) && 300 "RAUW didn't change InsertedVal to be SingularVal"); 301 |
|
298 // Drop the entries we added in IncomingPredInfo to restore the stack. 299 IncomingPredInfo.erase(IncomingPredInfo.begin()+FirstPredInfoEntry, 300 IncomingPredInfo.end()); | 302 // Drop the entries we added in IncomingPredInfo to restore the stack. 303 IncomingPredInfo.erase(IncomingPredInfo.begin()+FirstPredInfoEntry, 304 IncomingPredInfo.end()); |
301 return InsertedVal; | 305 return SingularValue; |
302 } 303 304 // Otherwise, we do need a PHI: insert one now if we don't already have one. 305 if (InsertedVal == 0) 306 InsertedVal = PHINode::Create(PrototypeValue->getType(), 307 PrototypeValue->getName(), &BB->front()); 308 309 PHINode *InsertedPHI = cast<PHINode>(InsertedVal); --- 27 unchanged lines hidden --- | 306 } 307 308 // Otherwise, we do need a PHI: insert one now if we don't already have one. 309 if (InsertedVal == 0) 310 InsertedVal = PHINode::Create(PrototypeValue->getType(), 311 PrototypeValue->getName(), &BB->front()); 312 313 PHINode *InsertedPHI = cast<PHINode>(InsertedVal); --- 27 unchanged lines hidden --- |