[PATCH] D61607: Introduce an option to stripPointerCasts to force the same bit pattern

Ayke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 18 08:09:33 PDT 2019


aykevl added a comment.

To me (someone from outside LLVM), the "keep bit pattern" argument looks confusing. Pointer casts do not necessarily change the bit pattern? In fact, it seems to me that most pointer casts preserve the bit pattern but change the meaning of the pointer (example: address space 1 on AVR which points into flash instead of RAM - no bits are changed with an `addrspacecast`). Names like `stripTrivialPointerCasts` and `stripAddressSpaceAndPointerCasts` look much more obvious to me. Or did I miss the real intent of the change here?
In other words, I would suggest renaming `stripPointerCastsSameBitPattern` to `stripTrivialPointerCasts`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61607





More information about the llvm-commits mailing list