RE: Decomposition of given equalities

2013-12-31 Thread Simon Peyton-Jones
Yes, it's quite possible, given f, a, g, and b of different kinds, to make `f a` and `g b` have the same *kind*. But how could they ever be the same type? Ah I see. Good point. Anyway, the conclusion is that decomposing a well-kinded (f a ~ g b) into ill-kinded goals is indeed a bad thing, so

Re: memory ordering

2013-12-31 Thread Edward Z . Yang
I was thinking about my response, and realized there was one major misleading thing in my description. The load reordering I described applies to load instructions in C-- proper, i.e. things that show up in the C-- dup as: W_ x = I64[...addr...] Reads to IORefs and reads to vectors get

Re: memory ordering

2013-12-31 Thread Edward Z . Yang
Second, the optimizer is a bit more conservative when it comes to primop calls (internally referred to as unsafe foreign calls) Sorry, I need to correct myself here. Foreign primops, and most out-of-line primops, compile into jumps which end basic blocks, which constitute hard boundaries since

Re: memory ordering

2013-12-31 Thread Carter Schonwald
I suspect it's not by design, because there's certainly plans to make them inline primops, and the reordering issue of the cmm optimizer hasn't come up in the design discussion previously. (And I should add those notes to the associated tickets) On Tuesday, December 31, 2013, Edward Z. Yang