File tree Expand file tree Collapse file tree 6 files changed +15
-20
lines changed Expand file tree Collapse file tree 6 files changed +15
-20
lines changed Original file line number Diff line number Diff line change @@ -214,13 +214,11 @@ def RetCC_AMDGPU_Func : CallingConv<[
214
214
]>;
215
215
216
216
def CC_AMDGPU : CallingConv<[
217
- CCIf<"static_cast<const GCNSubtarget&>"
218
- "(State.getMachineFunction().getSubtarget()).getGeneration() >= "
219
- "AMDGPUSubtarget::SOUTHERN_ISLANDS",
217
+ CCIf<"State.getMachineFunction().getSubtarget<GCNSubtarget>().getGeneration() >= "
218
+ "AMDGPUSubtarget::SOUTHERN_ISLANDS",
220
219
CCDelegateTo<CC_SI_SHADER>>,
221
- CCIf<"static_cast<const GCNSubtarget&>"
222
- "(State.getMachineFunction().getSubtarget()).getGeneration() >= "
223
- "AMDGPUSubtarget::SOUTHERN_ISLANDS && State.getCallingConv() == CallingConv::C",
220
+ CCIf<"State.getMachineFunction().getSubtarget<GCNSubtarget>().getGeneration() >= "
221
+ "AMDGPUSubtarget::SOUTHERN_ISLANDS && State.getCallingConv() == CallingConv::C",
224
222
CCDelegateTo<CC_AMDGPU_Func>>
225
223
]>;
226
224
Original file line number Diff line number Diff line change 15
15
// TODO Verify C convention follows SysV M68K ABI
16
16
17
17
class CCIfSubtarget<string F, CCAction A>
18
- : CCIf<!strconcat("static_cast<const M68kSubtarget &> "
19
- "(State.getMachineFunction(). getSubtarget() ).", F), A>;
18
+ : CCIf<!strconcat("State.getMachineFunction(). "
19
+ "getSubtarget<M68kSubtarget>( ).", F), A>;
20
20
21
21
//===----------------------------------------------------------------------===//
22
22
// Return Value Calling Conventions
Original file line number Diff line number Diff line change 11
11
/// CCIfSubtarget - Match if the current subtarget has a feature F.
12
12
class CCIfSubtarget<string F, CCAction A, string Invert = "">
13
13
: CCIf<!strconcat(Invert,
14
- "static_cast<const MipsSubtarget&>"
15
- "(State.getMachineFunction().getSubtarget()).",
14
+ "State.getMachineFunction().getSubtarget<MipsSubtarget>().",
16
15
F),
17
16
A>;
18
17
Original file line number Diff line number Diff line change 13
13
14
14
/// CCIfSubtarget - Match if the current subtarget has a feature F.
15
15
class CCIfSubtarget<string F, CCAction A>
16
- : CCIf<!strconcat("static_cast<const PPCSubtarget&>"
17
- "(State.getMachineFunction().getSubtarget()).",
16
+ : CCIf<!strconcat("State.getMachineFunction().getSubtarget<PPCSubtarget>().",
18
17
F),
19
18
A>;
20
19
class CCIfNotSubtarget<string F, CCAction A>
21
- : CCIf<!strconcat("!static_cast<const PPCSubtarget&>"
22
- "(State.getMachineFunction().getSubtarget()).",
20
+ : CCIf<!strconcat("!State.getMachineFunction().getSubtarget<PPCSubtarget>().",
23
21
F),
24
22
A>;
25
23
class CCIfOrigArgWasNotPPCF128<CCAction A>
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ class CCIfExtend<CCAction A>
12
12
: CCIf<"ArgFlags.isSExt() || ArgFlags.isZExt()", A>;
13
13
14
14
class CCIfSubtarget<string F, CCAction A>
15
- : CCIf<!strconcat("static_cast<const SystemZSubtarget&> "
16
- "(State.getMachineFunction(). getSubtarget() ).", F),
15
+ : CCIf<!strconcat("State.getMachineFunction(). "
16
+ "getSubtarget<SystemZSubtarget>( ).", F),
17
17
A>;
18
18
19
19
// Match if this specific argument is a fixed (i.e. named) argument.
Original file line number Diff line number Diff line change 13
13
14
14
/// CCIfSubtarget - Match if the current subtarget has a feature F.
15
15
class CCIfSubtarget<string F, CCAction A>
16
- : CCIf<!strconcat("static_cast<const X86Subtarget&> "
17
- "(State.getMachineFunction(). getSubtarget() ).", F),
16
+ : CCIf<!strconcat("State.getMachineFunction(). "
17
+ " getSubtarget<X86Subtarget>( ).", F),
18
18
A>;
19
19
20
20
/// CCIfNotSubtarget - Match if the current subtarget doesn't has a feature F.
21
21
class CCIfNotSubtarget<string F, CCAction A>
22
- : CCIf<!strconcat("!static_cast<const X86Subtarget&> "
23
- "(State.getMachineFunction(). getSubtarget() ).", F),
22
+ : CCIf<!strconcat("!State.getMachineFunction(). "
23
+ " getSubtarget<X86Subtarget>( ).", F),
24
24
A>;
25
25
26
26
/// CCIfRegCallv4 - Match if RegCall ABIv4 is respected.
You can’t perform that action at this time.
0 commit comments