| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
LLVM
Type*'s can change as types are refined, so we can't use them as a stable key in
the map. Decls don't change, so use them instead.
This patch was written by Anders, but he's too shy to commit it himself :)
llvm-svn: 46743
|
|
|
|
|
|
| |
discussion of this change.
llvm-svn: 45410
|
|
|
|
| |
llvm-svn: 45118
|
|
|
|
| |
llvm-svn: 44510
|
|
|
|
|
|
|
|
|
|
|
| |
such as:
extern int x[];
void foo() { x[0] = 1; }
int x[10];
void bar() { x[0] = 1; }
llvm-svn: 44509
|
|
|
|
| |
llvm-svn: 44508
|
|
|
|
|
|
| |
their prototype.
llvm-svn: 44506
|
|
|
|
| |
llvm-svn: 44503
|
|
|
|
| |
llvm-svn: 44502
|
|
|
|
|
|
| |
static and inline at least.
llvm-svn: 44355
|
|
|
|
|
|
|
| |
Now, at AST level record info is maintained by ASTRecordLayout class.
Now, at code gen level record info is maintained by CGRecordLayout class.
llvm-svn: 43619
|
|
|
|
| |
llvm-svn: 43284
|
|
|
|
| |
llvm-svn: 43280
|
|
|
|
| |
llvm-svn: 43236
|
|
|
|
| |
llvm-svn: 42939
|
|
|
|
| |
llvm-svn: 42766
|
|
|
|
| |
llvm-svn: 42616
|
|
|
|
|
|
| |
Dummy block is an empty block with no predecessors.
llvm-svn: 42451
|
|
|
|
| |
llvm-svn: 41692
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
codegen for:
_Complex double bar(int);
void test(_Complex double*);
void test2(int c) {
_Complex double X;
X = bar(1);
test(&X);
}
llvm-svn: 40993
|
|
|
|
| |
llvm-svn: 39927
|
|
|
|
|
|
| |
compute type alignment. This info is needed for struct layout.
llvm-svn: 39850
|
|
|
|
| |
llvm-svn: 39721
|
|
|
|
| |
llvm-svn: 39694
|
|
|
|
| |
llvm-svn: 39674
|
|
|
|
| |
llvm-svn: 39671
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
int X, bar(int,int,int);
short Y;
double foo() {
return bar(X, Y, 3);
}
into:
@X = external global i32 ; <i32*> [#uses=1]
@Y = external global i16 ; <i16*> [#uses=1]
define double @foo() {
entry:
%tmp = load i32* @X ; <i32> [#uses=1]
%tmp1 = load i16* @Y ; <i16> [#uses=1]
%promote = sext i16 %tmp1 to i32 ; <i32> [#uses=1]
%call = tail call i32 @bar( i32 %tmp, i32 %promote, i32 3 ) ; <i32> [#uses=1]
%conv = sitofp i32 %call to double ; <double> [#uses=1]
ret double %conv
}
declare i32 @bar(i32, i32, i32)
llvm-svn: 39663
|
|
|
|
|
|
| |
and globals.
llvm-svn: 39661
|
|
|
|
|
|
|
|
| |
evaluation
is ready.
llvm-svn: 39660
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
out of the llvm namespace. This makes the clang namespace be a sibling of
llvm instead of being a child.
The good thing about this is that it makes many things unambiguous. The
bad things is that many things in the llvm namespace (notably data structures
like smallvector) now require an llvm:: qualifier. IMO, libsystem and libsupport
should be split out of llvm into their own namespace in the future, which will fix
this issue.
llvm-svn: 39659
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
int test(int X, short Y, float Z) {
return (int)(X*Y+Z);
}
to:
define i32 @test(i32 %X, i16 %Y, float %Z) {
entry:
%promote = sext i16 %Y to i32 ; <i32> [#uses=1]
%mul = mul i32 %promote, %X ; <i32> [#uses=1]
%promote3 = sitofp i32 %mul to float ; <float> [#uses=1]
%add = add float %promote3, %Z ; <float> [#uses=1]
%conv = fptosi float %add to i32 ; <i32> [#uses=1]
ret i32 %conv
}
with:
$ clang -emit-llvm t.c | llvm-as | opt -std-compile-opts | llvm-dis
llvm-svn: 39652
|
|
|
|
| |
llvm-svn: 39625
|
|
|
|
| |
llvm-svn: 39622
|
|
|
|
| |
llvm-svn: 39593
|
|
|
|
|
|
|
|
|
|
| |
'char', which varies based on the target.
Instead of spreading target knowledge throughout the compiler, bifurcate char
into Char_S and Char_U, and have ASTContext create the right one based on the
target, when it starts up.
llvm-svn: 39577
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows us to compile:
int func() {
int A[10];
if (!A) {
to:
define i32 @func() {
entry:
%A = alloca [10 x i32] ; <[10 x i32]*> [#uses=1]
%arraydecay = getelementptr [10 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
%tobool = icmp ne i32* %arraydecay, null ; <i1> [#uses=1]
%lnot = xor i1 %tobool, true ; <i1> [#uses=1]
br i1 %lnot, label %ifthen, label %ifend
-Chris
llvm-svn: 39564
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compile:
void foo() {
int A[10];
int *P;
into:
entry:
%A = alloca [10 x i32] ; <[10 x i32]*> [#uses=0]
%P = alloca i32* ; <i32**> [#uses=0]
llvm-svn: 39561
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
int func() {
register int X;
{
int Y;
into:
define i32 @func() {
entry:
%X = alloca i32 ; <i32*> [#uses=0]
%Y = alloca i32 ; <i32*> [#uses=0]
%allocapt = bitcast i32 undef to i32 ; <i32> [#uses=0]
...
llvm-svn: 39553
|
|
|
|
| |
llvm-svn: 39550
|
|
|
|
| |
llvm-svn: 39547
|
|
|
|
| |
llvm-svn: 39546
|
|
|
|
| |
llvm-svn: 39540
|
|
|
|
| |
llvm-svn: 39534
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
void test() {
goto l;
l:
if (11) {
j: ;
}
}
into:
define void @test() {
entry:
br label %l
l: ; preds = %entry
icmp ne i32 11, 0 ; <i1>:0 [#uses=1]
br i1 %0, label %ifthen, label %ifend
ifthen: ; preds = %l
br label %j
j: ; preds = %ifthen
br label %ifend
ifend: ; preds = %j, %l
}
whoa... :)
llvm-svn: 39533
|
|
|
|
| |
llvm-svn: 39530
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
void test1() {
foo:
goto foo;
goto foo;
goto foo;
}
void test() {
goto l;
l:
;
}
into:
define void @test1() {
entry:
br label %foo
foo: ; preds = %0, %foo, %entry
br label %foo
; No predecessors!
br label %foo
; No predecessors!
}
define void @test() {
entry:
br label %l
l: ; preds = %entry
}
llvm-svn: 39524
|
|
|
|
| |
llvm-svn: 39522
|
|
|
|
|
|
| |
cases.
llvm-svn: 39519
|
|
llvm-svn: 39504
|