llvm-project/clang/test/CodeGenOpenCL
Philip Reames 0b09313cd5 [funcattrs] Infer writeonly argument attribute [part 2]
This builds on the code from D114963, and extends it to handle calls both direct and indirect. With the revised code structure (from series of previously landed NFCs), this is pretty straight forward.

One thing to note is that we can not infer writeonly for arguments which might be captured. If the pointer can be read back by the caller, and then read through, we have no way to track that. This is the same restriction we have for readonly, except that we get no mileage out of the "callee can be readonly" exception since a writeonly param on a readonly function is either a) readnone or b) UB. This means we can't actually infer much unless nocapture has already been inferred.

Differential Revision: https://reviews.llvm.org/D115003
2022-01-04 09:07:54 -08:00
..
2011-04-15-vec-init-from-vec.cl
addr-space-struct-arg.cl Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-09 02:15:55 +09:00
address-space-constant-initializers.cl
address-spaces-conversions.cl [OpenCL] Add support of __opencl_c_generic_address_space feature macro 2021-07-13 13:14:10 +03:00
address-spaces-mangling.cl [OpenCL] Supports optional pipe types in C++ for OpenCL 2021 2021-09-17 09:56:20 +01:00
address-spaces.cl Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-09 02:15:55 +09:00
amdgcn-automatic-variable.cl Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-09 02:15:55 +09:00
amdgcn-flat-scratch-name.cl
amdgcn-large-globals.cl [test] Add {{.*}} to make ELF tests immune to dso_local/dso_preemptable/(none) differences 2020-12-31 00:27:11 -08:00
amdgcn-non-temporal-store.cl [AMDGPU][clang] Fix __builtin_nontemporal_store() failure on AMDGPU 2021-12-02 05:53:25 +00:00
amdgpu-abi-struct-coerce.cl [funcattrs] Infer writeonly argument attribute [part 2] 2022-01-04 09:07:54 -08:00
amdgpu-alignment.cl
amdgpu-attrs.cl [test] Add {{.*}} to make ELF tests immune to dso_local/dso_preemptable/(none) differences 2020-12-31 00:27:11 -08:00
amdgpu-call-kernel.cl [funcattrs] Infer writeonly argument attribute 2021-12-02 13:04:09 -08:00
amdgpu-calling-conv.cl [test] Add {{.*}} to make ELF tests immune to dso_local/dso_preemptable/(none) differences 2020-12-31 00:27:11 -08:00
amdgpu-debug-info-pointer-address-space.cl Fix lit test failure due to 0b81d9 2020-12-07 19:50:21 -05:00
amdgpu-debug-info-variable-expression.cl Fix lit test failure due to 0b81d9 2020-12-07 19:50:21 -05:00
amdgpu-enqueue-kernel.cl [test] Add {{.*}} to make ELF tests immune to dso_local/dso_preemptable/(none) differences 2020-12-31 00:27:11 -08:00
amdgpu-env-amdgcn.cl [AMDGPU] Set the default globals address space to 1 2020-11-20 15:46:53 +00:00
amdgpu-features.cl [AMDGPU] Add gfx1035 target 2021-06-24 14:32:41 -04:00
amdgpu-ieee.cl [AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee 2021-05-01 09:02:55 -04:00
amdgpu-nullptr.cl Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-09 02:15:55 +09:00
amdgpu-sizeof-alignof.cl [OpenCL] Add support of __opencl_c_generic_address_space feature macro 2021-07-13 13:14:10 +03:00
arm-integer-dot-product.cl [OpenCL] Remove pragma requirement from Arm dot extension. 2021-05-12 16:25:33 +01:00
as_type.cl Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-09 02:15:55 +09:00
atomic-ops-libcall.cl Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-09 02:15:55 +09:00
atomic-ops.cl [CGAtomic] Lift strong requirement for remaining compare_exchange combinations 2021-05-06 21:05:20 -07:00
atomics-cas-remarks-gfx90a.cl [Remarks] [AMDGPU] Emit optimization remarks for atomics generating hardware instructions 2021-08-19 20:51:19 -06:00
atomics-unsafe-hw-remarks-gfx90a.cl [Remarks] [AMDGPU] Emit optimization remarks for atomics generating hardware instructions 2021-08-19 20:51:19 -06:00
backend-unsupported-warning.ll Fix test without built AMDGPU 2020-04-27 13:32:00 -04:00
blocks.cl Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-09 02:15:55 +09:00
bool_cast.cl [test] Add {{.*}} to make ELF tests immune to dso_local/dso_preemptable/(none) differences 2020-12-31 00:27:11 -08:00
builtins-amdgcn-ci.cl [HIP] Add __builtin_amdgcn_groupstaticsize 2021-05-13 15:50:08 +00:00
builtins-amdgcn-dl-insts-err-clamp.cl
builtins-amdgcn-dl-insts-err.cl [AMDGPU] Split dot2-insts feature 2021-03-17 09:42:21 +00:00
builtins-amdgcn-dl-insts.cl
builtins-amdgcn-fp-atomics-gfx7-err.cl [clang] Add clang builtins support for gfx90a 2021-08-05 02:08:06 -06:00
builtins-amdgcn-fp-atomics-gfx908-err.cl [clang] Add clang builtins support for gfx90a 2021-08-05 02:08:06 -06:00
builtins-amdgcn-gfx9.cl [HIP] Add __builtin_amdgcn_groupstaticsize 2021-05-13 15:50:08 +00:00
builtins-amdgcn-gfx10.cl [HIP] Add __builtin_amdgcn_groupstaticsize 2021-05-13 15:50:08 +00:00
builtins-amdgcn-interp.cl
builtins-amdgcn-mfma.cl [AMDGPU] gfx90a support 2021-02-17 16:01:32 -08:00
builtins-amdgcn-raytracing.cl [AMDGPU] Change llvm.amdgcn.image.bvh.intersect.ray to take vec3 args 2021-12-04 10:32:11 +00:00
builtins-amdgcn-vi.cl [HIP] Add __builtin_amdgcn_groupstaticsize 2021-05-13 15:50:08 +00:00
builtins-amdgcn.cl Reapply "[InferAttributes] Materialize all infered attributes for declaration"" and follow on patches. 2021-04-14 16:38:07 -07:00
builtins-f16.cl [test] Add {{.*}} to make tests immune to dso_local/dso_preemptable/(none) differences 2020-12-30 20:52:01 -08:00
builtins-fp-atomics-gfx8.cl Mark tests as requiring AMDGPU target 2021-08-05 10:02:51 +01:00
builtins-fp-atomics-gfx90a.cl Mark tests as requiring AMDGPU target 2021-08-05 10:02:51 +01:00
builtins-fp-atomics-gfx1030.cl [clang] Add clang builtins support for gfx90a 2021-08-05 02:08:06 -06:00
builtins-generic-amdgcn.cl
builtins-r600.cl
builtins.cl [OpenCL] Use -fdeclare-opencl-builtins for some tests 2021-03-22 09:46:28 +00:00
byval.cl Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-09 02:15:55 +09:00
cast_image.cl
cl-strict-aliasing.cl
cl-uniform-wg-size.cl
cl20-device-side-enqueue.cl Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-09 02:15:55 +09:00
const-str-array-decay.cl Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-09 02:15:55 +09:00
constant-addr-space-globals.cl Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-09 02:15:55 +09:00
convergent.cl Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-09 02:15:55 +09:00
debug-info-programming-language.cl [OpenCL] Use DW_LANG_OpenCL language tag for OpenCL C 2021-06-25 11:48:42 +01:00
enqueue-kernel-non-entry-block.cl [Driver] Pass -gno-column-info instead of -dwarf-column-info 2020-07-05 11:50:38 -07:00
event_t.cl
ext-int-shift.cl Introduce _BitInt, deprecate _ExtInt 2021-12-06 12:52:01 -05:00
ext-vector-shuffle.cl
fdeclare-opencl-builtins.cl [OpenCL] Set calling convention for -fdeclare-opencl-builtins 2021-03-10 10:03:57 +00:00
fpmath.cl Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-09 02:15:55 +09:00
func-call-dbg-loc.cl [Driver] Pass -gno-column-info instead of -dwarf-column-info 2020-07-05 11:50:38 -07:00
half.cl Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-09 02:15:55 +09:00
images.cl
inline-asm-amdgcn.cl [AMDGPU] Added support of new inline assembler constraints 2020-07-03 18:01:12 +03:00
intel-subgroups-avc-ext-types.cl
kernel-arg-info-single-as.cl
kernel-arg-info.cl [OpenCL] Fix types with signed prefix in arginfo metadata. 2021-02-09 15:13:19 +00:00
kernel-attributes.cl
kernel-metadata.cl
kernels-have-spir-cc-by-default.cl [funcattrs] Infer writeonly argument attribute 2021-12-02 13:04:09 -08:00
lifetime.cl
local-initializer-undef.cl
local.cl
logical-ops.cl
memcpy.cl
no-half.cl Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-09 02:15:55 +09:00
no-signed-zeros.cl Reduce the number of attributes attached to each function 2021-02-16 16:19:54 +01:00
norecurse.cl [OpenCL][CUDA][HIP][SYCL] Add norecurse 2020-02-16 20:41:00 -05:00
null_queue.cl
numbered-address-space.cl
opencl_types.cl
overload.cl Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-09 02:15:55 +09:00
partial_initializer.cl [test] Add {{.*}} to make ELF tests immune to dso_local/dso_preemptable/(none) differences 2020-12-31 00:27:11 -08:00
pipe_builtin.cl [OpenCL] Replace test for pipe struct to test it with fixed triple 2021-07-30 21:49:20 +03:00
pipe_types.cl [OpenCL] Supports optional pipe types in C++ for OpenCL 2021 2021-09-17 09:56:20 +01:00
pipe_types_mangling.cl [OpenCL] Supports optional pipe types in C++ for OpenCL 2021 2021-09-17 09:56:20 +01:00
preserve_vec3.cl [OpenCL] Fix as_type3 invalid store creation 2021-09-29 09:40:06 +01:00
printf.cl Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-09 02:15:55 +09:00
private-array-initialization.cl
ptx-calls.cl [test] Add {{.*}} to make ELF tests immune to dso_local/dso_preemptable/(none) differences 2020-12-31 00:27:11 -08:00
ptx-kernels.cl [test] Add {{.*}} to make ELF tests immune to dso_local/dso_preemptable/(none) differences 2020-12-31 00:27:11 -08:00
relaxed-fpmath.cl Reduce the number of attributes attached to each function 2021-02-16 16:19:54 +01:00
sampler.cl [OpenCL] Respect calling convention for builtin 2021-03-15 17:26:51 +00:00
shifts.cl [test] Add {{.*}} to make ELF tests immune to dso_local/dso_preemptable/(none) differences 2020-12-31 00:27:11 -08:00
single-precision-constant.cl [clang] FastMathFlags.allowContract should be initialized only from FPFeatures.allowFPContractAcrossStatement 2020-05-20 06:19:10 -07:00
size_t.cl Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-09 02:15:55 +09:00
spir-calling-conv.cl Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-09 02:15:55 +09:00
spir-debug-info-pointer-address-space.cl [OpenCL] Add DWARF address spaces mapping for SPIR 2021-06-04 18:10:54 +01:00
spir32_target.cl
spir64_target.cl
spir_version.cl [OpenCL] Change default standard version to CL1.2 2021-07-26 15:04:34 +01:00
spirv_target.cl [SPIR-V] Add SPIR-V triple and clang target info. 2021-11-08 13:34:10 +00:00
str_literals.cl
to_addr_builtin.cl Create SPIRABIInfo to enable SPIR_FUNC calling convention. 2020-12-12 05:48:20 -08:00
unroll-hint.cl
vectorLoadStore.cl [test] Add {{.*}} to make ELF tests immune to dso_local/dso_preemptable/(none) differences 2020-12-31 00:27:11 -08:00
vector_literals.cl [clang] Fix signedness in vector bitcast evaluation 2021-01-27 09:30:26 +00:00
vector_logops.cl
vector_odd.cl
vector_shufflevector.cl [OpenCL][NFC] Improve OpenCL test file naming 2021-01-06 14:16:44 +00:00
visibility.cl [test] Add {{.*}} to make ELF tests immune to dso_local/dso_preemptable/(none) differences 2020-12-31 00:27:11 -08:00
vla.cl [test] Add {{.*}} to make ELF tests immune to dso_local/dso_preemptable/(none) differences 2020-12-31 00:27:11 -08:00