This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Fix selection of global calls
ClosedPublic

Authored by aheejin on Apr 1 2023, 9:17 PM.

Details

Summary

When selecting calls, currently we unconditionally remove Wrappers of
the call target. But we are supposed to do that only when the target is
a function, an external symbol (= library function), or an alias of a
function. Otherwise we end up directly calling globals that are not
functions.

Fixes https://github.com/llvm/llvm-project/issues/60003.

Diff Detail

Event Timeline

aheejin created this revision.Apr 1 2023, 9:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 1 2023, 9:17 PM
Herald added subscribers: pmatos, asb, wingo and 6 others. · View Herald Transcript
aheejin requested review of this revision.Apr 1 2023, 9:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 1 2023, 9:17 PM
This revision is now accepted and ready to land.Apr 2 2023, 12:04 AM
tlively accepted this revision.Apr 3 2023, 7:57 AM

LGTM % comment clarification.

llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
254

What is "it" at the beginning of this first sentence? Also, the second sentence has a lot of double (or triple?) negatives, so it slightly confusing.

aheejin updated this revision to Diff 510989.Apr 4 2023, 8:46 PM
aheejin marked an inline comment as done.

Improve comments

This revision was automatically updated to reflect the committed changes.