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";
38 initializeProperties(TuneCPU);
44 if (HasLA32 == HasLA64)
47 if (Is64Bit && HasLA32)
50 if (!Is64Bit && HasLA64)
58void LoongArchSubtarget::initializeProperties(
StringRef TuneCPU) {
79 PrefFunctionAlignment =
Align(32);
80 PrefLoopAlignment =
Align(16);
81 MaxBytesForAlignment = 16;
90 initializeSubtargetDependencies(TT, CPU, TuneCPU, FS, ABIName)),
91 InstrInfo(*this), RegInfo(getHwMode()), TLInfo(TM, *this) {}
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, const FeatureBitset &FeatureBits, 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.
This struct is a compact representation of a valid (non-zero power of two) alignment.