mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Method.h no longer includes BasicBlock.h
Method::inst_* is now in llvm/Support/InstIterator.h GraphTraits specializations for BasicBlock and Methods are now in llvm/Support/CFG.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1746 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
#include "llvm/Target/MachineFrameInfo.h"
|
||||
#include "llvm/Target/MachineCacheInfo.h"
|
||||
#include "llvm/Method.h"
|
||||
#include "llvm/BasicBlock.h"
|
||||
#include "llvm/iOther.h"
|
||||
#include <limits.h>
|
||||
|
||||
@ -56,11 +57,11 @@ ComputeMaxOptionalArgsSize(const TargetMachine& target, const Method* method)
|
||||
|
||||
unsigned int maxSize = 0;
|
||||
|
||||
for (Method::const_inst_iterator I=method->inst_begin(),E=method->inst_end();
|
||||
I != E; ++I)
|
||||
if ((*I)->getOpcode() == Instruction::Call)
|
||||
{
|
||||
CallInst* callInst = cast<CallInst>(*I);
|
||||
for (Method::const_iterator MI=method->begin(), ME=method->end();
|
||||
MI != ME; ++MI) {
|
||||
const BasicBlock *BB = *MI;
|
||||
for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); I != E; ++I)
|
||||
if (CallInst *callInst = dyn_cast<CallInst>(*I)) {
|
||||
unsigned int numOperands = callInst->getNumOperands() - 1;
|
||||
int numExtra = (int) numOperands - frameInfo.getNumFixedOutgoingArgs();
|
||||
if (numExtra <= 0)
|
||||
@ -84,7 +85,7 @@ ComputeMaxOptionalArgsSize(const TargetMachine& target, const Method* method)
|
||||
if (maxSize < sizeForThisCall)
|
||||
maxSize = sizeForThisCall;
|
||||
}
|
||||
|
||||
}
|
||||
return maxSize;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user