[LLVMdev] Copy Instructions?
Chris Lattner
clattner at apple.com
Wed Jan 28 09:32:17 PST 2009
On Jan 28, 2009, at 9:06 AM, David Greene wrote:
> On Tuesday 27 January 2009 18:28, Eli Friedman wrote:
>
>> You can use a no-op bitcast for scalars, but there isn't any reliable
>> way to do it for all first-class values.
>
> Guh.
>
>> That said, I don't quite follow the issue. This is SSA, so the
>> only way a
>> value can change is if you change the code.
>
> This isn't (yet) SSA. This is mem2reg turning things into SSA.
>
>> I'm not really following what the issue is in this testcase, though,
>> so I could be missing something. The way you're describing it,
>> mem2reg appears to be working as intended; the correct completion is
>> in fact as follows:
>> // x = phi(x.0, expr)
>> // y = phi(y.0, x)
>
> Yes, that's what mem2reg ends up with.
Why is this a problem? All phis execute "atomically". What problem
are you seeing in practice?
-Chris
More information about the llvm-dev
mailing list