19#define DEBUG_TYPE "loongarch-subtarget"
21#define GET_SUBTARGETINFO_TARGET_DESC
22#define GET_SUBTARGETINFO_CTOR
23#include "LoongArchGenSubtargetInfo.inc"
25void LoongArchSubtarget::anchor() {}
30 bool Is64Bit =
TT.isArch64Bit();
31 if (CPU.
empty() || CPU ==
"generic")
32 CPU = Is64Bit ?
"generic-la64" :
"generic-la32";
43 if (HasLA32 == HasLA64)
46 if (Is64Bit && HasLA32)
49 if (!Is64Bit && HasLA64)
63 initializeSubtargetDependencies(TT, CPU, TuneCPU, FS, ABIName)),
64 InstrInfo(*this), RegInfo(getHwMode()), TLInfo(
TM, *this) {}
const char LLVMTargetMachineRef TM
LoongArchSubtarget(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS, StringRef ABIName, const TargetMachine &TM)
void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)
StringRef - Represent a constant reference to a string, i.e.
constexpr bool empty() const
empty - Check if the string is empty.
Primary interface to the complete machine description for the target machine.
Triple - Helper class for working with autoconf configuration names.
ABI computeTargetABI(const Triple &TT, StringRef ABIName)
This is an optimization pass for GlobalISel generic memory operations.
void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.