[llvm-dev] Load combine pass
Sanjoy Das via llvm-dev
llvm-dev at lists.llvm.org
Wed Sep 28 17:25:02 PDT 2016
Hi David,
David Chisnall via llvm-dev wrote:
> On 28 Sep 2016, at 16:50, Philip Reames via
llvm-dev<llvm-dev at lists.llvm.org> wrote:
>> At this point, my general view is that widening transformations of
any kind should be done very late. Ideally, this is something the
backend would do, but doing it as a CGP like fixup pass over the IR is
also reasonable.
>
> I’m really glad to see that this is gone in GVN - it will reduce our
> diffs a lot when we do the next import. The GVN load widening is not
> sound in the presence of hardware-enforced spacial memory safety, so
> we ended up with the compiler inserting things that caused hardware
> bounds checks to fail and had to disable it in a few places.
>
> If you’re reintroducing it, please can we have a backend option to
> specify whether it’s valid to widen loads beyond the extents (for
> example, for us it is not valid to widen an i16 load followed by an i8
> load to an i32 load). Ideally, we’d also want the back end to supply
Don't you have to mark the functions you generate as
"Attribute::SanitizeAddress"? We should definitely make the
speculative form of this transform (i.e. "load i32, load i16" -->
"load i64") predicated on Attribute::SanitizeAddress.
-- Sanjoy
More information about the llvm-dev
mailing list