[PATCH] D76674: [Attributor] Derive better alignment for accessed pointers
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 24 01:03:31 PDT 2020
jdoerfert created this revision.
jdoerfert added reviewers: lebedev.ri, uenoku, sstefan1, baziotis.
Herald added subscribers: arphaman, bollu, hiraditya.
Herald added a project: LLVM.
lebedev.ri added a comment.
jdoerfert updated this revision to Diff 252239.
jdoerfert updated this revision to Diff 252240.
That's the patch i showed, yes :)
I'm not sure this is sound.
Given underaligned load, we can't just take max(align of load, abi alignment)
jdoerfert added a comment.
In D76674#1938540 <https://reviews.llvm.org/D76674#1938540>, @lebedev.ri wrote:
> That's the patch i showed, yes :)
> I'm not sure this is sound.
> Given underaligned load, we can't just take max(align of load, abi alignment)
Hm, so we can only look at the abi if the load alignment is unspecified?
jdoerfert added a comment.
Repsect underaligned accesses, already tested in `Transforms/Attributor/ArgumentPromotion/alignment.ll`
jdoerfert added a comment.
Simplify helper code
Use DL & ABI information for better alignment deduction, e.g., if a type
is accessed and the ABI specifies an alignment requirement for such an
access we can use it. This is based on a patch by @lebedev.ri and
inspired by getBaseAlign in Loads.cpp.
Depends on D76673 <https://reviews.llvm.org/D76673>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D76674
Files:
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/test/Transforms/Attributor/ArgumentPromotion/2008-07-02-array-indexing.ll
llvm/test/Transforms/Attributor/ArgumentPromotion/X86/min-legal-vector-width.ll
llvm/test/Transforms/Attributor/ArgumentPromotion/attrs.ll
llvm/test/Transforms/Attributor/ArgumentPromotion/byval-2.ll
llvm/test/Transforms/Attributor/ArgumentPromotion/chained.ll
llvm/test/Transforms/Attributor/ArgumentPromotion/musttail.ll
llvm/test/Transforms/Attributor/ArgumentPromotion/sret.ll
llvm/test/Transforms/Attributor/callbacks.ll
llvm/test/Transforms/Attributor/dereferenceable-1.ll
llvm/test/Transforms/Attributor/dereferenceable-2.ll
llvm/test/Transforms/Attributor/heap_to_stack.ll
llvm/test/Transforms/Attributor/misc.ll
llvm/test/Transforms/Attributor/range.ll
llvm/test/Transforms/Attributor/readattrs.ll
llvm/test/Transforms/Attributor/value-simplify.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76674.252240.patch
Type: text/x-patch
Size: 56650 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200324/52474278/attachment-0001.bin>
More information about the llvm-commits
mailing list