[PATCH] D33162: IR: Give function GlobalValue::getRealLinkageName() a less misleading name: getPGOName().

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 13 14:57:29 PDT 2017


pcc added a comment.

In https://reviews.llvm.org/D33162#754183, @mehdi_amini wrote:

> In https://reviews.llvm.org/D33162#754180, @pcc wrote:
>
> > > Most of the uses reads quite wrong since it has nothing to do with PGO.
> >
> > Yes, that's the point :)
> >
> > Use of a function named getPGOName() in code that has nothing to do with PGO stands out and makes it more obvious that there is a bug. Using a "better" name would increase the chance of the function being used incorrectly in other places.
>
>
> What is the plan for all these uses your updating in this patch? Why don't you change these to use the "right" thing?


I wasn't planning to do that, I just wanted to make a change to prevent accidental use of this function, which I think is better than the status quo.


https://reviews.llvm.org/D33162





More information about the llvm-commits mailing list