|
17 | 17 | #include "AArch64PerfectShuffle.h" |
18 | 18 | #include "AArch64RegisterInfo.h" |
19 | 19 | #include "AArch64Subtarget.h" |
| 20 | +#include "AArch64TargetMachine.h" |
20 | 21 | #include "MCTargetDesc/AArch64AddressingModes.h" |
21 | 22 | #include "Utils/AArch64BaseInfo.h" |
22 | 23 | #include "Utils/AArch64SMEAttributes.h" |
@@ -1998,6 +1999,10 @@ AArch64TargetLowering::AArch64TargetLowering(const TargetMachine &TM, |
1998 | 1999 | setOperationAction(Op, MVT::f16, Promote); |
1999 | 2000 | } |
2000 | 2001 |
|
| 2002 | +const AArch64TargetMachine &AArch64TargetLowering::getTM() const { |
| 2003 | + return static_cast<const AArch64TargetMachine &>(getTargetMachine()); |
| 2004 | +} |
| 2005 | + |
2001 | 2006 | void AArch64TargetLowering::addTypeForNEON(MVT VT) { |
2002 | 2007 | assert(VT.isVector() && "VT should be a vector type"); |
2003 | 2008 |
|
@@ -8277,7 +8282,7 @@ SDValue AArch64TargetLowering::LowerFormalArguments( |
8277 | 8282 | if (Subtarget->hasCustomCallingConv()) |
8278 | 8283 | Subtarget->getRegisterInfo()->UpdateCustomCalleeSavedRegs(MF); |
8279 | 8284 |
|
8280 | | - if (!Subtarget->useNewSMEABILowering() || Attrs.hasAgnosticZAInterface()) { |
| 8285 | + if (!getTM().useNewSMEABILowering() || Attrs.hasAgnosticZAInterface()) { |
8281 | 8286 | // Old SME ABI lowering (deprecated): |
8282 | 8287 | // Create a 16 Byte TPIDR2 object. The dynamic buffer |
8283 | 8288 | // will be expanded and stored in the static object later using a |
@@ -8341,7 +8346,7 @@ SDValue AArch64TargetLowering::LowerFormalArguments( |
8341 | 8346 | } |
8342 | 8347 | } |
8343 | 8348 |
|
8344 | | - if (Subtarget->useNewSMEABILowering()) { |
| 8349 | + if (getTM().useNewSMEABILowering()) { |
8345 | 8350 | // Clear new ZT0 state. TODO: Move this to the SME ABI pass. |
8346 | 8351 | if (Attrs.isNewZT0()) |
8347 | 8352 | Chain = DAG.getNode( |
@@ -9065,7 +9070,7 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI, |
9065 | 9070 |
|
9066 | 9071 | // Determine whether we need any streaming mode changes. |
9067 | 9072 | SMECallAttrs CallAttrs = getSMECallAttrs(MF.getFunction(), *this, CLI); |
9068 | | - bool UseNewSMEABILowering = Subtarget->useNewSMEABILowering(); |
| 9073 | + bool UseNewSMEABILowering = getTM().useNewSMEABILowering(); |
9069 | 9074 | bool IsAgnosticZAFunction = CallAttrs.caller().hasAgnosticZAInterface(); |
9070 | 9075 | auto ZAMarkerNode = [&]() -> std::optional<unsigned> { |
9071 | 9076 | // TODO: Handle agnostic ZA functions. |
|
0 commit comments