This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Implement byval arguments
ClosedPublic

Authored by dschuff on Jan 26 2016, 3:46 PM.

Details

Summary

Just does the simple allocation of a stack object and passes
a pointer to the callee.

Diff Detail

Event Timeline

dschuff updated this revision to Diff 46067.Jan 26 2016, 3:46 PM
dschuff retitled this revision from to [WebAssembly] Implement byval arguments.
dschuff updated this object.
dschuff added reviewers: jfb, sunfish.
dschuff added a subscriber: llvm-commits.
dschuff added inline comments.Jan 26 2016, 3:47 PM
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
354

This CL makes a new vector with copies of all the non-byval OutVals. Is that necessary, or can I overwrite CLI.OutVals?

sunfish accepted this revision.Jan 27 2016, 12:45 PM
sunfish edited edge metadata.
sunfish added inline comments.
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
354

I think you can safely overwrite CLI.OutVals if you want to.

359

Although if you don't choose to overwrite CLI.OutVals, please rename this OutVals to something like AdjustedOutVals, so that people who aren't reading the code closely don't assume it's a reference to CLI.OutVals (I did this as I was reading this patch at first and was confused :-)).

This revision is now accepted and ready to land.Jan 27 2016, 12:45 PM
This revision was automatically updated to reflect the committed changes.