Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Target/BPF/BPFMISimplifyPatchable.cpp
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | void checkADDrr(MachineRegisterInfo *MRI, MachineOperand *RelocOp, | ||||
const GlobalValue *GVal); | const GlobalValue *GVal); | ||||
void checkShift(MachineRegisterInfo *MRI, MachineBasicBlock &MBB, | void checkShift(MachineRegisterInfo *MRI, MachineBasicBlock &MBB, | ||||
MachineOperand *RelocOp, const GlobalValue *GVal, | MachineOperand *RelocOp, const GlobalValue *GVal, | ||||
unsigned Opcode); | unsigned Opcode); | ||||
public: | public: | ||||
// Main entry point for this pass. | // Main entry point for this pass. | ||||
bool runOnMachineFunction(MachineFunction &MF) override { | bool runOnMachineFunction(MachineFunction &MF) override { | ||||
if (!skipFunction(MF.getFunction())) { | if (skipFunction(MF.getFunction())) | ||||
return false; | |||||
initialize(MF); | initialize(MF); | ||||
} | |||||
return removeLD(); | return removeLD(); | ||||
} | } | ||||
}; | }; | ||||
// Initialize class variables. | // Initialize class variables. | ||||
void BPFMISimplifyPatchable::initialize(MachineFunction &MFParm) { | void BPFMISimplifyPatchable::initialize(MachineFunction &MFParm) { | ||||
MF = &MFParm; | MF = &MFParm; | ||||
TII = MF->getSubtarget<BPFSubtarget>().getInstrInfo(); | TII = MF->getSubtarget<BPFSubtarget>().getInstrInfo(); | ||||
▲ Show 20 Lines • Show All 216 Lines • Show Last 20 Lines |