llvm-project/clang/CodeGen
Chris Lattner d7f58867e5 Implement scaffolding for lvalues. Implement block vardecl lvalues.
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
2007-06-02 05:24:33 +00:00
..
CGDecl.cpp Add initial support for fixed-size local vardecls. This allows us to compile: 2007-06-02 04:53:11 +00:00
CGExpr.cpp Implement scaffolding for lvalues. Implement block vardecl lvalues. 2007-06-02 05:24:33 +00:00
CGStmt.cpp Start stubbing out decl codegen. 2007-06-02 04:16:21 +00:00
CodeGenFunction.cpp Add initial support for fixed-size local vardecls. This allows us to compile: 2007-06-02 04:53:11 +00:00
CodeGenFunction.h Implement scaffolding for lvalues. Implement block vardecl lvalues. 2007-06-02 05:24:33 +00:00
CodeGenModule.cpp Implement conversion of clang ast types to LLVM types, at least for some trivial 2007-05-29 23:17:50 +00:00
CodeGenModule.h Add codegen support for NullStmt and CompoundStmt. {;;{};;} is now ours! 2007-05-29 23:50:05 +00:00
Makefile Initial scaffolding for an -emit-llvm mode. This requires the LLVM VMCore 2007-05-24 06:29:05 +00:00
ModuleBuilder.cpp Reorganize codegen files. 2007-05-28 01:07:47 +00:00