Page MenuHomePhabricator

[docs] [NFC] Clarify the datalayout documentation
ClosedPublic

Authored by woodruffw on Aug 30 2021, 6:07 PM.

Details

Summary

This patch fixes a couple of small oversights in the documentation for the datalayout specification:

  • The v and f specifications are subject to the same constraints on <size> as i is.
  • The p[n] specification didn't mark <idx> as optional, despite being documented and parsed as such.
  • Similarly, none of the alignment specifications require <pref>.

Diff Detail

Event Timeline

woodruffw created this revision.Aug 30 2021, 6:07 PM
woodruffw requested review of this revision.Aug 30 2021, 6:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 30 2021, 6:07 PM
woodruffw updated this revision to Diff 369616.Aug 30 2021, 8:39 PM
woodruffw edited the summary of this revision. (Show Details)

Also clarify that <pref> is optional in pointer alignment specifications.

woodruffw updated this revision to Diff 369618.Aug 30 2021, 8:53 PM
woodruffw edited the summary of this revision. (Show Details)

Mark <pref> as optional in all of the alignment specs, since the DataLayout parser treats it as optional.

Ping for review on this.

Another gentle ping for review.

woodruffw added a reviewer: Restricted Project.Oct 3 2021, 7:57 PM
xgupta edited reviewers, added: aqjune, fhahn; removed: Restricted Project.Oct 8 2021, 8:20 PM
fhahn added a subscriber: t.p.northover.

Looks good to me in general, thanks for updating the docs! Perhaps @t.p.northover has any further suggestions?

nikic added a subscriber: nikic.Oct 11 2021, 3:43 AM
nikic added inline comments.
llvm/docs/LangRef.rst
2563

Pre-existing, but there seems to be some words missing here. "is the size of the index that is used"?

Fixed awkward language.

llvm/docs/LangRef.rst
2563

Yeah, that reads awkwardly to me. Fixed.

xgupta accepted this revision.Oct 12 2021, 5:16 AM
This revision is now accepted and ready to land.Oct 12 2021, 5:16 AM