[patch] Fix pr14893
Rafael EspĂndola
rafael.espindola at gmail.com
Tue Jan 28 07:46:12 PST 2014
> This looks useful, thanks.
>
> + // semantic we don't understand.
> + // We keep tbaa since the type should still be the same.
>
> s/semantic/semantics/
>
> Also, to be specific about TBAA, I would say that we're allowed to assume that there are no control dependencies on the load's type information (maybe we should add this to the language reference).
When I started writing this I realized it was probably not correct:
union foo {
int a;
float b;
};
bool f(foo *x);
void use_int(int);
void use_float(float);
void g() {
foo t;
bool b = f(&t);
if (b)
use_int(t.a);
else
use_float(t.b);
}
If we decide to move the loads (not profitable in the reduce example),
the tbaa flag would no longer be valid.
The attached patch now explicitly checks that we drop tbaa. I kept the
more general dropUnknownMetadata implementation.
Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr14893.patch
Type: text/x-patch
Size: 4986 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140128/c887baf6/attachment.bin>
More information about the llvm-commits
mailing list