- Jun 03, 2007
-
-
Chris Lattner authored
typedef information associated with the input. llvm-svn: 39562
-
- Jun 02, 2007
-
-
Chris Lattner authored
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
-
Chris Lattner authored
For: register short X; if (!X) { We now produce: %tmp = load i16* %X ; <i16> [#uses=1] %tobool = icmp ne i16 %tmp, 0 ; <i1> [#uses=1] %lnot = xor i1 %tobool, true ; <i1> [#uses=1] br i1 %lnot, label %ifthen, label %ifend instead of: %tmp = load i16* %X ; <i16> [#uses=1] %tobool = icmp ne i16 %tmp, 0 ; <i1> [#uses=1] %lnot = xor i1 %tobool, true ; <i1> [#uses=1] %lnot.ext = zext i1 %lnot to i32 ; <i32> [#uses=1] %tobool1 = icmp ne i32 %lnot.ext, 0 ; <i1> [#uses=1] br i1 %tobool1, label %ifthen, label %ifend llvm-svn: 39560
-
Chris Lattner authored
be shared. Implement infrastructure for unary operator emission. Implement basic logical not support. We now compile: register short X; if (!X) { into: %tmp = load i16* %X ; <i16> [#uses=1] %tobool = icmp ne i16 %tmp, 0 ; <i1> [#uses=1] %lnot = xor i1 %tobool, true ; <i1> [#uses=1] zext i1 %lnot to i32 ; <i32>:0 [#uses=1] %tobool1 = icmp ne i32 %0, 0 ; <i1> [#uses=1] br i1 %tobool1, label %ifthen, label %ifend llvm-svn: 39559
-
Chris Lattner authored
llvm-svn: 39558
-
Bill Wendling authored
- Added C99 reference to why "auto" and "register" cannot be used as a storage class specifier for file scoped variable declarations. llvm-svn: 39557
-
Chris Lattner authored
llvm-svn: 39556
-
Chris Lattner authored
This allows us to translate: int func() { register int X; { int Y; return 1+X+Y; } } into: define i32 @func() { entry: %X = alloca i32 ; <i32*> [#uses=1] %Y = alloca i32 ; <i32*> [#uses=1] %allocapt = bitcast i32 undef to i32 ; <i32> [#uses=0] %tmp = load i32* %X ; <i32> [#uses=1] %tmp1 = add i32 1, %tmp ; <i32> [#uses=1] %tmp2 = load i32* %Y ; <i32> [#uses=1] %tmp3 = add i32 %tmp1, %tmp2 ; <i32> [#uses=1] ret i32 %tmp3 ; No predecessors! ret i32 undef } llvm-svn: 39555
-
Bill Wendling authored
Removed #include <iostream>. llvm-svn: 39554
-
Chris Lattner authored
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
-
Chris Lattner authored
of one by reference, making it optional. llvm-svn: 39552
-
Chris Lattner authored
llvm-svn: 39551
-
Chris Lattner authored
llvm-svn: 39550
-
Chris Lattner authored
We now print: extern void blah(); as: void (blah)(); Strange, but ok :) llvm-svn: 39549
-
Chris Lattner authored
llvm-svn: 39548
-
Chris Lattner authored
llvm-svn: 39547
-
Chris Lattner authored
llvm-svn: 39546
-
Chris Lattner authored
if (11 + 42) { to: %tmp = add i32 11, 42 ; <i32> [#uses=1] %tobool = icmp ne i32 %tmp, 0 ; <i1> [#uses=1] br i1 %tobool, label %ifthen, label %ifend but this doesn't handle any of the interesting/hard stuff yet. llvm-svn: 39545
-
Chris Lattner authored
llvm-svn: 39544
-
- Jun 01, 2007
-
-
Steve Naroff authored
Submitted by: Reviewed by: After speaking with Chris, decided not to have GCC "attributes" inherit from Decl. This will enable us to grow the attribute hierarchy over time without effecting Decls. llvm-svn: 39543
-
Steve Naroff authored
Submitted by: Reviewed by: Add implemention file for GCC attributes llvm-svn: 39542
-
Steve Naroff authored
Submitted by: Reviewed by: Interface file for GCC attributes. llvm-svn: 39541
-
Chris Lattner authored
llvm-svn: 39540
-
Steve Naroff authored
Submitted by: Reviewed by: Implement support for GCC __attribute__. - Implement "TODO" in Parser::ParseAttributes. Changed the return type from void to Parser::DeclTy. Changed all call sites to accept the return value. - Added Action::ParseAttribute and Sema::ParseAttribute to return an appropriate AST node. Added new node AttributeDecl to Decl.h. Still to do...hook up to the Decl... llvm-svn: 39539
-
- May 31, 2007
-
-
Chris Lattner authored
llvm-svn: 39538
-
Chris Lattner authored
llvm-svn: 39537
-
Chris Lattner authored
llvm-svn: 39536
-
Chris Lattner authored
a = b; { int c; c = a + b; int d; d++; } int e; instead of: a = b; { int c; c = a + b; int d; d++; } int e; llvm-svn: 39535
-
Chris Lattner authored
llvm-svn: 39534
-
- May 30, 2007
-
-
Chris Lattner authored
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
-
Chris Lattner authored
llvm-svn: 39532
-
Chris Lattner authored
llvm-svn: 39531
-
Chris Lattner authored
llvm-svn: 39530
-
Chris Lattner authored
llvm-svn: 39529
-
Steve Naroff authored
Submitted by: Reviewed by: - ParseForStatement(): Put back a test/assignment. My removal of ParseExprStmt() was a bit over zealous:-(thanks to Chris for pointing it out) - Add assert to VisitDeclStmt(). - Removed an out-of-date FIXME - Added some curlies for a couple multi-line calls to Diag(). llvm-svn: 39528
-
Bill Wendling authored
Comment format changes. llvm-svn: 39527
-
Steve Naroff authored
Submitted by: Reviewed by: - Many tweaks to various diagnostics. - Fixed some location/range issues. - Bug fix to Sema::ParseDeclStmt() - error return code is "true", not 0. llvm-svn: 39526
-
Bill Wendling authored
- Conjugate "diagnostic" correctly for 1 diagnostic. llvm-svn: 39525
-
Chris Lattner authored
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
-
Steve Naroff authored
Submitted by: Reviewed by: Unified the diagnostics for function calls. Since we have range support, there is no need for including the argument number. Instead, I've made the diags more expressive by including more type info. Also improved the indentation of many calls to Diag (which can be 2-3 lines now). llvm-svn: 39523
-