[PATCH] D74700: [IR] Remove temporary const operator created in Value::getPointerAlignment()

Mikhail Lychkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 17 02:47:05 PST 2020


mlychkov added a comment.

In D74700#1878635 <https://reviews.llvm.org/D74700#1878635>, @lebedev.ri wrote:

> I don't believe the question
>
> In D73131#1865811 <https://reviews.llvm.org/D73131#1865811>, @nikic wrote:
>
> > Sounds pretty odd to me too. From a quick grep, there's only a handful of `destroyConstant()` uses outside GlobalOpt, and those tend to deal with `BlockAddress` only (which is somewhat particular about uses).
>
>
> was answered. Do we have this guarantee in the first place?


Maybe, we don't have it. But I thought it wasn't a good practice to change something in get-methods (except caches, maybe). If we can cleanup instances after some unexpected changes why not to do so?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74700/new/

https://reviews.llvm.org/D74700





More information about the llvm-commits mailing list