summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenOpenCL/addr-space-struct-arg.cl
Commit message (Collapse)AuthorAgeFilesLines
* Recommit r326946 after reducing CallArgList memory footprintYaxun Liu2018-03-151-2/+37
| | | | llvm-svn: 327634
* Revert r326946. It caused stack overflows by significantly increasing the ↵Richard Smith2018-03-101-37/+2
| | | | | | size of a CallArgList. llvm-svn: 327195
* CodeGen: Fix address space of indirect function argumentYaxun Liu2018-03-071-2/+37
| | | | | | | | | | | | | | | | | | | | | The indirect function argument is in alloca address space in LLVM IR. However, during Clang codegen for C++, the address space of indirect function argument should match its address space in the source code, i.e., default addr space, even for indirect argument. This is because destructor of the indirect argument may be called in the caller function, and address of the indirect argument may be taken, in either case the indirect function argument is expected to be in default addr space, not the alloca address space. Therefore, the indirect function argument should be mapped to the temp var casted to default address space. The caller will cast it to alloca addr space when passing it to the callee. In the callee, the argument is also casted to the default address space and used. CallArg is refactored to facilitate this fix. Differential Revision: https://reviews.llvm.org/D34367 llvm-svn: 326946
* Clean up AMDGCN testsYaxun Liu2018-02-151-33/+33
| | | | | | Differential Revision: https://reviews.llvm.org/D43340 llvm-svn: 325279
* AMDGPU: Use direct struct returns and argumentsMatt Arsenault2017-08-091-10/+78
| | | | | | | | | | | | | | | | This is an improvement over always using byval for structs. This will use registers until ~16 are used, and then switch back to byval. This needs more work, since I'm not sure it ever really makes sense to use byval. If the register limit is exceeded, the arguments still end up passed on the stack, but with a different ABI. It also may make sense to base this on number of registers used for non-struct arguments, rather than just arguments that appear first in the argument list. llvm-svn: 310527
* CodeGen: Fix invalid bitcast for coerced function argumentYaxun Liu2017-06-291-5/+47
| | | | | | | | | | Clang assumes coerced function argument is in address space 0, which is not always true and results in invalid bitcasts. This patch fixes failure in OpenCL conformance test api/get_kernel_arg_info with amdgcn---amdgizcl triple, where non-zero alloca address space is used. Differential Revision: https://reviews.llvm.org/D34777 llvm-svn: 306721
* Prune CRLF.NAKAMURA Takumi2014-10-271-23/+23
| | | | llvm-svn: 220678
* Fix indirect byval passing of records in address spaced memory. Allocate ↵Guy Benyei2013-03-101-0/+23
memory on stack, and memcpy the actual value before the call. llvm-svn: 176786
OpenPOWER on IntegriCloud