#include "AArch64.h"
#include "AArch64MachineFunctionInfo.h"
#include "AArch64Subtarget.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineJumpTableInfo.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/Support/Alignment.h"
#include "llvm/Support/Debug.h"
usingnamespacellvm;
#define DEBUG_TYPE …
STATISTIC(NumJT8, "Number of jump-tables with 1-byte entries");
STATISTIC(NumJT16, "Number of jump-tables with 2-byte entries");
STATISTIC(NumJT32, "Number of jump-tables with 4-byte entries");
namespace {
class AArch64CompressJumpTables : public MachineFunctionPass { … };
char AArch64CompressJumpTables::ID = …;
}
INITIALIZE_PASS(…)
std::optional<int>
AArch64CompressJumpTables::computeBlockSize(MachineBasicBlock &MBB) { … }
bool AArch64CompressJumpTables::scanFunction() { … }
bool AArch64CompressJumpTables::compressJumpTable(MachineInstr &MI,
int Offset) { … }
bool AArch64CompressJumpTables::runOnMachineFunction(MachineFunction &MFIn) { … }
FunctionPass *llvm::createAArch64CompressJumpTablesPass() { … }