================
@@ -230,9 +230,23 @@ static bool dontUseFastISelFor(const Function &Fn) {
// Debug info on those is reliant on good Argument lowering, and FastISel is
// not capable of lowering the entire function. Mixing the two selectors tend
// to result in poor lowering of Arguments.
- return any_of(Fn.args(), [](const Argument &Arg) {
- return Arg.hasAttribute(Attribute::AttrKind::SwiftAsync);
- });
+ if (any_of(Fn.args(), [](const Argument &Arg) {
+ return Arg.hasAttribute(Attribute::AttrKind::SwiftAsync);
+ }))
+ return true;
+
+ // Fall back to SelectionDAG for the whole function when the
----------------
hoodmane wrote:
I think the issue is that the options available are either to fall back for the
whole function by returning true from this function or to say no to selecting
the call. I don't 100% understand why saying no to selecting the call doesn't
work but it seems to cause the call and the `llvm.wasm.funcref.to_ptr` to be
split into separate dags and then it attempts to select
`llvm.wasm.funcref.to_ptr` by itself but that makes the pointer escape and hit
the diagnostic saying we can't materialize a pointer for a funcref.
I tried this:
https://github.com/llvm/llvm-project/pull/203165/changes/52981958249975eb74a5edde4cdbf16fc1fac647#diff-3af0c27d2a6c22fbb538e6016b3cd0528242fb93a7b122ee288533b1e3a64f2bR940-R947
You can see the error I got here:
https://github.com/llvm/llvm-project/actions/runs/27369534986/job/80877889171#step:3:14134
Another option is I could go back to implementing funcref call selection in
FastISel. It adds about 60 lines to the diff. I did that here:
https://github.com/llvm/llvm-project/pull/203165/changes/fdcf148db1df4e1d4a12df985998b0f6868ff8fb#diff-3af0c27d2a6c22fbb538e6016b3cd0528242fb93a7b122ee288533b1e3a64f2bR941-R983
https://github.com/llvm/llvm-project/pull/203165
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits