20#define DEBUG_TYPE "loongarch-subtarget"
22#define GET_SUBTARGETINFO_TARGET_DESC
23#define GET_SUBTARGETINFO_CTOR
24#include "LoongArchGenSubtargetInfo.inc"
27 cl::desc(
"Enable the use of AA during codegen."));
29void LoongArchSubtarget::anchor() {}
38 bool Is64Bit = TT.isArch64Bit();
39 if (CPU.empty() || CPU ==
"generic")
40 CPU = Is64Bit ?
"generic-la64" :
"generic-la32";
46 initializeProperties(TuneCPU);
52 if (HasLA32 == HasLA64)
55 if (Is64Bit && HasLA32)
58 if (!Is64Bit && HasLA64)
66void LoongArchSubtarget::initializeProperties(
StringRef TuneCPU) {
87 PrefFunctionAlignment =
Align(32);
88 PrefLoopAlignment =
Align(16);
89 MaxBytesForAlignment = 16;
98 initializeSubtargetDependencies(TT, CPU, TuneCPU, FS, ABIName)),
99 InstrInfo(*this), TLInfo(TM, *this) {
100 TSInfo = std::make_unique<LoongArchSelectionDAGInfo>();
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."))
const SelectionDAGTargetInfo * getSelectionDAGInfo() const override
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)
~LoongArchSubtarget() override
Targets can subclass this to parameterize the SelectionDAG lowering and instruction selection process...
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.
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
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.
LLVM_ABI void report_fatal_error(Error Err, bool gen_crash_diag=true)