File tree Expand file tree Collapse file tree 7 files changed +23
-10
lines changed Expand file tree Collapse file tree 7 files changed +23
-10
lines changed Original file line number Diff line number Diff line change @@ -28,10 +28,10 @@ shell by setting up [direnv](https://devenv.sh/automatic-shell-activation/).
28
28
29
29
To setup the environment manually you will need:
30
30
31
- - Just: https://just.systems/
32
- - Rust ` >=1.85 ` : https://www.rust-lang.org/tools/install
33
- - uv ` >=0.3 ` : docs.astral.sh/uv/getting-started/installation
34
- - Optional: capnproto ` >=1.0 ` : https://capnproto.org/install.html
31
+ - Just: < https://just.systems/ >
32
+ - Rust ` >=1.85 ` : < https://www.rust-lang.org/tools/install >
33
+ - uv ` >=0.3 ` : < https:// docs.astral.sh/uv/getting-started/installation>
34
+ - Optional: capnproto ` >=1.0 ` : < https://capnproto.org/install.html >
35
35
Required when modifying the ` hugr-model ` serialization schema.
36
36
- Optional: llvm ` == 14.0 ` . The "llvm" feature (backed by the sub-crate ` hugr-llvm ` )
37
37
requires LLVM installed. We use the rust bindings
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ llvm14-0 = ["inkwell/llvm14-0"]
23
23
24
24
25
25
[dependencies ]
26
- inkwell = { version = " 0.5 .0" , default-features = false }
26
+ inkwell = { version = " 0.6 .0" , default-features = false }
27
27
hugr-core = { path = " ../hugr-core" , version = " 0.15.4" }
28
28
anyhow = " 1.0.98"
29
29
itertools.workspace = true
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ version will only change on major releases.
25
25
26
26
## Developing hugr-llvm
27
27
28
- See [ DEVELOPMENT] ( DEVELOPMENT.md ) for instructions on setting up the development environment.
28
+ See [ DEVELOPMENT] ( ../ DEVELOPMENT.md) for instructions on setting up the development environment.
29
29
30
30
## License
31
31
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ fn value_is_const<'c>(value: impl BasicValue<'c>) -> bool {
58
58
BasicValueEnum :: PointerValue ( v) => v. is_const ( ) ,
59
59
BasicValueEnum :: StructValue ( v) => v. is_const ( ) ,
60
60
BasicValueEnum :: VectorValue ( v) => v. is_const ( ) ,
61
+ BasicValueEnum :: ScalableVectorValue ( v) => v. is_const ( ) ,
61
62
}
62
63
}
63
64
@@ -109,6 +110,13 @@ fn const_array<'c>(
109
110
. collect_vec ( )
110
111
. as_slice ( ) ,
111
112
) ,
113
+ BasicTypeEnum :: ScalableVectorType ( t) => t. const_array (
114
+ values
115
+ . into_iter ( )
116
+ . map ( |x| x. as_basic_value_enum ( ) . into_scalable_vector_value ( ) )
117
+ . collect_vec ( )
118
+ . as_slice ( ) ,
119
+ ) ,
112
120
}
113
121
}
114
122
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ fn basic_type_undef<'c>(t: impl BasicType<'c>) -> BasicValueEnum<'c> {
47
47
BasicTypeEnum :: PointerType ( t) => t. get_undef ( ) . as_basic_value_enum ( ) ,
48
48
BasicTypeEnum :: StructType ( t) => t. get_undef ( ) . as_basic_value_enum ( ) ,
49
49
BasicTypeEnum :: VectorType ( t) => t. get_undef ( ) . as_basic_value_enum ( ) ,
50
+ BasicTypeEnum :: ScalableVectorType ( t) => t. get_undef ( ) . as_basic_value_enum ( ) ,
50
51
}
51
52
}
52
53
@@ -60,6 +61,7 @@ fn basic_type_poison<'c>(t: impl BasicType<'c>) -> BasicValueEnum<'c> {
60
61
BasicTypeEnum :: PointerType ( t) => t. get_poison ( ) . as_basic_value_enum ( ) ,
61
62
BasicTypeEnum :: StructType ( t) => t. get_poison ( ) . as_basic_value_enum ( ) ,
62
63
BasicTypeEnum :: VectorType ( t) => t. get_poison ( ) . as_basic_value_enum ( ) ,
64
+ BasicTypeEnum :: ScalableVectorType ( t) => t. get_poison ( ) . as_basic_value_enum ( ) ,
63
65
}
64
66
}
65
67
Original file line number Diff line number Diff line change @@ -45,6 +45,9 @@ fn size_of_type<'c>(t: impl BasicType<'c>) -> Option<u64> {
45
45
BasicTypeEnum :: PointerType ( t) => t. size_of ( ) . get_zero_extended_constant ( ) ,
46
46
BasicTypeEnum :: StructType ( t) => t. size_of ( ) . and_then ( |x| x. get_zero_extended_constant ( ) ) ,
47
47
BasicTypeEnum :: VectorType ( t) => t. size_of ( ) . and_then ( |x| x. get_zero_extended_constant ( ) ) ,
48
+ BasicTypeEnum :: ScalableVectorType ( t) => {
49
+ t. size_of ( ) . and_then ( |x| x. get_zero_extended_constant ( ) )
50
+ }
48
51
}
49
52
}
50
53
You can’t perform that action at this time.
0 commit comments