mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-27 02:31:09 +00:00
[SystemZ] Remove "virtual" from override methods
Also fix a couple of cases where "override" was missing. No behavioural change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203110 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0c3682a402
commit
abe768029b
@ -162,7 +162,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Token operands
|
// Token operands
|
||||||
virtual bool isToken() const override {
|
bool isToken() const override {
|
||||||
return Kind == KindToken;
|
return Kind == KindToken;
|
||||||
}
|
}
|
||||||
StringRef getToken() const {
|
StringRef getToken() const {
|
||||||
@ -171,13 +171,13 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Register operands.
|
// Register operands.
|
||||||
virtual bool isReg() const override {
|
bool isReg() const override {
|
||||||
return Kind == KindReg;
|
return Kind == KindReg;
|
||||||
}
|
}
|
||||||
bool isReg(RegisterKind RegKind) const {
|
bool isReg(RegisterKind RegKind) const {
|
||||||
return Kind == KindReg && Reg.Kind == RegKind;
|
return Kind == KindReg && Reg.Kind == RegKind;
|
||||||
}
|
}
|
||||||
virtual unsigned getReg() const override {
|
unsigned getReg() const override {
|
||||||
assert(Kind == KindReg && "Not a register");
|
assert(Kind == KindReg && "Not a register");
|
||||||
return Reg.Num;
|
return Reg.Num;
|
||||||
}
|
}
|
||||||
@ -189,7 +189,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Immediate operands.
|
// Immediate operands.
|
||||||
virtual bool isImm() const override {
|
bool isImm() const override {
|
||||||
return Kind == KindImm;
|
return Kind == KindImm;
|
||||||
}
|
}
|
||||||
bool isImm(int64_t MinValue, int64_t MaxValue) const {
|
bool isImm(int64_t MinValue, int64_t MaxValue) const {
|
||||||
@ -201,7 +201,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Memory operands.
|
// Memory operands.
|
||||||
virtual bool isMem() const override {
|
bool isMem() const override {
|
||||||
return Kind == KindMem;
|
return Kind == KindMem;
|
||||||
}
|
}
|
||||||
bool isMem(RegisterKind RegKind, MemoryKind MemKind) const {
|
bool isMem(RegisterKind RegKind, MemoryKind MemKind) const {
|
||||||
@ -221,9 +221,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Override MCParsedAsmOperand.
|
// Override MCParsedAsmOperand.
|
||||||
virtual SMLoc getStartLoc() const override { return StartLoc; }
|
SMLoc getStartLoc() const override { return StartLoc; }
|
||||||
virtual SMLoc getEndLoc() const override { return EndLoc; }
|
SMLoc getEndLoc() const override { return EndLoc; }
|
||||||
virtual void print(raw_ostream &OS) const override;
|
void print(raw_ostream &OS) const override;
|
||||||
|
|
||||||
// Used by the TableGen code to add particular types of operand
|
// Used by the TableGen code to add particular types of operand
|
||||||
// to an instruction.
|
// to an instruction.
|
||||||
@ -340,18 +340,16 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Override MCTargetAsmParser.
|
// Override MCTargetAsmParser.
|
||||||
virtual bool ParseDirective(AsmToken DirectiveID) override;
|
bool ParseDirective(AsmToken DirectiveID) override;
|
||||||
virtual bool ParseRegister(unsigned &RegNo, SMLoc &StartLoc,
|
bool ParseRegister(unsigned &RegNo, SMLoc &StartLoc, SMLoc &EndLoc) override;
|
||||||
SMLoc &EndLoc) override;
|
bool ParseInstruction(ParseInstructionInfo &Info,
|
||||||
virtual bool
|
StringRef Name, SMLoc NameLoc,
|
||||||
ParseInstruction(ParseInstructionInfo &Info,
|
SmallVectorImpl<MCParsedAsmOperand*> &Operands)
|
||||||
StringRef Name, SMLoc NameLoc,
|
override;
|
||||||
SmallVectorImpl<MCParsedAsmOperand*> &Operands) override;
|
bool MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
|
||||||
virtual bool
|
SmallVectorImpl<MCParsedAsmOperand*> &Operands,
|
||||||
MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
|
MCStreamer &Out, unsigned &ErrorInfo,
|
||||||
SmallVectorImpl<MCParsedAsmOperand*> &Operands,
|
bool MatchingInlineAsm) override;
|
||||||
MCStreamer &Out, unsigned &ErrorInfo,
|
|
||||||
bool MatchingInlineAsm) override;
|
|
||||||
|
|
||||||
// Used by the TableGen code to parse particular operand types.
|
// Used by the TableGen code to parse particular operand types.
|
||||||
OperandMatchResultTy
|
OperandMatchResultTy
|
||||||
|
@ -27,12 +27,10 @@ public:
|
|||||||
virtual ~SystemZDisassembler() {}
|
virtual ~SystemZDisassembler() {}
|
||||||
|
|
||||||
// Override MCDisassembler.
|
// Override MCDisassembler.
|
||||||
virtual DecodeStatus getInstruction(MCInst &instr,
|
DecodeStatus getInstruction(MCInst &instr, uint64_t &size,
|
||||||
uint64_t &size,
|
const MemoryObject ®ion, uint64_t address,
|
||||||
const MemoryObject ®ion,
|
raw_ostream &vStream,
|
||||||
uint64_t address,
|
raw_ostream &cStream) const override;
|
||||||
raw_ostream &vStream,
|
|
||||||
raw_ostream &cStream) const override;
|
|
||||||
};
|
};
|
||||||
} // end anonymous namespace
|
} // end anonymous namespace
|
||||||
|
|
||||||
|
@ -38,9 +38,8 @@ public:
|
|||||||
static void printOperand(const MCOperand &MO, raw_ostream &O);
|
static void printOperand(const MCOperand &MO, raw_ostream &O);
|
||||||
|
|
||||||
// Override MCInstPrinter.
|
// Override MCInstPrinter.
|
||||||
virtual void printRegName(raw_ostream &O, unsigned RegNo) const override;
|
void printRegName(raw_ostream &O, unsigned RegNo) const override;
|
||||||
virtual void printInst(const MCInst *MI, raw_ostream &O,
|
void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot) override;
|
||||||
StringRef Annot) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Print various types of operand.
|
// Print various types of operand.
|
||||||
|
@ -43,28 +43,25 @@ public:
|
|||||||
: OSABI(osABI) {}
|
: OSABI(osABI) {}
|
||||||
|
|
||||||
// Override MCAsmBackend
|
// Override MCAsmBackend
|
||||||
virtual unsigned getNumFixupKinds() const override {
|
unsigned getNumFixupKinds() const override {
|
||||||
return SystemZ::NumTargetFixupKinds;
|
return SystemZ::NumTargetFixupKinds;
|
||||||
}
|
}
|
||||||
virtual const MCFixupKindInfo &
|
const MCFixupKindInfo &getFixupKindInfo(MCFixupKind Kind) const override;
|
||||||
getFixupKindInfo(MCFixupKind Kind) const override;
|
void applyFixup(const MCFixup &Fixup, char *Data, unsigned DataSize,
|
||||||
virtual void applyFixup(const MCFixup &Fixup, char *Data, unsigned DataSize,
|
uint64_t Value) const override;
|
||||||
uint64_t Value) const override;
|
bool mayNeedRelaxation(const MCInst &Inst) const override {
|
||||||
virtual bool mayNeedRelaxation(const MCInst &Inst) const override {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
virtual bool fixupNeedsRelaxation(const MCFixup &Fixup,
|
bool fixupNeedsRelaxation(const MCFixup &Fixup, uint64_t Value,
|
||||||
uint64_t Value,
|
const MCRelaxableFragment *Fragment,
|
||||||
const MCRelaxableFragment *Fragment,
|
const MCAsmLayout &Layout) const override {
|
||||||
const MCAsmLayout &Layout) const override {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
virtual void relaxInstruction(const MCInst &Inst,
|
void relaxInstruction(const MCInst &Inst, MCInst &Res) const override {
|
||||||
MCInst &Res) const override {
|
|
||||||
llvm_unreachable("SystemZ does do not have assembler relaxation");
|
llvm_unreachable("SystemZ does do not have assembler relaxation");
|
||||||
}
|
}
|
||||||
virtual bool writeNopData(uint64_t Count, MCObjectWriter *OW) const override;
|
bool writeNopData(uint64_t Count, MCObjectWriter *OW) const override;
|
||||||
virtual MCObjectWriter *createObjectWriter(raw_ostream &OS) const override {
|
MCObjectWriter *createObjectWriter(raw_ostream &OS) const override {
|
||||||
return createSystemZObjectWriter(OS, OSABI);
|
return createSystemZObjectWriter(OS, OSABI);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -21,8 +21,7 @@ public:
|
|||||||
explicit SystemZMCAsmInfo(StringRef TT);
|
explicit SystemZMCAsmInfo(StringRef TT);
|
||||||
|
|
||||||
// Override MCAsmInfo;
|
// Override MCAsmInfo;
|
||||||
virtual const MCSection *
|
const MCSection *getNonexecutableStackSection(MCContext &Ctx) const override;
|
||||||
getNonexecutableStackSection(MCContext &Ctx) const override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace llvm
|
} // end namespace llvm
|
||||||
|
@ -34,9 +34,9 @@ public:
|
|||||||
~SystemZMCCodeEmitter() {}
|
~SystemZMCCodeEmitter() {}
|
||||||
|
|
||||||
// OVerride MCCodeEmitter.
|
// OVerride MCCodeEmitter.
|
||||||
virtual void EncodeInstruction(const MCInst &MI, raw_ostream &OS,
|
void EncodeInstruction(const MCInst &MI, raw_ostream &OS,
|
||||||
SmallVectorImpl<MCFixup> &Fixups,
|
SmallVectorImpl<MCFixup> &Fixups,
|
||||||
const MCSubtargetInfo &STI) const override;
|
const MCSubtargetInfo &STI) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Automatically generated by TableGen.
|
// Automatically generated by TableGen.
|
||||||
|
@ -24,14 +24,12 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Override MCELFObjectTargetWriter.
|
// Override MCELFObjectTargetWriter.
|
||||||
virtual unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup,
|
unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup,
|
||||||
bool IsPCRel, bool IsRelocWithSymbol,
|
bool IsPCRel, bool IsRelocWithSymbol,
|
||||||
int64_t Addend) const override;
|
int64_t Addend) const override;
|
||||||
virtual const MCSymbol *ExplicitRelSym(const MCAssembler &Asm,
|
const MCSymbol *ExplicitRelSym(const MCAssembler &Asm, const MCValue &Target,
|
||||||
const MCValue &Target,
|
const MCFragment &F, const MCFixup &Fixup,
|
||||||
const MCFragment &F,
|
bool IsPCRel) const override;
|
||||||
const MCFixup &Fixup,
|
|
||||||
bool IsPCRel) const override;
|
|
||||||
};
|
};
|
||||||
} // end anonymous namespace
|
} // end anonymous namespace
|
||||||
|
|
||||||
|
@ -32,20 +32,18 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Override AsmPrinter.
|
// Override AsmPrinter.
|
||||||
virtual const char *getPassName() const override {
|
const char *getPassName() const override {
|
||||||
return "SystemZ Assembly Printer";
|
return "SystemZ Assembly Printer";
|
||||||
}
|
}
|
||||||
virtual void EmitInstruction(const MachineInstr *MI) override;
|
void EmitInstruction(const MachineInstr *MI) override;
|
||||||
virtual void
|
void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) override;
|
||||||
EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) override;
|
bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
|
||||||
virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
|
unsigned AsmVariant, const char *ExtraCode,
|
||||||
unsigned AsmVariant, const char *ExtraCode,
|
raw_ostream &OS) override;
|
||||||
raw_ostream &OS) override;
|
bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
|
||||||
virtual bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
|
unsigned AsmVariant, const char *ExtraCode,
|
||||||
unsigned AsmVariant,
|
raw_ostream &OS) override;
|
||||||
const char *ExtraCode,
|
void EmitEndOfAsmFile(Module &M) override;
|
||||||
raw_ostream &OS) override;
|
|
||||||
virtual void EmitEndOfAsmFile(Module &M) override;
|
|
||||||
};
|
};
|
||||||
} // end namespace llvm
|
} // end namespace llvm
|
||||||
|
|
||||||
|
@ -39,11 +39,11 @@ public:
|
|||||||
Create(const GlobalValue *GV, SystemZCP::SystemZCPModifier Modifier);
|
Create(const GlobalValue *GV, SystemZCP::SystemZCPModifier Modifier);
|
||||||
|
|
||||||
// Override MachineConstantPoolValue.
|
// Override MachineConstantPoolValue.
|
||||||
virtual unsigned getRelocationInfo() const override;
|
unsigned getRelocationInfo() const override;
|
||||||
virtual int getExistingMachineCPValue(MachineConstantPool *CP,
|
int getExistingMachineCPValue(MachineConstantPool *CP,
|
||||||
unsigned Alignment) override;
|
unsigned Alignment) override;
|
||||||
virtual void addSelectionDAGCSEId(FoldingSetNodeID &ID) override;
|
void addSelectionDAGCSEId(FoldingSetNodeID &ID) override;
|
||||||
virtual void print(raw_ostream &O) const override;
|
void print(raw_ostream &O) const override;
|
||||||
|
|
||||||
// Access SystemZ-specific fields.
|
// Access SystemZ-specific fields.
|
||||||
const GlobalValue *getGlobalValue() const { return GV; }
|
const GlobalValue *getGlobalValue() const { return GV; }
|
||||||
|
@ -66,7 +66,7 @@ public:
|
|||||||
SystemZElimCompare(const SystemZTargetMachine &tm)
|
SystemZElimCompare(const SystemZTargetMachine &tm)
|
||||||
: MachineFunctionPass(ID), TII(0), TRI(0) {}
|
: MachineFunctionPass(ID), TII(0), TRI(0) {}
|
||||||
|
|
||||||
virtual const char *getPassName() const {
|
const char *getPassName() const override {
|
||||||
return "SystemZ Comparison Elimination";
|
return "SystemZ Comparison Elimination";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,36 +30,31 @@ public:
|
|||||||
const SystemZSubtarget &sti);
|
const SystemZSubtarget &sti);
|
||||||
|
|
||||||
// Override TargetFrameLowering.
|
// Override TargetFrameLowering.
|
||||||
virtual bool isFPCloseToIncomingSP() const override { return false; }
|
bool isFPCloseToIncomingSP() const override { return false; }
|
||||||
virtual const SpillSlot *
|
const SpillSlot *getCalleeSavedSpillSlots(unsigned &NumEntries) const
|
||||||
getCalleeSavedSpillSlots(unsigned &NumEntries) const override;
|
override;
|
||||||
virtual void
|
void processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
|
||||||
processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
|
RegScavenger *RS) const override;
|
||||||
RegScavenger *RS) const override;
|
bool spillCalleeSavedRegisters(MachineBasicBlock &MBB,
|
||||||
virtual bool
|
MachineBasicBlock::iterator MBBI,
|
||||||
spillCalleeSavedRegisters(MachineBasicBlock &MBB,
|
const std::vector<CalleeSavedInfo> &CSI,
|
||||||
MachineBasicBlock::iterator MBBI,
|
const TargetRegisterInfo *TRI) const override;
|
||||||
const std::vector<CalleeSavedInfo> &CSI,
|
bool restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
|
||||||
const TargetRegisterInfo *TRI) const
|
MachineBasicBlock::iterator MBBII,
|
||||||
|
const std::vector<CalleeSavedInfo> &CSI,
|
||||||
|
const TargetRegisterInfo *TRI) const
|
||||||
|
override;
|
||||||
|
void processFunctionBeforeFrameFinalized(MachineFunction &MF,
|
||||||
|
RegScavenger *RS) const override;
|
||||||
|
void emitPrologue(MachineFunction &MF) const override;
|
||||||
|
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
|
||||||
|
bool hasFP(const MachineFunction &MF) const override;
|
||||||
|
int getFrameIndexOffset(const MachineFunction &MF, int FI) const override;
|
||||||
|
bool hasReservedCallFrame(const MachineFunction &MF) const override;
|
||||||
|
void eliminateCallFramePseudoInstr(MachineFunction &MF,
|
||||||
|
MachineBasicBlock &MBB,
|
||||||
|
MachineBasicBlock::iterator MI) const
|
||||||
override;
|
override;
|
||||||
virtual bool
|
|
||||||
restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
|
|
||||||
MachineBasicBlock::iterator MBBII,
|
|
||||||
const std::vector<CalleeSavedInfo> &CSI,
|
|
||||||
const TargetRegisterInfo *TRI) const override;
|
|
||||||
virtual void processFunctionBeforeFrameFinalized(MachineFunction &MF,
|
|
||||||
RegScavenger *RS) const;
|
|
||||||
virtual void emitPrologue(MachineFunction &MF) const override;
|
|
||||||
virtual void emitEpilogue(MachineFunction &MF,
|
|
||||||
MachineBasicBlock &MBB) const override;
|
|
||||||
virtual bool hasFP(const MachineFunction &MF) const override;
|
|
||||||
virtual int getFrameIndexOffset(const MachineFunction &MF,
|
|
||||||
int FI) const override;
|
|
||||||
virtual bool hasReservedCallFrame(const MachineFunction &MF) const override;
|
|
||||||
virtual void
|
|
||||||
eliminateCallFramePseudoInstr(MachineFunction &MF,
|
|
||||||
MachineBasicBlock &MBB,
|
|
||||||
MachineBasicBlock::iterator MI) const override;
|
|
||||||
|
|
||||||
// Return the number of bytes in the callee-allocated part of the frame.
|
// Return the number of bytes in the callee-allocated part of the frame.
|
||||||
uint64_t getAllocatedStackSize(const MachineFunction &MF) const;
|
uint64_t getAllocatedStackSize(const MachineFunction &MF) const;
|
||||||
|
@ -318,15 +318,14 @@ public:
|
|||||||
Subtarget(*TM.getSubtargetImpl()) { }
|
Subtarget(*TM.getSubtargetImpl()) { }
|
||||||
|
|
||||||
// Override MachineFunctionPass.
|
// Override MachineFunctionPass.
|
||||||
virtual const char *getPassName() const override {
|
const char *getPassName() const override {
|
||||||
return "SystemZ DAG->DAG Pattern Instruction Selection";
|
return "SystemZ DAG->DAG Pattern Instruction Selection";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Override SelectionDAGISel.
|
// Override SelectionDAGISel.
|
||||||
virtual SDNode *Select(SDNode *Node) override;
|
SDNode *Select(SDNode *Node) override;
|
||||||
virtual bool
|
bool SelectInlineAsmMemoryOperand(const SDValue &Op, char ConstraintCode,
|
||||||
SelectInlineAsmMemoryOperand(const SDValue &Op, char ConstraintCode,
|
std::vector<SDValue> &OutOps) override;
|
||||||
std::vector<SDValue> &OutOps) override;
|
|
||||||
|
|
||||||
// Include the pieces autogenerated from the target description.
|
// Include the pieces autogenerated from the target description.
|
||||||
#include "SystemZGenDAGISel.inc"
|
#include "SystemZGenDAGISel.inc"
|
||||||
|
@ -201,57 +201,50 @@ public:
|
|||||||
explicit SystemZTargetLowering(SystemZTargetMachine &TM);
|
explicit SystemZTargetLowering(SystemZTargetMachine &TM);
|
||||||
|
|
||||||
// Override TargetLowering.
|
// Override TargetLowering.
|
||||||
virtual MVT getScalarShiftAmountTy(EVT LHSTy) const override {
|
MVT getScalarShiftAmountTy(EVT LHSTy) const override {
|
||||||
return MVT::i32;
|
return MVT::i32;
|
||||||
}
|
}
|
||||||
virtual EVT getSetCCResultType(LLVMContext &, EVT) const override;
|
EVT getSetCCResultType(LLVMContext &, EVT) const override;
|
||||||
virtual bool isFMAFasterThanFMulAndFAdd(EVT VT) const override;
|
bool isFMAFasterThanFMulAndFAdd(EVT VT) const override;
|
||||||
virtual bool isFPImmLegal(const APFloat &Imm, EVT VT) const override;
|
bool isFPImmLegal(const APFloat &Imm, EVT VT) const override;
|
||||||
virtual bool isLegalAddressingMode(const AddrMode &AM, Type *Ty) const override;
|
bool isLegalAddressingMode(const AddrMode &AM, Type *Ty) const override;
|
||||||
virtual bool
|
bool allowsUnalignedMemoryAccesses(EVT VT, unsigned AS,
|
||||||
allowsUnalignedMemoryAccesses(EVT VT, unsigned AS,
|
bool *Fast) const override;
|
||||||
bool *Fast) const override;
|
bool isTruncateFree(Type *, Type *) const override;
|
||||||
virtual bool isTruncateFree(Type *, Type *) const override;
|
bool isTruncateFree(EVT, EVT) const override;
|
||||||
virtual bool isTruncateFree(EVT, EVT) const override;
|
const char *getTargetNodeName(unsigned Opcode) const override;
|
||||||
virtual const char *getTargetNodeName(unsigned Opcode) const override;
|
std::pair<unsigned, const TargetRegisterClass *>
|
||||||
virtual std::pair<unsigned, const TargetRegisterClass *>
|
|
||||||
getRegForInlineAsmConstraint(const std::string &Constraint,
|
getRegForInlineAsmConstraint(const std::string &Constraint,
|
||||||
MVT VT) const override;
|
MVT VT) const override;
|
||||||
virtual TargetLowering::ConstraintType
|
TargetLowering::ConstraintType
|
||||||
getConstraintType(const std::string &Constraint) const override;
|
getConstraintType(const std::string &Constraint) const override;
|
||||||
virtual TargetLowering::ConstraintWeight
|
TargetLowering::ConstraintWeight
|
||||||
getSingleConstraintMatchWeight(AsmOperandInfo &info,
|
getSingleConstraintMatchWeight(AsmOperandInfo &info,
|
||||||
const char *constraint) const override;
|
const char *constraint) const override;
|
||||||
virtual void
|
void LowerAsmOperandForConstraint(SDValue Op,
|
||||||
LowerAsmOperandForConstraint(SDValue Op,
|
std::string &Constraint,
|
||||||
std::string &Constraint,
|
std::vector<SDValue> &Ops,
|
||||||
std::vector<SDValue> &Ops,
|
SelectionDAG &DAG) const override;
|
||||||
SelectionDAG &DAG) const override;
|
MachineBasicBlock *EmitInstrWithCustomInserter(MachineInstr *MI,
|
||||||
virtual MachineBasicBlock *
|
MachineBasicBlock *BB) const
|
||||||
EmitInstrWithCustomInserter(MachineInstr *MI,
|
override;
|
||||||
MachineBasicBlock *BB) const override;
|
SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const override;
|
||||||
virtual SDValue LowerOperation(SDValue Op,
|
bool allowTruncateForTailCall(Type *, Type *) const override;
|
||||||
SelectionDAG &DAG) const override;
|
bool mayBeEmittedAsTailCall(CallInst *CI) const override;
|
||||||
virtual bool allowTruncateForTailCall(Type *, Type *) const override;
|
SDValue LowerFormalArguments(SDValue Chain, CallingConv::ID CallConv,
|
||||||
virtual bool mayBeEmittedAsTailCall(CallInst *CI) const override;
|
bool isVarArg,
|
||||||
virtual SDValue
|
const SmallVectorImpl<ISD::InputArg> &Ins,
|
||||||
LowerFormalArguments(SDValue Chain,
|
SDLoc DL, SelectionDAG &DAG,
|
||||||
CallingConv::ID CallConv, bool isVarArg,
|
SmallVectorImpl<SDValue> &InVals) const override;
|
||||||
const SmallVectorImpl<ISD::InputArg> &Ins,
|
SDValue LowerCall(CallLoweringInfo &CLI,
|
||||||
SDLoc DL, SelectionDAG &DAG,
|
SmallVectorImpl<SDValue> &InVals) const override;
|
||||||
SmallVectorImpl<SDValue> &InVals) const override;
|
|
||||||
virtual SDValue
|
|
||||||
LowerCall(CallLoweringInfo &CLI,
|
|
||||||
SmallVectorImpl<SDValue> &InVals) const override;
|
|
||||||
|
|
||||||
virtual SDValue
|
SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool IsVarArg,
|
||||||
LowerReturn(SDValue Chain,
|
const SmallVectorImpl<ISD::OutputArg> &Outs,
|
||||||
CallingConv::ID CallConv, bool IsVarArg,
|
const SmallVectorImpl<SDValue> &OutVals,
|
||||||
const SmallVectorImpl<ISD::OutputArg> &Outs,
|
SDLoc DL, SelectionDAG &DAG) const override;
|
||||||
const SmallVectorImpl<SDValue> &OutVals,
|
SDValue prepareVolatileOrAtomicLoad(SDValue Chain, SDLoc DL,
|
||||||
SDLoc DL, SelectionDAG &DAG) const override;
|
SelectionDAG &DAG) const override;
|
||||||
virtual SDValue prepareVolatileOrAtomicLoad(SDValue Chain, SDLoc DL,
|
|
||||||
SelectionDAG &DAG) const override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const SystemZSubtarget &Subtarget;
|
const SystemZSubtarget &Subtarget;
|
||||||
|
@ -133,75 +133,63 @@ public:
|
|||||||
explicit SystemZInstrInfo(SystemZTargetMachine &TM);
|
explicit SystemZInstrInfo(SystemZTargetMachine &TM);
|
||||||
|
|
||||||
// Override TargetInstrInfo.
|
// Override TargetInstrInfo.
|
||||||
virtual unsigned isLoadFromStackSlot(const MachineInstr *MI,
|
unsigned isLoadFromStackSlot(const MachineInstr *MI,
|
||||||
int &FrameIndex) const override;
|
int &FrameIndex) const override;
|
||||||
virtual unsigned isStoreToStackSlot(const MachineInstr *MI,
|
unsigned isStoreToStackSlot(const MachineInstr *MI,
|
||||||
int &FrameIndex) const override;
|
int &FrameIndex) const override;
|
||||||
virtual bool isStackSlotCopy(const MachineInstr *MI, int &DestFrameIndex,
|
bool isStackSlotCopy(const MachineInstr *MI, int &DestFrameIndex,
|
||||||
int &SrcFrameIndex) const override;
|
int &SrcFrameIndex) const override;
|
||||||
virtual bool AnalyzeBranch(MachineBasicBlock &MBB,
|
bool AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB,
|
||||||
MachineBasicBlock *&TBB,
|
MachineBasicBlock *&FBB,
|
||||||
MachineBasicBlock *&FBB,
|
SmallVectorImpl<MachineOperand> &Cond,
|
||||||
SmallVectorImpl<MachineOperand> &Cond,
|
bool AllowModify) const override;
|
||||||
bool AllowModify) const override;
|
unsigned RemoveBranch(MachineBasicBlock &MBB) const override;
|
||||||
virtual unsigned RemoveBranch(MachineBasicBlock &MBB) const override;
|
unsigned InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
|
||||||
virtual unsigned InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
|
MachineBasicBlock *FBB,
|
||||||
MachineBasicBlock *FBB,
|
const SmallVectorImpl<MachineOperand> &Cond,
|
||||||
const SmallVectorImpl<MachineOperand> &Cond,
|
DebugLoc DL) const override;
|
||||||
DebugLoc DL) const override;
|
|
||||||
bool analyzeCompare(const MachineInstr *MI, unsigned &SrcReg,
|
bool analyzeCompare(const MachineInstr *MI, unsigned &SrcReg,
|
||||||
unsigned &SrcReg2, int &Mask, int &Value) const override;
|
unsigned &SrcReg2, int &Mask, int &Value) const override;
|
||||||
bool optimizeCompareInstr(MachineInstr *CmpInstr, unsigned SrcReg,
|
bool optimizeCompareInstr(MachineInstr *CmpInstr, unsigned SrcReg,
|
||||||
unsigned SrcReg2, int Mask, int Value,
|
unsigned SrcReg2, int Mask, int Value,
|
||||||
const MachineRegisterInfo *MRI) const override;
|
const MachineRegisterInfo *MRI) const override;
|
||||||
virtual bool isPredicable(MachineInstr *MI) const override;
|
bool isPredicable(MachineInstr *MI) const override;
|
||||||
virtual bool
|
bool isProfitableToIfCvt(MachineBasicBlock &MBB, unsigned NumCycles,
|
||||||
isProfitableToIfCvt(MachineBasicBlock &MBB, unsigned NumCycles,
|
unsigned ExtraPredCycles,
|
||||||
unsigned ExtraPredCycles,
|
const BranchProbability &Probability) const override;
|
||||||
const BranchProbability &Probability) const override;
|
bool isProfitableToIfCvt(MachineBasicBlock &TMBB,
|
||||||
virtual bool
|
unsigned NumCyclesT, unsigned ExtraPredCyclesT,
|
||||||
isProfitableToIfCvt(MachineBasicBlock &TMBB,
|
MachineBasicBlock &FMBB,
|
||||||
unsigned NumCyclesT,
|
unsigned NumCyclesF, unsigned ExtraPredCyclesF,
|
||||||
unsigned ExtraPredCyclesT,
|
const BranchProbability &Probability) const override;
|
||||||
MachineBasicBlock &FMBB,
|
bool PredicateInstruction(MachineInstr *MI,
|
||||||
unsigned NumCyclesF,
|
const SmallVectorImpl<MachineOperand> &Pred) const
|
||||||
unsigned ExtraPredCyclesF,
|
override;
|
||||||
const BranchProbability &Probability) const override;
|
void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
|
||||||
virtual bool
|
DebugLoc DL, unsigned DestReg, unsigned SrcReg,
|
||||||
PredicateInstruction(MachineInstr *MI,
|
bool KillSrc) const override;
|
||||||
const SmallVectorImpl<MachineOperand> &Pred) const override;
|
void storeRegToStackSlot(MachineBasicBlock &MBB,
|
||||||
virtual void copyPhysReg(MachineBasicBlock &MBB,
|
MachineBasicBlock::iterator MBBI,
|
||||||
MachineBasicBlock::iterator MBBI, DebugLoc DL,
|
unsigned SrcReg, bool isKill, int FrameIndex,
|
||||||
unsigned DestReg, unsigned SrcReg,
|
const TargetRegisterClass *RC,
|
||||||
bool KillSrc) const override;
|
const TargetRegisterInfo *TRI) const override;
|
||||||
virtual void
|
void loadRegFromStackSlot(MachineBasicBlock &MBB,
|
||||||
storeRegToStackSlot(MachineBasicBlock &MBB,
|
MachineBasicBlock::iterator MBBI,
|
||||||
MachineBasicBlock::iterator MBBI,
|
unsigned DestReg, int FrameIdx,
|
||||||
unsigned SrcReg, bool isKill, int FrameIndex,
|
const TargetRegisterClass *RC,
|
||||||
const TargetRegisterClass *RC,
|
const TargetRegisterInfo *TRI) const override;
|
||||||
const TargetRegisterInfo *TRI) const override;
|
MachineInstr *convertToThreeAddress(MachineFunction::iterator &MFI,
|
||||||
virtual void
|
MachineBasicBlock::iterator &MBBI,
|
||||||
loadRegFromStackSlot(MachineBasicBlock &MBB,
|
LiveVariables *LV) const override;
|
||||||
MachineBasicBlock::iterator MBBI,
|
MachineInstr *foldMemoryOperandImpl(MachineFunction &MF, MachineInstr *MI,
|
||||||
unsigned DestReg, int FrameIdx,
|
const SmallVectorImpl<unsigned> &Ops,
|
||||||
const TargetRegisterClass *RC,
|
int FrameIndex) const override;
|
||||||
const TargetRegisterInfo *TRI) const override;
|
MachineInstr *foldMemoryOperandImpl(MachineFunction &MF, MachineInstr* MI,
|
||||||
virtual MachineInstr *
|
const SmallVectorImpl<unsigned> &Ops,
|
||||||
convertToThreeAddress(MachineFunction::iterator &MFI,
|
MachineInstr* LoadMI) const override;
|
||||||
MachineBasicBlock::iterator &MBBI,
|
bool expandPostRAPseudo(MachineBasicBlock::iterator MBBI) const override;
|
||||||
LiveVariables *LV) const;
|
bool ReverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const
|
||||||
virtual MachineInstr *
|
override;
|
||||||
foldMemoryOperandImpl(MachineFunction &MF, MachineInstr *MI,
|
|
||||||
const SmallVectorImpl<unsigned> &Ops,
|
|
||||||
int FrameIndex) const;
|
|
||||||
virtual MachineInstr *
|
|
||||||
foldMemoryOperandImpl(MachineFunction &MF, MachineInstr* MI,
|
|
||||||
const SmallVectorImpl<unsigned> &Ops,
|
|
||||||
MachineInstr* LoadMI) const;
|
|
||||||
virtual bool
|
|
||||||
expandPostRAPseudo(MachineBasicBlock::iterator MBBI) const override;
|
|
||||||
virtual bool
|
|
||||||
ReverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const override;
|
|
||||||
|
|
||||||
// Return the SystemZRegisterInfo, which this class owns.
|
// Return the SystemZRegisterInfo, which this class owns.
|
||||||
const SystemZRegisterInfo &getRegisterInfo() const { return RI; }
|
const SystemZRegisterInfo &getRegisterInfo() const { return RI; }
|
||||||
|
@ -133,7 +133,7 @@ public:
|
|||||||
SystemZLongBranch(const SystemZTargetMachine &tm)
|
SystemZLongBranch(const SystemZTargetMachine &tm)
|
||||||
: MachineFunctionPass(ID), TII(0) {}
|
: MachineFunctionPass(ID), TII(0) {}
|
||||||
|
|
||||||
virtual const char *getPassName() const {
|
const char *getPassName() const override {
|
||||||
return "SystemZ Long Branch";
|
return "SystemZ Long Branch";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,25 +40,22 @@ public:
|
|||||||
SystemZRegisterInfo(SystemZTargetMachine &tm);
|
SystemZRegisterInfo(SystemZTargetMachine &tm);
|
||||||
|
|
||||||
// Override TargetRegisterInfo.h.
|
// Override TargetRegisterInfo.h.
|
||||||
virtual bool
|
bool requiresRegisterScavenging(const MachineFunction &MF) const override {
|
||||||
requiresRegisterScavenging(const MachineFunction &MF) const override {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
virtual bool
|
bool requiresFrameIndexScavenging(const MachineFunction &MF) const override {
|
||||||
requiresFrameIndexScavenging(const MachineFunction &MF) const override {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
virtual bool
|
bool trackLivenessAfterRegAlloc(const MachineFunction &MF) const override {
|
||||||
trackLivenessAfterRegAlloc(const MachineFunction &MF) const override {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
virtual const uint16_t *
|
const uint16_t *getCalleeSavedRegs(const MachineFunction *MF = 0) const
|
||||||
getCalleeSavedRegs(const MachineFunction *MF = 0) const override;
|
override;
|
||||||
virtual BitVector getReservedRegs(const MachineFunction &MF) const override;
|
BitVector getReservedRegs(const MachineFunction &MF) const override;
|
||||||
virtual void eliminateFrameIndex(MachineBasicBlock::iterator MI,
|
void eliminateFrameIndex(MachineBasicBlock::iterator MI,
|
||||||
int SPAdj, unsigned FIOperandNum,
|
int SPAdj, unsigned FIOperandNum,
|
||||||
RegScavenger *RS) const override;
|
RegScavenger *RS) const override;
|
||||||
virtual unsigned getFrameRegister(const MachineFunction &MF) const override;
|
unsigned getFrameRegister(const MachineFunction &MF) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace llvm
|
} // end namespace llvm
|
||||||
|
@ -25,7 +25,6 @@ public:
|
|||||||
explicit SystemZSelectionDAGInfo(const SystemZTargetMachine &TM);
|
explicit SystemZSelectionDAGInfo(const SystemZTargetMachine &TM);
|
||||||
~SystemZSelectionDAGInfo();
|
~SystemZSelectionDAGInfo();
|
||||||
|
|
||||||
virtual
|
|
||||||
SDValue EmitTargetCodeForMemcpy(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
|
SDValue EmitTargetCodeForMemcpy(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
|
||||||
SDValue Dst, SDValue Src,
|
SDValue Dst, SDValue Src,
|
||||||
SDValue Size, unsigned Align,
|
SDValue Size, unsigned Align,
|
||||||
@ -33,42 +32,41 @@ public:
|
|||||||
MachinePointerInfo DstPtrInfo,
|
MachinePointerInfo DstPtrInfo,
|
||||||
MachinePointerInfo SrcPtrInfo) const override;
|
MachinePointerInfo SrcPtrInfo) const override;
|
||||||
|
|
||||||
virtual SDValue
|
SDValue EmitTargetCodeForMemset(SelectionDAG &DAG, SDLoc DL,
|
||||||
EmitTargetCodeForMemset(SelectionDAG &DAG, SDLoc DL,
|
SDValue Chain, SDValue Dst, SDValue Byte,
|
||||||
SDValue Chain, SDValue Dst, SDValue Byte,
|
SDValue Size, unsigned Align, bool IsVolatile,
|
||||||
SDValue Size, unsigned Align, bool IsVolatile,
|
MachinePointerInfo DstPtrInfo) const override;
|
||||||
MachinePointerInfo DstPtrInfo) const override;
|
|
||||||
|
|
||||||
virtual std::pair<SDValue, SDValue>
|
std::pair<SDValue, SDValue>
|
||||||
EmitTargetCodeForMemcmp(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
|
EmitTargetCodeForMemcmp(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
|
||||||
SDValue Src1, SDValue Src2, SDValue Size,
|
SDValue Src1, SDValue Src2, SDValue Size,
|
||||||
MachinePointerInfo Op1PtrInfo,
|
MachinePointerInfo Op1PtrInfo,
|
||||||
MachinePointerInfo Op2PtrInfo) const override;
|
MachinePointerInfo Op2PtrInfo) const override;
|
||||||
|
|
||||||
virtual std::pair<SDValue, SDValue>
|
std::pair<SDValue, SDValue>
|
||||||
EmitTargetCodeForMemchr(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
|
EmitTargetCodeForMemchr(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
|
||||||
SDValue Src, SDValue Char, SDValue Length,
|
SDValue Src, SDValue Char, SDValue Length,
|
||||||
MachinePointerInfo SrcPtrInfo) const override;
|
MachinePointerInfo SrcPtrInfo) const override;
|
||||||
|
|
||||||
virtual std::pair<SDValue, SDValue>
|
std::pair<SDValue, SDValue>
|
||||||
EmitTargetCodeForStrcpy(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
|
EmitTargetCodeForStrcpy(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
|
||||||
SDValue Dest, SDValue Src,
|
SDValue Dest, SDValue Src,
|
||||||
MachinePointerInfo DestPtrInfo,
|
MachinePointerInfo DestPtrInfo,
|
||||||
MachinePointerInfo SrcPtrInfo,
|
MachinePointerInfo SrcPtrInfo,
|
||||||
bool isStpcpy) const override;
|
bool isStpcpy) const override;
|
||||||
|
|
||||||
virtual std::pair<SDValue, SDValue>
|
std::pair<SDValue, SDValue>
|
||||||
EmitTargetCodeForStrcmp(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
|
EmitTargetCodeForStrcmp(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
|
||||||
SDValue Src1, SDValue Src2,
|
SDValue Src1, SDValue Src2,
|
||||||
MachinePointerInfo Op1PtrInfo,
|
MachinePointerInfo Op1PtrInfo,
|
||||||
MachinePointerInfo Op2PtrInfo) const override;
|
MachinePointerInfo Op2PtrInfo) const override;
|
||||||
|
|
||||||
virtual std::pair<SDValue, SDValue>
|
std::pair<SDValue, SDValue>
|
||||||
EmitTargetCodeForStrlen(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
|
EmitTargetCodeForStrlen(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
|
||||||
SDValue Src,
|
SDValue Src,
|
||||||
MachinePointerInfo SrcPtrInfo) const override;
|
MachinePointerInfo SrcPtrInfo) const override;
|
||||||
|
|
||||||
virtual std::pair<SDValue, SDValue>
|
std::pair<SDValue, SDValue>
|
||||||
EmitTargetCodeForStrnlen(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
|
EmitTargetCodeForStrnlen(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
|
||||||
SDValue Src, SDValue MaxLength,
|
SDValue Src, SDValue MaxLength,
|
||||||
MachinePointerInfo SrcPtrInfo) const override;
|
MachinePointerInfo SrcPtrInfo) const override;
|
||||||
|
@ -26,7 +26,7 @@ public:
|
|||||||
static char ID;
|
static char ID;
|
||||||
SystemZShortenInst(const SystemZTargetMachine &tm);
|
SystemZShortenInst(const SystemZTargetMachine &tm);
|
||||||
|
|
||||||
virtual const char *getPassName() const {
|
const char *getPassName() const override {
|
||||||
return "SystemZ Instruction Shortening";
|
return "SystemZ Instruction Shortening";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ public:
|
|||||||
const std::string &FS);
|
const std::string &FS);
|
||||||
|
|
||||||
// This is important for reducing register pressure in vector code.
|
// This is important for reducing register pressure in vector code.
|
||||||
virtual bool useAA() const override { return true; }
|
bool useAA() const override { return true; }
|
||||||
|
|
||||||
// Automatically generated by tblgen.
|
// Automatically generated by tblgen.
|
||||||
void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
|
void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
|
||||||
|
@ -47,10 +47,10 @@ public:
|
|||||||
return getTM<SystemZTargetMachine>();
|
return getTM<SystemZTargetMachine>();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void addIRPasses() override;
|
void addIRPasses() override;
|
||||||
virtual bool addInstSelector() override;
|
bool addInstSelector() override;
|
||||||
virtual bool addPreSched2() override;
|
bool addPreSched2() override;
|
||||||
virtual bool addPreEmitPass() override;
|
bool addPreEmitPass() override;
|
||||||
};
|
};
|
||||||
} // end anonymous namespace
|
} // end anonymous namespace
|
||||||
|
|
||||||
|
@ -42,30 +42,30 @@ public:
|
|||||||
CodeGenOpt::Level OL);
|
CodeGenOpt::Level OL);
|
||||||
|
|
||||||
// Override TargetMachine.
|
// Override TargetMachine.
|
||||||
virtual const TargetFrameLowering *getFrameLowering() const override {
|
const TargetFrameLowering *getFrameLowering() const override {
|
||||||
return &FrameLowering;
|
return &FrameLowering;
|
||||||
}
|
}
|
||||||
virtual const SystemZInstrInfo *getInstrInfo() const override {
|
const SystemZInstrInfo *getInstrInfo() const override {
|
||||||
return &InstrInfo;
|
return &InstrInfo;
|
||||||
}
|
}
|
||||||
virtual const SystemZSubtarget *getSubtargetImpl() const override {
|
const SystemZSubtarget *getSubtargetImpl() const override {
|
||||||
return &Subtarget;
|
return &Subtarget;
|
||||||
}
|
}
|
||||||
virtual const DataLayout *getDataLayout() const override {
|
const DataLayout *getDataLayout() const override {
|
||||||
return &DL;
|
return &DL;
|
||||||
}
|
}
|
||||||
virtual const SystemZRegisterInfo *getRegisterInfo() const override {
|
const SystemZRegisterInfo *getRegisterInfo() const override {
|
||||||
return &InstrInfo.getRegisterInfo();
|
return &InstrInfo.getRegisterInfo();
|
||||||
}
|
}
|
||||||
virtual const SystemZTargetLowering *getTargetLowering() const override {
|
const SystemZTargetLowering *getTargetLowering() const override {
|
||||||
return &TLInfo;
|
return &TLInfo;
|
||||||
}
|
}
|
||||||
virtual const TargetSelectionDAGInfo *getSelectionDAGInfo() const override {
|
const TargetSelectionDAGInfo *getSelectionDAGInfo() const override {
|
||||||
return &TSInfo;
|
return &TSInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Override LLVMTargetMachine
|
// Override LLVMTargetMachine
|
||||||
virtual TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
|
TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace llvm
|
} // end namespace llvm
|
||||||
|
Loading…
x
Reference in New Issue
Block a user