mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user