[PATCH] D53162: [DataLayout] Add bit width of pointers to global values

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 13 07:17:59 PDT 2018


nhaehnle added a comment.

> no target-independent transforms care about known bits for pointers beyond figuring out the alignment of a pointer.

The other patch in this stack (https://reviews.llvm.org/D53160) cares about it. And sure, that patch is target-dependent, but it's based on the target-independent computeKnownBits. The canonical way that this kind of information is passed into computeKnownBits is via the DataLayout. The alternative would be to start passing some separate target-info into computeKnownBits, which seems //way// uglier to me.

So yeah, I hear your complaint, but unless you can come up with a constructive alternative, this patch is the way to go.


Repository:
  rL LLVM

https://reviews.llvm.org/D53162





More information about the llvm-commits mailing list