This is an archive of the discontinued LLVM Phabricator instance.

[NFC][MachineFunction] Rename APIs to conform to coding style
AbandonedPublic

Authored by mtrofin on Dec 6 2021, 9:15 PM.

Details

Reviewers
None
Summary

Function names should start with lowercase, so renamed accordingly.

Diff Detail

Event Timeline

mtrofin created this revision.Dec 6 2021, 9:15 PM
mtrofin requested review of this revision.Dec 6 2021, 9:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 6 2021, 9:15 PM

Is this really worth it? It's churn for downstreams, and has little gain given this is a drop in the ocean for old code style. The LLVM Coding Standards also say:

[...] we explicitly do not want patches that do large-scale reformatting of existing code. On the other hand, it is reasonable to rename the methods of a class if you’re about to change it in some other way. Please commit such changes separately to make code review easier.

so, unless you're planning large-scale refactoring of the APIs (which seems unlikely), that reads to me as "don't".

lkail added a subscriber: lkail.Dec 6 2021, 10:12 PM
mtrofin abandoned this revision.Dec 6 2021, 10:28 PM

Is this really worth it? It's churn for downstreams, and has little gain given this is a drop in the ocean for old code style. The LLVM Coding Standards also say:

[...] we explicitly do not want patches that do large-scale reformatting of existing code. On the other hand, it is reasonable to rename the methods of a class if you’re about to change it in some other way. Please commit such changes separately to make code review easier.

so, unless you're planning large-scale refactoring of the APIs (which seems unlikely), that reads to me as "don't".

It was *very* easy to do (straight-forward, automated refactoring), so I figured I'd put it up see what people think. I wasn't aware of the explicit pushback against large-scale refactorings (thanks for pointing that out!). I can definitely piecemeal it.

Unless I'm missing something, I'm not sure how to think about the downstream aspect, nor the relative amount of old/new code styles. I could see those arguments raised vis-a-vis any API refactoring patch, and IIRC, we've generally been doing API cleanups.

foad added a comment.Dec 7 2021, 12:21 AM

Is this really worth it? It's churn for downstreams, and has little gain given this is a drop in the ocean for old code style. The LLVM Coding Standards also say:

Just to put the opposite point of view, I'm quite happy with refactoring patches like this, even though I also have to deal with downstream merge conflicts.

It would be a bit easier to resolve any conflicts if you could say exactly how you made these changes -- hopefully the answer is something simple like "I just ran git clang-format"!