Re: How to defeat the optimizer in GDC

2019-05-20 Thread Mike Franklin via D.gnu
On Monday, 20 May 2019 at 08:21:19 UTC, Iain Buclaw wrote: Looks like you've done a typo to me. Memory should be a clobber, not an input operand. Yes, that too.

Re: How to defeat the optimizer in GDC

2019-05-20 Thread Mike Franklin via D.gnu
On Monday, 20 May 2019 at 08:11:19 UTC, Mike Franklin wrote: But I can't get GDC to do the same: https://explore.dgnu.org/z/quCjhU Is this currently possible in GDC? Gah!! Ignore that. `version (GNU)`, not `version(GDC)`. This works: void use(void* p) { version(LDC) { imp

Re: How to defeat the optimizer in GDC

2019-05-20 Thread Iain Buclaw via D.gnu
On Monday, 20 May 2019 at 08:11:19 UTC, Mike Franklin wrote: I'm trying to benchmark some code, but the optimizer is basically removing all of it, so I'm benchmarking nothing. I'd like to do something like what Chandler Carruth does here to defeat the optimizer: https://www.youtube.com/watch

How to defeat the optimizer in GDC

2019-05-20 Thread Mike Franklin via D.gnu
I'm trying to benchmark some code, but the optimizer is basically removing all of it, so I'm benchmarking nothing. I'd like to do something like what Chandler Carruth does here to defeat the optimizer: https://www.youtube.com/watch?v=nXaxk27zwlk&feature=youtu.be&t=2446 Here presents the fol