pmatos added a comment. In D104797#2837417 <https://reviews.llvm.org/D104797#2837417>, @tlively wrote:
> In D104797#2836475 <https://reviews.llvm.org/D104797#2836475>, @pmatos wrote: > >> @tlively Do you think it would be ok to re-add the code removed in >> `ac81cb7e` but only error if the pointer is to an **opaque** non-integral >> type? > > Unfortunately that wouldn't be future-proof given the ongoing project to > remove type information from pointers. I think the best we can do right now > is call `report_fatal_error` from the backend whenever a reference type is > the operand or result of ptrtoint or inttoptr. Which 'ongoing project' is this and how can I obtain more information about it? Who's leading it? Before the crashing, the only place we seem to touch the Wasm backend is in `WebAssemblyDAGToDAGISel::runOnMachineFunction`. Then this calls `SelectionDAGISel::runOnMachineFunction`, which visits each node in the Function and crashes when trying to call `getPtrExtOrTrunc` because it cannot create a `TRUNCATE` node for a zero sized type. So, if you prefer to have a `report_fatal_error` in the WebAssembly backend, we will need to visit the nodes in the function in `WebAssemblyDAGToDAGISel::runOnMachineFunction` before calling the generic `runOnMachineFunction`. I will look at how to proceed in this direction, but I am also interested in following this project on removing type information from pointers in LLVM, so any refs would be great. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104797/new/ https://reviews.llvm.org/D104797 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits