[cfe-dev] [llvm-dev] [RFC] Introducing a byte type to LLVM

Ralf Jung via cfe-dev cfe-dev at lists.llvm.org
Tue Jun 15 13:15:46 PDT 2021


Hi James,

>> Integers demonstrably do not carry provenance; see
>> <https://www.ralfj.de/blog/2020/12/14/provenance.html> for a detailed
>> explanation of why.
> 
> That article is nice in the way it is trying to describe what the problem is.
> Extract from the article:
> "How can we fix this?
> To fix the problem, we will have to declare one of the three
> optimizations incorrect and stop performing it. Speaking in terms of
> the LLVM IR semantics, this corresponds to deciding whether pointers
> and/or integers have provenance:
> 1) We could say both pointers and integers have provenance, which
> invalidates the first optimization.
> 2) We could say pointers have provenance but integers do not, which
> invalidates the second optimization.
> 3) We could say nothing has provenance, which invalidates the third
> optimization."
> 
> This is really the part that I disagree with. There are more possible
> alternatives than just 1, 2 and 3.

I am interested to hear those. :)
Certainly, we have to invalidate at least one of the optimizations -- if all 3 
optimizations are valid, we have a contradiction.

Kind regards,
Ralf


More information about the cfe-dev mailing list