digitalmars.D.ldc - Null check optimization
- deadalnix (9/9) Dec 04 2015 Hi all,
- Jakob Bornecrantz (4/13) Dec 13 2015 Very intreresting, once support has been added to the druntime
- David Nadlinger via digitalmars-d-ldc (6/13) Dec 13 2015 It's certainly an interesting approach. I supposed we would need to look...
Hi all, I was at the LLVM meetup yesterday and talked with a contributor that use LLVM to run java code. One on the very interesting that came up is a way to use segfault in order to do null cheks. It is explained here: http://llvm.org/docs/FaultMaps.html#make-implicit-metadata I know that ldc generate null checks when calling various functions. It may be a good idea, considering this is unexpected, ot use the same mechanism in LDC.
Dec 04 2015
On Friday, 4 December 2015 at 23:33:01 UTC, deadalnix wrote:Hi all, I was at the LLVM meetup yesterday and talked with a contributor that use LLVM to run java code. One on the very interesting that came up is a way to use segfault in order to do null cheks. It is explained here: http://llvm.org/docs/FaultMaps.html#make-implicit-metadata I know that ldc generate null checks when calling various functions. It may be a good idea, considering this is unexpected, ot use the same mechanism in LDC.Very intreresting, once support has been added to the druntime other backends should be able to do the same optimization. Cheers, Jakob.
Dec 13 2015
On 5 Dec 2015, at 0:33, deadalnix via digitalmars-d-ldc wrote:I was at the LLVM meetup yesterday and talked with a contributor that use LLVM to run java code. One on the very interesting that came up is a way to use segfault in order to do null cheks. It is explained here: http://llvm.org/docs/FaultMaps.html#make-implicit-metadata I know that ldc generate null checks when calling various functions. It may be a good idea, considering this is unexpected, ot use the same mechanism in LDC.It's certainly an interesting approach. I supposed we would need to look into which checks actually make it to the hot patch of optimized builds, though, as the comparatively small performance gain probably wouldn't be worth it in debug builds. — David
Dec 13 2015