__assume

David Nadlinger via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Fri Feb 20 14:37:26 PST 2015


On 20 Feb 2015, at 10:33, via digitalmars-d-ldc wrote:
> Does LDC provide some means for providing assumptions to the compiler, 
> for library authors? One use case is to provide assumptions about 
> alignment of void pointers and similar constrains that are known to 
> hold for library ADTs.

Not yet. I wondered how to best implement this a while back, but decided 
that I needed to have a more in-depth look at the related parts of the 
LLVM infrastructure to be able to decide on the best design. I didn't 
quite get around to that since.

It seems like Rust chose a very simple implementation 
(https://github.com/rust-lang/rust/issues/18051), which would be trivial 
to add to LDC's druntime. Pull requests are very welcome, as always.

Cheers,
David


More information about the digitalmars-d-ldc mailing list