MEGAPATCH checkin.

For details, See: docs/2002-06-25-MegaPatchInfo.txt


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2779 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2002-06-25 16:13:24 +00:00
parent 0b12b5f50e
commit 7e70829632
80 changed files with 2899 additions and 1730 deletions
+5 -7
View File
@@ -42,7 +42,7 @@ namespace {
struct PiNodeInserter : public FunctionPass {
const char *getPassName() const { return "Pi Node Insertion"; }
virtual bool runOnFunction(Function *F);
virtual bool runOnFunction(Function &F);
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.preservesCFG();
@@ -61,11 +61,10 @@ namespace {
Pass *createPiNodeInsertionPass() { return new PiNodeInserter(); }
bool PiNodeInserter::runOnFunction(Function *F) {
bool PiNodeInserter::runOnFunction(Function &F) {
bool Changed = false;
for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I) {
BasicBlock *BB = *I;
TerminatorInst *TI = BB->getTerminator();
for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I) {
TerminatorInst *TI = I->getTerminator();
// FIXME: Insert PI nodes for switch statements too
@@ -112,8 +111,7 @@ bool PiNodeInserter::runOnFunction(Function *F) {
}
// alreadyHasPiNodeFor - Return true if there is already a Pi node in BB for
// V.
// alreadyHasPiNodeFor - Return true if there is already a Pi node in BB for V.
static bool alreadyHasPiNodeFor(Value *V, BasicBlock *BB) {
for (Value::use_iterator I = V->use_begin(), E = V->use_end(); I != E; ++I)
if (PHINode *PN = dyn_cast<PHINode>(*I))