yaxunl added a comment.
In https://reviews.llvm.org/D27627#621533, @yaxunl wrote:
> In https://reviews.llvm.org/D27627#621473, @rjmccall wrote:
>
> > In https://reviews.llvm.org/D27627#619928, @yaxunl wrote:
> >
> > > > Because, notably, if you do that, then an attempt to pass &x as an int*
> >
yaxunl updated this revision to Diff 81309.
yaxunl added a comment.
Cast alloca to default address space.
https://reviews.llvm.org/D27627
Files:
include/clang/AST/ASTContext.h
include/clang/Basic/TargetInfo.h
lib/AST/ASTContext.cpp
lib/Basic/Targets.cpp
lib/CodeGen/CGCall.cpp
lib/Co
yaxunl added a comment.
In https://reviews.llvm.org/D27627#621473, @rjmccall wrote:
> In https://reviews.llvm.org/D27627#619928, @yaxunl wrote:
>
> > > Because, notably, if you do that, then an attempt to pass &x as an int*
> > > will fail, which means this isn't really C++ anymore... and yet th
rjmccall added a comment.
In https://reviews.llvm.org/D27627#619928, @yaxunl wrote:
> > Because, notably, if you do that, then an attempt to pass &x as an int*
> > will fail, which means this isn't really C++ anymore... and yet that
> > appears to be exactly what you want.
>
> How about when ge
yaxunl added a comment.
> Because, notably, if you do that, then an attempt to pass &x as an int* will
> fail, which means this isn't really C++ anymore... and yet that appears to be
> exactly what you want.
How about when generating alloca instruction, I insert addrspacecast to the
default ad
rjmccall added a comment.
Because, notably, if you do that, then an attempt to pass &x as an int* will
fail, which means this isn't really C++ anymore... and yet that appears to be
exactly what you want.
https://reviews.llvm.org/D27627
___
cfe-com
rjmccall added a comment.
I suspect that what you actually want to do in order to implement HCC is change
SemaType so that 'int*' is implicitly interpreted as 'int __something *'. But
I don't know how not having explicit address spaces actually works in the HCC
language design, given that it's
rjmccall added a comment.
Ok, I'm not understanding this, then.
I declare a local variable:
int x;
According to you, x should be in the generic address space, i.e. the private
address space. And at the LLVM IR level, this will be implemented with an
AllocaInst, which always creates memory
yaxunl added a comment.
In https://reviews.llvm.org/D27627#618597, @rjmccall wrote:
> What address space should local variables be in?
should always be 0 since that's llvm convention.
https://reviews.llvm.org/D27627
___
cfe-commits mailing list
c
rjmccall added a comment.
What address space should local variables be in?
https://reviews.llvm.org/D27627
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yaxunl created this revision.
yaxunl added reviewers: rjmccall, tstellarAMD, arsenm.
yaxunl added a subscriber: cfe-commits.
Herald added a subscriber: wdng.
By default, if a variable is declared without address space qualifier, clang
will assume address space 0 in codegen. This is OK for most ta
11 matches
Mail list logo