#include "RISCV.h"
#include "RISCVInstrInfo.h"
#include "RISCVSubtarget.h"
#include "RISCVTargetMachine.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
usingnamespacellvm;
cl::opt<uint32_t> PreferredLandingPadLabel(
"riscv-landing-pad-label", cl::ReallyHidden,
cl::desc("Use preferred fixed label for all labels"));
namespace {
class RISCVIndirectBranchTrackingPass : public MachineFunctionPass { … };
}
char RISCVIndirectBranchTrackingPass::ID = …;
FunctionPass *llvm::createRISCVIndirectBranchTrackingPass() { … }
static void emitLpad(MachineBasicBlock &MBB, const RISCVInstrInfo *TII,
uint32_t Label) { … }
bool RISCVIndirectBranchTrackingPass::runOnMachineFunction(
MachineFunction &MF) { … }