[cfe-dev] [llvm-dev] Proposal for string keys for address_space

David Greene via cfe-dev cfe-dev at lists.llvm.org
Tue Jan 15 08:29:45 PST 2019

Leonard Chan via cfe-dev <cfe-dev at lists.llvm.org> writes:

> I don't know where the integers are emitted for address spaces during
> codegen, but I figure what we could do is before IR codegen, keep a
> set of all integer spaces used. During codegen, the integer we emit
> will be a random number up to the largest possible address space, that
> is not in this initial set, for each string in our address space
> string container. In this case, the integer values would be lazily
> evaluated.

I get nervous any time "random" is used with respect to compiler output.
We need things to be deterministic to be able to debug problems.


More information about the cfe-dev mailing list