mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-27 14:24:40 +00:00
Use MCSymbols for FastISel.
The summary is that it moves the mangling earlier and replaces a few calls to .addExternalSymbol with addSym. I originally wanted to replace all the uses of addExternalSymbol with addSym, but noticed it was a lot of work and doesn't need to be done all at once. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240395 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -69,7 +69,7 @@ public:
|
||||
unsigned NumFixedArgs;
|
||||
CallingConv::ID CallConv;
|
||||
const Value *Callee;
|
||||
const char *SymName;
|
||||
MCSymbol *Symbol;
|
||||
ArgListTy Args;
|
||||
ImmutableCallSite *CS;
|
||||
MachineInstr *Call;
|
||||
@ -88,7 +88,7 @@ public:
|
||||
: RetTy(nullptr), RetSExt(false), RetZExt(false), IsVarArg(false),
|
||||
IsInReg(false), DoesNotReturn(false), IsReturnValueUsed(true),
|
||||
IsTailCall(false), NumFixedArgs(-1), CallConv(CallingConv::C),
|
||||
Callee(nullptr), SymName(nullptr), CS(nullptr), Call(nullptr),
|
||||
Callee(nullptr), Symbol(nullptr), CS(nullptr), Call(nullptr),
|
||||
ResultReg(0), NumResultRegs(0), IsPatchPoint(false) {}
|
||||
|
||||
CallLoweringInfo &setCallee(Type *ResultTy, FunctionType *FuncTy,
|
||||
@ -114,12 +114,12 @@ public:
|
||||
}
|
||||
|
||||
CallLoweringInfo &setCallee(Type *ResultTy, FunctionType *FuncTy,
|
||||
const char *Target, ArgListTy &&ArgsList,
|
||||
MCSymbol *Target, ArgListTy &&ArgsList,
|
||||
ImmutableCallSite &Call,
|
||||
unsigned FixedArgs = ~0U) {
|
||||
RetTy = ResultTy;
|
||||
Callee = Call.getCalledValue();
|
||||
SymName = Target;
|
||||
Symbol = Target;
|
||||
|
||||
IsInReg = Call.paramHasAttr(0, Attribute::InReg);
|
||||
DoesNotReturn = Call.doesNotReturn();
|
||||
@ -148,11 +148,16 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
CallLoweringInfo &setCallee(CallingConv::ID CC, Type *ResultTy,
|
||||
CallLoweringInfo &setCallee(const DataLayout &DL, MCContext &Ctx,
|
||||
CallingConv::ID CC, Type *ResultTy,
|
||||
const char *Target, ArgListTy &&ArgsList,
|
||||
unsigned FixedArgs = ~0U);
|
||||
|
||||
CallLoweringInfo &setCallee(CallingConv::ID CC, Type *ResultTy,
|
||||
MCSymbol *Target, ArgListTy &&ArgsList,
|
||||
unsigned FixedArgs = ~0U) {
|
||||
RetTy = ResultTy;
|
||||
SymName = Target;
|
||||
Symbol = Target;
|
||||
CallConv = CC;
|
||||
Args = std::move(ArgsList);
|
||||
NumFixedArgs = (FixedArgs == ~0U) ? Args.size() : FixedArgs;
|
||||
@ -504,7 +509,9 @@ protected:
|
||||
|
||||
CmpInst::Predicate optimizeCmpPredicate(const CmpInst *CI) const;
|
||||
|
||||
bool lowerCallTo(const CallInst *CI, const char *SymName, unsigned NumArgs);
|
||||
bool lowerCallTo(const CallInst *CI, MCSymbol *Symbol, unsigned NumArgs);
|
||||
bool lowerCallTo(const CallInst *CI, const char *SymbolName,
|
||||
unsigned NumArgs);
|
||||
bool lowerCallTo(CallLoweringInfo &CLI);
|
||||
|
||||
bool isCommutativeIntrinsic(IntrinsicInst const *II) {
|
||||
|
Reference in New Issue
Block a user