19#define DEBUG_TYPE "loongarch-subtarget"
21#define GET_SUBTARGETINFO_TARGET_DESC
22#define GET_SUBTARGETINFO_CTOR
23#include "LoongArchGenSubtargetInfo.inc"
26 cl::desc(
"Enable the use of AA during codegen."));
28void LoongArchSubtarget::anchor() {}
37 bool Is64Bit = TT.isArch64Bit();
38 if (CPU.
empty() || CPU ==
"generic")
39 CPU = Is64Bit ?
"generic-la64" :
"generic-la32";
45 initializeProperties(TuneCPU);
51 if (HasLA32 == HasLA64)
54 if (Is64Bit && HasLA32)
57 if (!Is64Bit && HasLA64)
65void LoongArchSubtarget::initializeProperties(
StringRef TuneCPU) {
86 PrefFunctionAlignment =
Align(32);
87 PrefLoopAlignment =
Align(16);
88 MaxBytesForAlignment = 16;
97 initializeSubtargetDependencies(TT, CPU, TuneCPU, FS, ABIName)),
98 InstrInfo(*this), RegInfo(getHwMode()), TLInfo(TM, *this) {}
static cl::opt< bool > UseAA("aarch64-use-aa", cl::init(true), cl::desc("Enable the use of AA during codegen."))
static cl::opt< bool > UseAA("loongarch-use-aa", cl::init(true), cl::desc("Enable the use of AA during codegen."))
bool useAA() const override
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)
initializer< Ty > init(const Ty &Val)
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.