low.func.def
← low dialect
Target-bound low function definition with register-typed signature values.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
SymbolDefine, IsolatedFromAbove |
| Interfaces |
FuncLike |
Symbol contract
| Property |
Value |
| Kind |
function |
| Defining field |
callee |
| Interfaces |
func_like, callable |
| Flags |
— |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Result |
results |
register |
variadic |
— |
| Attribute |
callee |
symbol |
required |
— |
| Attribute |
target |
symbol (target) |
optional |
— |
| Attribute |
descriptor_set |
string |
required |
Canonical descriptor-set key governing the low representation. |
| Attribute |
abi |
enum ExportAbiKind |
optional |
— |
| Attribute |
abi_attrs |
dict |
optional |
— |
| Attribute |
abi_layout |
dict |
optional |
— |
| Attribute |
export_symbol |
string |
optional |
— |
| Attribute |
export_attrs |
dict |
optional |
— |
| Attribute |
visibility |
enum Visibility |
optional |
— |
| Attribute |
cc |
enum CallingConv |
optional |
— |
| Attribute |
purity |
enum Purity |
optional |
— |
| Attribute |
allocation |
enum LowAllocationMode |
optional |
— |
| Attribute |
schedule |
enum LowScheduleMode |
optional |
— |
| Attribute |
predicates |
predicate_list |
optional |
— |
| Attribute |
retain |
enum Retain |
optional |
— |
| Region |
body |
region |
required |
Low function body. (terminator low.return.) |
Verification constraints
BlockArgsSatisfy(body)
YieldCountMatchesResults(body, results)
YieldTypesMatchResults(body, results)
Examples
low.func.def target<amdgpu.gfx11.generic.core>(@gfx11_generic) @add(%lhs: reg<amdgpu.vgpr x1>, %rhs: reg<amdgpu.vgpr x1>) -> (reg<amdgpu.vgpr x1>) {
%sum = low.op<amdgpu.v_add_u32>(%lhs, %rhs) : (reg<amdgpu.vgpr x1>, reg<amdgpu.vgpr x1>) -> reg<amdgpu.vgpr x1>
low.return %sum : reg<amdgpu.vgpr x1>
}
low.func.def target<amdgpu.rdna3_5.core> @invocation_bound() {
low.return
}
low.func.def allocation(fixed) schedule(locked) target<amdgpu.gfx11.generic.core>(@gfx11_generic) @agent_authored(%lhs: reg<amdgpu.vgpr x1>) {
low.return
}