This is an archive of the discontinued LLVM Phabricator instance.

Split the calling convention and statepoint flags operand to STATEPOINT into two separate operands.
ClosedPublic

Authored by pgavlin on May 8 2015, 2:33 PM.

Details

Summary
  • Added documentation for the CC and Flags Locations created by statepoints.
  • Added some suggested comments

Diff Detail

Repository
rL LLVM

Event Timeline

pgavlin updated this revision to Diff 25371.May 8 2015, 2:33 PM
pgavlin retitled this revision from to Split the calling convention and statepoint flags operand to STATEPOINT into two separate operands..
pgavlin updated this object.
pgavlin edited the test plan for this revision. (Show Details)
pgavlin added reviewers: reames, sanjoy.
pgavlin added a subscriber: Unknown Object (MLST).
reames requested changes to this revision.May 11 2015, 5:02 PM
reames edited edge metadata.

Minor comments below. Looks close to ready.

I'm mildly disturbed you didn't need to change anything else in the backend. Did you audit things like X86MCInstLowering and X86ISelLowering to make sure they weren't using raw indices into the operand list?

include/llvm/CodeGen/StackMaps.h
100 ↗(On Diff #25371)

Why two enums? I suspect there's a semantic difference, possibly a name or comment is appropriate?

test/CodeGen/X86/statepoint-allocas.ll
75 ↗(On Diff #25371)

With this change, you're changing the public format. Thus, we need to update: http://llvm.org/docs/Statepoints.html#stack-map-format

Having said that, it looks like the documentation never included the flags at all. Oops. Can you add entries for both calling convention and flags?

This revision now requires changes to proceed.May 11 2015, 5:02 PM

I did, yes.Nearly all of the code that would be sensitive to operand indices is in StackMap.{c,h}, and it is very good about using accessors and/or symbolic offsets.

include/llvm/CodeGen/StackMaps.h
100 ↗(On Diff #25371)

There is a semantic difference:

  • {NCallArgsPos, CallTargetPos} are absolute offsets from the start of the argument list
  • {CCOfset, FlagsOffset, NumVMSArgsOffset} are relative offsets from the start of the meta-args

I'll add a comment to that effect.

test/CodeGen/X86/statepoint-allocas.ll
75 ↗(On Diff #25371)

Will do.

pgavlin updated this revision to Diff 25596.May 12 2015, 9:13 AM
pgavlin updated this object.
pgavlin edited edge metadata.
reames accepted this revision.May 12 2015, 10:31 AM
reames edited edge metadata.

LGTM. One optional comment, no further review needed.

Thanks.

docs/Statepoints.rst
486 ↗(On Diff #25596)

Can you add something to the effect of: This constant is a valid calling convention identifier (http://llvm.org/docs/LangRef.html#calling-conventions) for the version of LLVM used to generate the stackmap. There are no additional compatibility guarantees made for this field over what LLVM provides elsewhere w.r.t. these indentifiers.

This revision is now accepted and ready to land.May 12 2015, 10:31 AM
This revision was automatically updated to reflect the committed changes.