This is an archive of the discontinued LLVM Phabricator instance.

[docs] Minor fixes to CodeGenerator docs
AbandonedPublic

Authored by JOE1994 on Jun 13 2022, 3:03 PM.

Details

Summary
  • Fix incorrect word usage: commutable => commutative
  • Other changes are grammar fixes and minor improvements in phrasing

Diff Detail

Event Timeline

JOE1994 created this revision.Jun 13 2022, 3:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 13 2022, 3:03 PM
JOE1994 requested review of this revision.Jun 13 2022, 3:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 13 2022, 3:03 PM

If this commit gets approved:

Since I do not have commit access, it would be great if the reviewer could land this commit for me.
Please use "Youngsuk Kim joseph942010@gmail.com" to commit the change.

Thank you very much!

DanielMcIntosh-IBM requested changes to this revision.EditedJun 13 2022, 3:48 PM

Line 422 needs to be fixed before I resign or approve this change, but I have a few comments and questions as well.

What was the motivation for this change?

Except for the change on line 619 to correct a mistake that was a little jarring to read, these changes seem to be mostly a matter of personal preference for how you would write this document (or maybe rigid imposition of English grammar rules like when to use "less" or "fewer"). I'm personally not a fan of trivial changes like this cluttering up the commit history since they make it harder to get useful output from commands like git blame.

I know my comments below probably come off a bit harsh, and I'll say in advance that's not how I meant them. If it weren't for the change on line 422 I probably would have just resigned as a reviewer, since I don't have enough experience to know what the general attitude in the community is towards tiny inconsequential changes like this. I'd gladly approve and commit this for you if it was just the change on line 619, but for the rest (excluding line 422) I'm going to need more justification. If they're important to you, I can resign after you've fixed line 422.

llvm/docs/CodeGenerator.rst
291

I don't think this actually improves anything, except maybe removing ambiguity with the other definition of commutable ("allowing regular commuting to and from work"). If anything I feel the existing wording reads better (whether the instruction ... accesses memory, whether the instruction ... is commutable reads better to me than whether the instruction ... is commutative). Unless I'm missing something, this is a matter of personal preference and not worthy of making a change for.

422

This dramatically changes the meaning - The current form implies a limitation on the X86 divide operation ("The x86 architecture cannot use any registers except EAX and EDX for the divide operation"), while the edited form describes a feature ("Unlike other architectures the x86 can do a 32-bit divide using nothing but the EAX and EDX registers!")

1108

This does change the meaning slightly. "Is not yet finished" would imply there is a 'finished' or completed state that it hasn't yet achieved. Compare a city's infrastructure to an early access video-game. A city's infrastructure is a perpetual work in progress - always getting improved upon, repaired, expanded, etc. but there's no 'finish line'. In contrast, the early access video game has a goal that it's trying to get to. It's not that everything stops after the finish line is crossed, just that before then, it's missing major features and can't be considered a complete product. Development might not even slow down after the full release, but there shouldn't be any more loose ends.

I don't know which is more accurate here, since I don't know enough about the CodeGenerator to comment, but going based on the rest of your changes, it seems like you might be removing this because you felt it was superfluous, and I don't agree.

This revision now requires changes to proceed.Jun 13 2022, 3:48 PM
JOE1994 added inline comments.Jun 13 2022, 4:10 PM
llvm/docs/CodeGenerator.rst
291

Thank you for your comment. My understanding was that the term 'commutable' has only one definition ("allowing regular commuting to and from work"), so I was almost confident that this word was used here by mistake. If the term 'commutable' is already a frequently used term when discussing traits of operators/instructions, I'd be happy to get rid of this change.

422

I initially thought my change would make it more clear for the phrase to have the former meaning that you suggested.
Maybe it might not be the case.. I'll get rid of this change.

1108

I will keep this unchanged. Thank you for your comments.

JOE1994 abandoned this revision.Jun 13 2022, 4:15 PM

@DanielMcIntosh-IBM Thank you so much for taking your time to review this patch.

I have to agree with you that patches like this don't add much value to the codebase and rather clobber up git blame/git log results.

I decided to close this patch entirely. Thanks again for your feedback.

llvm/docs/CodeGenerator.rst
291

It is a more rare usage/definition, but it is a valid use of it: https://www.collinsdictionary.com/dictionary/english/commutable and https://www.google.com/search?q=define+commutable (that particular search result is sourced from oxford languages)

craig.topper added inline comments.
llvm/docs/CodeGenerator.rst
291

The property flag this refers to is called MCID::Commutable. So it wouldn't make sense to change the documentation without changing that too.