[PATCH] D16516: [opaque pointer types] Add an explicit value type to the byval attribute.

Manuel Jacob via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 23 19:05:28 PST 2016


mjacob created this revision.
mjacob added subscribers: dblaikie, eddyb, llvm-commits.
mjacob added a dependency: D16515: [Attributes] Implement type attributes..
Herald added a reviewer: tstellarAMD.
Herald added subscribers: dsanders, jyknight, qcolombet, MatzeB, jholewinski.

The semantics of a pointer parameter with the byval attribute depend on
the pointee type.  In a world with opaque pointer types we need to
record this type (or, at least its size and alignment) explicitly.

It is yet to be decided whether this is the right approach.  Discussion
will be continued on llvm-dev in parallel.

Depends on D16515.

http://reviews.llvm.org/D16516

Files:
  include/llvm/IR/Attributes.h
  include/llvm/IR/Type.h
  lib/AsmParser/LLParser.cpp
  lib/Bitcode/Reader/BitcodeReader.cpp
  lib/IR/AsmWriter.cpp
  lib/IR/AttributeImpl.h
  lib/IR/Attributes.cpp
  test/Analysis/BasicAA/2008-04-15-Byval.ll
  test/Analysis/BasicAA/byval.ll
  test/Analysis/DivergenceAnalysis/AMDGPU/kernel-args.ll
  test/Assembler/2008-01-11-VarargAttrs.ll
  test/Bitcode/attributes-3.3.ll
  test/Bitcode/attributes.ll
  test/Bitcode/compatibility-3.6.ll
  test/Bitcode/compatibility-3.7.ll
  test/Bitcode/compatibility.ll
  test/Bitcode/highLevelStructure.3.2.ll
  test/CodeGen/AArch64/func-argpassing.ll
  test/CodeGen/AArch64/func-calls.ll
  test/CodeGen/AMDGPU/llvm.AMDGPU.kill.ll
  test/CodeGen/AMDGPU/llvm.SI.fs.interp.ll
  test/CodeGen/AMDGPU/llvm.SI.load.dword.ll
  test/CodeGen/AMDGPU/mubuf.ll
  test/CodeGen/AMDGPU/ret.ll
  test/CodeGen/AMDGPU/sgpr-copy.ll
  test/CodeGen/AMDGPU/si-scheduler.ll
  test/CodeGen/AMDGPU/si-sgpr-spill.ll
  test/CodeGen/AMDGPU/vgpr-spill-emergency-stack-slot.ll
  test/CodeGen/AMDGPU/wait.ll
  test/CodeGen/ARM/2009-05-05-DAGCombineBug.ll
  test/CodeGen/ARM/2011-06-09-TailCallByVal.ll
  test/CodeGen/ARM/2011-06-16-TailCallByVal.ll
  test/CodeGen/ARM/2012-10-04-AAPCS-byval-align8.ll
  test/CodeGen/ARM/2012-10-04-FixedFrame-vs-byval.ll
  test/CodeGen/ARM/2012-10-04-LDRB_POST_IMM-Crash.ll
  test/CodeGen/ARM/2012-10-18-PR14099-ByvalFrameAddress.ll
  test/CodeGen/ARM/2013-04-05-Small-ByVal-Structs-PR15293.ll
  test/CodeGen/ARM/2013-05-02-AAPCS-ByVal-Structs-C4-C5-VFP.ll
  test/CodeGen/ARM/2013-05-02-AAPCS-ByVal-Structs-C4-C5-VFP2.ll
  test/CodeGen/ARM/2013-05-13-AAPCS-byval-padding2.ll
  test/CodeGen/ARM/2013-06-03-ByVal-2Kbytes.ll
  test/CodeGen/ARM/2014-02-21-byval-reg-split-alignment.ll
  test/CodeGen/ARM/align-sp-adjustment.ll
  test/CodeGen/ARM/byval-align.ll
  test/CodeGen/ARM/byval_load_align.ll
  test/CodeGen/ARM/ssp-data-layout.ll
  test/CodeGen/ARM/struct-byval-frame-index.ll
  test/CodeGen/ARM/struct_byval.ll
  test/CodeGen/ARM/struct_byval_arm_t1_t2.ll
  test/CodeGen/BPF/byval.ll
  test/CodeGen/CPP/attributes.ll
  test/CodeGen/Generic/2010-11-04-BigByval.ll
  test/CodeGen/Hexagon/struct_args_large.ll
  test/CodeGen/MSP430/byval.ll
  test/CodeGen/Mips/cprestore.ll
  test/CodeGen/Mips/largeimmprinting.ll
  test/CodeGen/Mips/load-store-left-right.ll
  test/CodeGen/Mips/o32_cc_byval.ll
  test/CodeGen/Mips/tailcall.ll
  test/CodeGen/Mips/unalignedload.ll
  test/CodeGen/NVPTX/bug21465.ll
  test/CodeGen/NVPTX/lower-kernel-ptr-arg.ll
  test/CodeGen/NVPTX/param-align.ll
  test/CodeGen/PowerPC/a2-fp-basic.ll
  test/CodeGen/PowerPC/anon_aggr.ll
  test/CodeGen/PowerPC/byval-agg-info.ll
  test/CodeGen/PowerPC/byval-aliased.ll
  test/CodeGen/PowerPC/dyn-alloca-aligned.ll
  test/CodeGen/PowerPC/emptystruct.ll
  test/CodeGen/PowerPC/glob-comp-aa-crash.ll
  test/CodeGen/PowerPC/jaggedstructs.ll
  test/CodeGen/PowerPC/ppc440-fp-basic.ll
  test/CodeGen/PowerPC/ppc64-align-long-double.ll
  test/CodeGen/PowerPC/ppc64-byval-align.ll
  test/CodeGen/PowerPC/ppc64-crash.ll
  test/CodeGen/PowerPC/ppc64-smallarg.ll
  test/CodeGen/PowerPC/ppc64le-smallarg.ll
  test/CodeGen/PowerPC/pr13891.ll
  test/CodeGen/PowerPC/reloc-align.ll
  test/CodeGen/PowerPC/resolvefi-basereg.ll
  test/CodeGen/PowerPC/resolvefi-disp.ll
  test/CodeGen/PowerPC/stack-realign.ll
  test/CodeGen/PowerPC/structsinmem.ll
  test/CodeGen/PowerPC/structsinregs.ll
  test/CodeGen/PowerPC/vec-abi-align.ll
  test/CodeGen/SPARC/2011-01-21-ByValArgs.ll
  test/CodeGen/SPARC/fp128.ll
  test/CodeGen/SPARC/setjmp.ll
  test/CodeGen/Thumb/2011-05-11-DAGLegalizer.ll
  test/CodeGen/Thumb/PR17309.ll
  test/CodeGen/X86/2008-04-24-MemCpyBug.ll
  test/CodeGen/X86/2009-04-14-IllegalRegs.ll
  test/CodeGen/X86/2009-11-13-VirtRegRewriterBug.ll
  test/CodeGen/X86/2010-01-18-DbgValue.ll
  test/CodeGen/X86/2010-04-30-LocalAlloc-LandingPad.ll
  test/CodeGen/X86/2011-03-30-CreateFixedObjCrash.ll
  test/CodeGen/X86/2012-11-30-handlemove-dbg.ll
  test/CodeGen/X86/aligned-variadic.ll
  test/CodeGen/X86/byval-align.ll
  test/CodeGen/X86/byval-callee-cleanup.ll
  test/CodeGen/X86/byval.ll
  test/CodeGen/X86/byval2.ll
  test/CodeGen/X86/byval3.ll
  test/CodeGen/X86/byval4.ll
  test/CodeGen/X86/byval5.ll
  test/CodeGen/X86/byval6.ll
  test/CodeGen/X86/byval7.ll
  test/CodeGen/X86/crash.ll
  test/CodeGen/X86/dynamic-allocas-VLAs.ll
  test/CodeGen/X86/extract-extract.ll
  test/CodeGen/X86/fast-isel-args-fail2.ll
  test/CodeGen/X86/fast-isel-call.ll
  test/CodeGen/X86/fastcc-byval.ll
  test/CodeGen/X86/fp-stack-retcopy.ll
  test/CodeGen/X86/fp128-i128.ll
  test/CodeGen/X86/inline-asm-sp-clobber-memcpy.ll
  test/CodeGen/X86/mcu-abi.ll
  test/CodeGen/X86/misched-aa-colored.ll
  test/CodeGen/X86/movtopush.ll
  test/CodeGen/X86/negate-add-zero.ll
  test/CodeGen/X86/pr2656.ll
  test/CodeGen/X86/sibcall-byval.ll
  test/CodeGen/X86/sibcall.ll
  test/CodeGen/X86/sjlj-baseptr.ll
  test/CodeGen/X86/ssp-data-layout.ll
  test/CodeGen/X86/stack-align-memcpy.ll
  test/CodeGen/X86/stack-align.ll
  test/CodeGen/X86/tailcallbyval.ll
  test/CodeGen/X86/tailcallbyval64.ll
  test/CodeGen/XCore/byVal.ll
  test/DebugInfo/Generic/2010-10-01-crash.ll
  test/DebugInfo/X86/byvalstruct.ll
  test/DebugInfo/X86/dbg-byval-parameter.ll
  test/DebugInfo/X86/pieces-2.ll
  test/DebugInfo/X86/safestack-byval.ll
  test/DebugInfo/X86/sroasplit-1.ll
  test/DebugInfo/X86/sroasplit-4.ll
  test/Instrumentation/BoundsChecking/simple.ll
  test/Instrumentation/MemorySanitizer/byval-alignment.ll
  test/Instrumentation/MemorySanitizer/check_access_address.ll
  test/Instrumentation/MemorySanitizer/msan_basic.ll
  test/Linker/func-attrs-a.ll
  test/Linker/func-attrs-b.ll
  test/Transforms/ArgumentPromotion/attrs.ll
  test/Transforms/ArgumentPromotion/byval-2.ll
  test/Transforms/ArgumentPromotion/byval.ll
  test/Transforms/ArgumentPromotion/fp80.ll
  test/Transforms/ArgumentPromotion/tail.ll
  test/Transforms/ArgumentPromotion/variadic.ll
  test/Transforms/BBVectorize/X86/wr-aliases.ll
  test/Transforms/DeadArgElim/2007-12-20-ParamAttrs.ll
  test/Transforms/DeadArgElim/2008-01-16-VarargsParamAttrs.ll
  test/Transforms/DeadArgElim/variadic_safety.ll
  test/Transforms/DeadStoreElimination/simple.ll
  test/Transforms/GVN/pr17852.ll
  test/Transforms/IPConstantProp/2009-09-24-byval-ptr.ll
  test/Transforms/IndVarSimplify/loop_evaluate9.ll
  test/Transforms/Inline/alloca-merge-align.ll
  test/Transforms/Inline/byval-tail-call.ll
  test/Transforms/Inline/byval.ll
  test/Transforms/Inline/byval_lifetime.ll
  test/Transforms/Inline/inline-byval-bonus.ll
  test/Transforms/Inline/inline-tail.ll
  test/Transforms/InstCombine/2008-04-22-ByValBitcast.ll
  test/Transforms/InstCombine/2009-01-08-AlignAlloca.ll
  test/Transforms/InstCombine/call-cast-target.ll
  test/Transforms/InstCombine/crash.ll
  test/Transforms/InstCombine/memcpy-from-global.ll
  test/Transforms/MemCpyOpt/memcpy.ll
  test/Transforms/MemCpyOpt/smaller.ll
  test/Transforms/MemCpyOpt/sret.ll
  test/Transforms/SafeStack/byval.ll
  test/Transforms/SafeStack/debug-loc.ll
  test/Transforms/ScalarRepl/only-memcpy-uses.ll
  test/Transforms/TailCallElim/basic.ll
  test/Verifier/byval-4.ll
  test/Verifier/inalloca1.ll
  test/Verifier/musttail-invalid.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16516.45816.patch
Type: text/x-patch
Size: 226120 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160124/23b9e220/attachment-0001.bin>


More information about the llvm-commits mailing list