[PATCH] D75423: [OpenCL] Mark pointers to constant address space as invariant
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 1 07:08:19 PST 2020
yaxunl created this revision.
yaxunl added reviewers: rjmccall, Anastasia, bader.
OpenCL constant address space is immutable, therefore pointers to constant address space can
be marked with llvm.invariant.start permanently.
This should allow more optimization opportunities in LLVM passes.
https://reviews.llvm.org/D75423
Files:
clang/lib/CodeGen/CGDeclCXX.cpp
clang/lib/CodeGen/CGExpr.cpp
clang/lib/CodeGen/CGExprScalar.cpp
clang/lib/CodeGen/CodeGenFunction.h
clang/test/CodeGenOpenCL/invariant.cl
clang/test/CodeGenOpenCL/printf.cl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75423.247504.patch
Type: text/x-patch
Size: 16478 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200301/29674f00/attachment-0001.bin>
More information about the cfe-commits
mailing list