type variables

Bruce Carneal bcarneal at gmail.com
Sun Aug 2 15:02:17 UTC 2020


On Sunday, 2 August 2020 at 14:42:39 UTC, Bruce Carneal wrote:
> On Sunday, 2 August 2020 at 12:16:32 UTC, Stefan Koch wrote:
>>
>> Hmm yes, everyone has their own type representation, as much 
>> as I like bashing LLVM
>> for this they can't be faulted as they try to be a general 
>> framework.
>>
>
> Yes. Reportedly LLVM has had problems with a mutable type 
> representation that is "uniqueified" after the fact.  IIUC, DMD 
> simplifies this significantly by constraining the evolution of 
> the internal type representation.  That constraint appears to 
> be so strong, strongly pure IIUC, that unique names could be 
> provided far upstream of any deep template invocations.
>

Separately, isn't structural comparison (comparison without 
names) important for template bloat reduction?  Does DMD use 
names and attributes to qualify access up front but reduce to low 
level equivalence before handing off to the back end?

Since you have to let the back end do deduplication in the LTO 
case my guess is that the front end doesn't waste time on it.





More information about the Digitalmars-d mailing list