rjmccall added inline comments.
Comment at: lib/CodeGen/TargetInfo.cpp:7040
+ auto AS = PT->getAddressSpace();
+ return AS != Ctx.getTargetAddressSpace(LangAS::opencl_local) && AS != 0;
+}
yaxunl wrote:
> rjmccall wrote:
> > This check is definitely not correct;
yaxunl updated this revision to Diff 77525.
yaxunl marked an inline comment as done.
yaxunl added a comment.
Changed APValue to differentiate with null pointer and pointers casted from
integer. Fixed casting integer to pointer.
Refactored isNullPtrZero to use just QualType as parameter.
Added t
yaxunl marked 12 inline comments as done.
yaxunl added inline comments.
Comment at: lib/CodeGen/TargetInfo.cpp:7040
+ auto AS = PT->getAddressSpace();
+ return AS != Ctx.getTargetAddressSpace(LangAS::opencl_local) && AS != 0;
+}
rjmccall wrote:
> This check is de
rjmccall added a comment.
In https://reviews.llvm.org/D26196#589493, @yaxunl wrote:
> Fixed list initialization of large struct which are mostly initialized by 0
> through memset.
> Added tests for casting literal 0 and non-literal integer to pointer.
>
> There are many more places need to be c
rjmccall added inline comments.
Comment at: lib/CodeGen/CGExprConstant.cpp:1340
+ return C;
+return getNullPtr(PT, DestType);
}
yaxunl wrote:
> efriedma wrote:
> > yaxunl wrote:
> > > yaxunl wrote:
> > > > rjmccall wrote:
> > > > > efriedm
yaxunl marked an inline comment as done.
yaxunl added inline comments.
Comment at: lib/CodeGen/CGExprConstant.cpp:1340
+ return C;
+return getNullPtr(PT, DestType);
}
efriedma wrote:
> yaxunl wrote:
> > yaxunl wrote:
> > > rjmccall wrote:
efriedma added inline comments.
Comment at: lib/CodeGen/CGExprConstant.cpp:1340
+ return C;
+return getNullPtr(PT, DestType);
}
yaxunl wrote:
> yaxunl wrote:
> > rjmccall wrote:
> > > efriedma wrote:
> > > > Consider code like the followin
yaxunl marked 3 inline comments as done.
yaxunl added inline comments.
Comment at: lib/CodeGen/CGExprConstant.cpp:1340
+ return C;
+return getNullPtr(PT, DestType);
}
yaxunl wrote:
> rjmccall wrote:
> > efriedma wrote:
> > > Consider code
yaxunl updated this revision to Diff 77238.
yaxunl marked 2 inline comments as done.
yaxunl added a comment.
Added isNullPtrZero to TargetCodeGenInfo.
https://reviews.llvm.org/D26196
Files:
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CGExprAgg.cpp
lib/CodeGen/CGExprConstant.cpp
lib/CodeGen/CGExp
yaxunl added inline comments.
Comment at: lib/CodeGen/CodeGenTypes.cpp:743
+auto NullPtr = CGM.getNullPtr(LLPT, T);
+return isa(NullPtr);
+ }
tony-tye wrote:
> Is this correct if the target does not represent a NULL pointer as the
> address with value 0
tony-tye added inline comments.
Comment at: lib/CodeGen/CodeGenTypes.cpp:743
+auto NullPtr = CGM.getNullPtr(LLPT, T);
+return isa(NullPtr);
+ }
Is this correct if the target does not represent a NULL pointer as the address
with value 0? Or should this b
yaxunl retitled this revision from "[WIP] Add support for non-zero null
pointers" to "Add support for non-zero null pointers".
yaxunl updated this revision to Diff 77210.
yaxunl added a comment.
Fixed list initialization of large struct which are mostly initialized by 0
through memset.
Added tes
12 matches
Mail list logo