[PATCH] D76175: [Attributor][NFC] Typos in doc

Stefanos Baziotis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 14 07:29:12 PDT 2020


baziotis added a comment.

Today I started reading through the whole Attributor, or at least its core parts, because I think otherwise I won't
have a good enough understanding to proceed. This is the start of a series of small patches that will mostly be NFC
improvements to docs with which I hope I'll have the opportunity to ask questions about different decisions in the Attributor.

Starting off, I tried multiple times to read `IRPosition` and in my humble opinion, it seems //way// too complicated.
Specifically the `KindOrArgNo`. This coupling of basically 2 kinds of info in one seems unnecessary. Plus, `IRP` currently
saves a pointer (`Value *`, the anchor value) and an `int`. For most users of LLVM, a pointer will take 8 bytes. Because of alignment,
we will use another 8 bytes anyway for `KindOrArgNo`, not 4. And I think it will be so much simpler to use the wasted 4 bytes
to decouple the values. That is, one `int` for the kind and one `int`for the argument number.

If we all agree in that, of course I'm willing to do the related patches.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76175





More information about the llvm-commits mailing list