[llvm-dev] RFC: On removing magic numbers assuming 8-bit bytes

Jeroen Dobbelaere via llvm-dev llvm-dev at lists.llvm.org
Fri May 3 11:00:35 PDT 2019

Hi Jesper,

> Thanks, these are interesting differences. The CHAR_BIT and byte
> relation is established in the C standard and I would prefer the byte
> terminology. It means the same thing as addressable unit but is a bit
> shorter and probably more widely known.

Looking purely from a c/c++ language viewpoint, this makes sense.
We settled on using 'addressable unit size', but any abstraction will already be helpful.

> Do you suggest any in-tree changes at some call sites using the
> suggested AdressSpace parameter or would we rely on the default value
> always? I could definitely include this, but if the parameter is never
> used, perhaps we can leave it out-of-tree for now?

Whenever optimizations are done on store/load/pointers, the address space should be taken into account.
For us it is fine to manage that part out-of-tree.


Jeroen Dobbelaere

More information about the llvm-dev mailing list