43 errs() <<
"warning: '" << ABIName <<
"' has not been standardized\n";
48 bool Is64Bit = TT.isArch64Bit();
50 switch (TT.getEnvironment()) {
73 bool Is64Bit = TT.isArch64Bit();
77 auto IsABIValidForFeature = [=](
ABI Abi) {
84 return !Is64Bit && FeatureBits[LoongArch::FeatureBasicF];
86 return !Is64Bit && FeatureBits[LoongArch::FeatureBasicD];
90 return Is64Bit && FeatureBits[LoongArch::FeatureBasicF];
92 return Is64Bit && FeatureBits[LoongArch::FeatureBasicD];
97 if (IsABIValidForFeature(ArgProvidedABI)) {
98 if (IsABIValidForFeature(TripleABI) && ArgProvidedABI != TripleABI)
100 <<
"warning: triple-implied ABI conflicts with provided target-abi '"
101 << ABIName <<
"', using target-abi\n";
106 if (IsABIValidForFeature(TripleABI)) {
111 switch (ArgProvidedABI) {
115 errs() <<
"warning: the '" << ABIName
116 <<
"' is not a recognized ABI for this target, ignoring and "
117 "using triple-implied ABI\n";
123 errs() <<
"warning: 32-bit ABIs are not supported for 64-bit targets, "
124 "ignoring and using triple-implied ABI\n";
132 errs() <<
"warning: 64-bit ABIs are not supported for 32-bit targets, "
133 "ignoring and using triple-implied ABI\n";
139 switch (ArgProvidedABI) {
142 errs() <<
"warning: the '" << ABIName
143 <<
"' ABI can't be used for a target that doesn't support the 'F' "
144 "instruction set, ignoring and using triple-implied ABI\n";
148 errs() <<
"warning: the '" << ABIName
149 <<
"' ABI can't be used for a target that doesn't support the 'D' "
150 "instruction set, ignoring and using triple-implied ABI\n";
159 auto GetFeatureABI = [=]() {
160 if (FeatureBits[LoongArch::FeatureBasicD])
162 if (FeatureBits[LoongArch::FeatureBasicF])
166 if (!ABIName.
empty())
167 errs() <<
"warning: both target-abi and the triple-implied ABI are "
168 "invalid, ignoring and using feature-implied ABI\n";
Container class for subtarget features.
Wrapper class representing physical registers. Should be passed by value.
StringRef - Represent a constant reference to a string, i.e.
constexpr bool empty() const
empty - Check if the string is empty.
A switch()-like statement whose cases are string literals.
StringSwitch & Case(StringLiteral S, T Value)
Triple - Helper class for working with autoconf configuration names.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
static ABI checkABIStandardized(ABI Abi)
static ABI getTripleABI(const Triple &TT)
ABI computeTargetABI(const Triple &TT, const FeatureBitset &FeatureBits, StringRef ABIName)
ABI getTargetABI(StringRef ABIName)
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI raw_fd_ostream & errs()
This returns a reference to a raw_ostream for standard error.