This revision was automatically updated to reflect the committed changes.
yaxunl marked an inline comment as done.
Closed by commit rL314932: [OpenCL] Clean up and add missing fields for block
struct (authored by yaxunl).
Changed prior to commit:
https://reviews.llvm.org/D37822?vs=116877&id=117
yaxunl marked an inline comment as done.
yaxunl added inline comments.
Comment at: test/CodeGenOpenCL/blocks.cl:30
+ // COMMON: %[[block_captured:.*]] = getelementptr inbounds <{ i32, i32, i8
addrspace(4)*, i32 }>, <{ i32, i32, i8 addrspace(4)*, i32 }>* %[[block]], i32
0, i32
Anastasia accepted this revision.
Anastasia added a comment.
This revision is now accepted and ready to land.
LGTM! Thanks!
Comment at: test/CodeGenOpenCL/blocks.cl:30
+ // COMMON: %[[block_captured:.*]] = getelementptr inbounds <{ i32, i32, i8
addrspace(4)*, i32 }>, <{ i32,
yaxunl updated this revision to Diff 116877.
yaxunl marked 4 inline comments as done.
yaxunl added a comment.
Rebased to ToT and revised by Anastasia's comments.
https://reviews.llvm.org/D37822
Files:
lib/CodeGen/CGBlocks.cpp
lib/CodeGen/CGOpenCLRuntime.cpp
lib/CodeGen/CGOpenCLRuntime.h
yaxunl marked 4 inline comments as done.
yaxunl added inline comments.
Comment at: lib/CodeGen/CGBlocks.cpp:311
+// The header is basically 'struct { int; int; generic void *;
+// custom_fields; }'. Assert that that struct is packed.
+auto GenPtrAlign = CharUnits::fro
Anastasia added inline comments.
Comment at: lib/CodeGen/CGBlocks.cpp:311
+// The header is basically 'struct { int; int; generic void *;
+// custom_fields; }'. Assert that that struct is packed.
+auto GenPtrAlign = CharUnits::fromQuantity(
remove one
yaxunl updated this revision to Diff 116363.
yaxunl edited the summary of this revision.
yaxunl added a comment.
Add custom fields to block and target hooks to fill them.
https://reviews.llvm.org/D37822
Files:
lib/CodeGen/CGBlocks.cpp
lib/CodeGen/CGOpenCLRuntime.cpp
lib/CodeGen/CGOpenCLRu
yaxunl added a comment.
In https://reviews.llvm.org/D37822#877903, @Anastasia wrote:
> In https://reviews.llvm.org/D37822#877572, @yaxunl wrote:
>
> > In https://reviews.llvm.org/D37822#873876, @Anastasia wrote:
> >
> > > In https://reviews.llvm.org/D37822#872446, @yaxunl wrote:
> > >
> > > > In
yaxunl updated this revision to Diff 116277.
yaxunl marked 6 inline comments as done.
yaxunl added a comment.
Revise by Anastasia's comments.
https://reviews.llvm.org/D37822
Files:
lib/CodeGen/CGBlocks.cpp
lib/CodeGen/CGOpenCLRuntime.cpp
lib/CodeGen/CGOpenCLRuntime.h
test/CodeGen/blocks
b-sumner added a comment.
In https://reviews.llvm.org/D37822#877903, @Anastasia wrote:
> In https://reviews.llvm.org/D37822#877572, @yaxunl wrote:
>
> > In https://reviews.llvm.org/D37822#873876, @Anastasia wrote:
> >
> > > In https://reviews.llvm.org/D37822#872446, @yaxunl wrote:
> > >
> > > > I
Anastasia added a comment.
In https://reviews.llvm.org/D37822#877572, @yaxunl wrote:
> In https://reviews.llvm.org/D37822#873876, @Anastasia wrote:
>
> > In https://reviews.llvm.org/D37822#872446, @yaxunl wrote:
> >
> > > In https://reviews.llvm.org/D37822#872291, @Anastasia wrote:
> > >
> > > >
yaxunl marked 4 inline comments as done.
yaxunl added a comment.
In https://reviews.llvm.org/D37822#873876, @Anastasia wrote:
> In https://reviews.llvm.org/D37822#872446, @yaxunl wrote:
>
> > In https://reviews.llvm.org/D37822#872291, @Anastasia wrote:
> >
> > > Could you please explain a bit mor
Anastasia added a comment.
In https://reviews.llvm.org/D37822#872446, @yaxunl wrote:
> In https://reviews.llvm.org/D37822#872291, @Anastasia wrote:
>
> > Could you please explain a bit more why the alignment have to be put
> > explicitly in the struct? I am just not very convinced this is genera
yaxunl marked 2 inline comments as done.
yaxunl added a comment.
In https://reviews.llvm.org/D37822#872291, @Anastasia wrote:
> Could you please explain a bit more why the alignment have to be put
> explicitly in the struct? I am just not very convinced this is general enough.
The captured var
Anastasia added a comment.
Could you please explain a bit more why the alignment have to be put explicitly
in the struct? I am just not very convinced this is general enough.
Comment at: lib/CodeGen/CGBlocks.cpp:314
assert(elementTypes.empty());
- elementTypes.push_back(
yaxunl updated this revision to Diff 115222.
yaxunl added a comment.
Fix bug about calling blocks.
https://reviews.llvm.org/D37822
Files:
lib/CodeGen/CGBlocks.cpp
lib/CodeGen/CGOpenCLRuntime.cpp
lib/CodeGen/CGOpenCLRuntime.h
test/CodeGen/blocks-opencl.cl
test/CodeGenOpenCL/blocks.cl
yaxunl created this revision.
Currently block is translated to a structure equivalent to
struct Block {
void *isa;
int flags;
int reserved;
void *invoke;
void *descriptor;
};
Except `invoke`, which is the pointer to the block invoke function,
all other fields are useless
17 matches
Mail list logo