[PATCH] D29810: [RFC] Allow datalayout to have preferred alignment < ABI
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 9 19:46:49 PST 2017
arsenm created this revision.
Herald added subscribers: tpr, nhaehnle, wdng.
This is mostly used in contexts for creating temporary
stack objects. On AMDGPU, a 4-byte aligned access is
always good enough to be legal for any size. All
stack accesses additionally need to be decomposed into
4-byte accesses, so there's no benefit to increasing
the alignment and the necessary padding for wider
types is just a waste of stack space.
Allow the target to specify a lower preferred alignment.
Add a new DataLayout helper to get the preferred but
ABI respecting alignment for cases where that is necessary
(e.g. passed to an arbitrary function call).
This is the approach discussed as an alternative to https://reviews.llvm.org/D28920
https://reviews.llvm.org/D29810
Files:
docs/LangRef.rst
include/llvm/IR/DataLayout.h
lib/Analysis/Loads.cpp
lib/CodeGen/AtomicExpandPass.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/IR/DataLayout.cpp
lib/IR/Value.cpp
lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
lib/Transforms/Instrumentation/EfficiencySanitizer.cpp
lib/Transforms/Utils/SimplifyLibCalls.cpp
test/Assembler/datalayout-preferred-alignent-less-abi-alignment-i32.ll
test/Assembler/datalayout-preferred-alignent-less-size-i64.ll
test/Assembler/invalid-datalayout14.ll
test/Assembler/invalid-datalayout18.ll
test/CodeGen/AMDGPU/insert_vector_elt.ll
test/Transforms/InstCombine/low-preferred-alignment.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29810.87951.patch
Type: text/x-patch
Size: 27270 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170210/81dac782/attachment-0001.bin>
More information about the llvm-commits
mailing list