This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Remove TODO on wasm.extract.exception intrinsic (NFC)
ClosedPublic

Authored by aheejin on Jan 30 2019, 3:11 PM.

Details

Summary

We planned to delete this intrinsic and do custom lowering from
wasm.get.exception, which has a token argument, to
EXTRACT_EXCEPTION, a wasm pseudo instruction that simulates popping a
value from the wasm stack.

To do that, we need to introduce a new WebAssemblyISD node for this,
which itself is not a problem, but also have to introduce the
WebAssemblyISD namespace in SelectionDAGBuilder.cpp. I don't think any
other targets are doing that in the file. And also putting a
target-specific intrinsic in the common file is a little weird too. (All
other intrinsic functions in this visitIntrinsicCall functions are not
target-specific ones. Other target-specific intrinsics are usually
handled in lib/Target/[TargetName]/[TargetName]ISelLowering.cpp. The
reason we can't do this is it has a token argument.

Anyway, so I think I prefer the current code with one redundant
intrinsic more than adding one more WebAssemblyISD node and
also introducing the WebAssemblyISD namespace into
SelectionDAGBuilder.cpp. What do you think?

Diff Detail

Repository
rL LLVM

Event Timeline

aheejin created this revision.Jan 30 2019, 3:11 PM
aheejin edited the summary of this revision. (Show Details)Jan 30 2019, 3:12 PM
aheejin edited the summary of this revision. (Show Details)
dschuff accepted this revision.Jan 30 2019, 3:35 PM

yeah, seems fine. we can always change our mind in the future even in the absence of a TODO :)

This revision is now accepted and ready to land.Jan 30 2019, 3:35 PM
This revision was automatically updated to reflect the committed changes.

Just noticed, but the discussion should maybe have gone into a comment on Phab rather than the commit message itself...