Skip to content
  1. Apr 22, 2010
  2. Apr 21, 2010
    • Daniel Dunbar's avatar
      ABI/x86-32 & x86-64: Alignment on 'byval' must be set when when the alignment · 53fac692
      Daniel Dunbar authored
      exceeds the minimum ABI alignment.
      
      llvm-svn: 102019
      53fac692
    • Daniel Dunbar's avatar
      557893d2
    • Daniel Dunbar's avatar
      IRgen: Add checking that the LLVM and AST record layout offsets agree (for · 2ba67440
      Daniel Dunbar authored
      non-bit-fields).
      
      llvm-svn: 102014
      2ba67440
    • Anders Carlsson's avatar
      Comment out an assert for now. · 34f54d55
      Anders Carlsson authored
      llvm-svn: 102007
      34f54d55
    • John McCall's avatar
      I failed to notice that my last patch wasn't doing as much as it could · bf814c79
      John McCall authored
      because EmitBranch actually clears the insert point.  This version
      actually accomplishes what I initially wanted.
      
      llvm-svn: 101998
      bf814c79
    • John McCall's avatar
      Teach EmitBlock to put the target block immediately after the current block · e683359f
      John McCall authored
      (if there's a current block).  The chief advantage of doing this is that it
      lets us pick blocks (e.g. EH blocks) to push to the end of the function so
      that fallthrough happens consistently --- i.e. it gives us the flexibility
      of ordering blocks as we please without having to change the order in which
      we generate code.  There are standard (?) optimization passes which can do some
      of that for us, but better to generate reasonable code to begin with.
      
      llvm-svn: 101997
      e683359f
    • John McCall's avatar
      Miscellaneous codegen cleanups. Mostly, don't create new basic blocks · 2188696d
      John McCall authored
      just to save the current insertion state!  This change significantly
      simplifies the IR CFG in exceptions code.
      
      llvm-svn: 101996
      2188696d
    • Douglas Gregor's avatar
      Overhaul the AST representation of Objective-C message send · 9a129194
      Douglas Gregor authored
      expressions, to improve source-location information, clarify the
      actual receiver of the message, and pave the way for proper C++
      support. The ObjCMessageExpr node represents four different kinds of
      message sends in a single AST node:
      
        1) Send to a object instance described by an expression (e.g., [x method:5])
        2) Send to a class described by the class name (e.g., [NSString method:5])
        3) Send to a superclass class (e.g, [super method:5] in class method)
        4) Send to a superclass instance (e.g., [super method:5] in instance method)
      
      Previously these four cases where tangled together. Now, they have
      more distinct representations. Specific changes:
      
        1) Unchanged; the object instance is represented by an Expr*.
      
        2) Previously stored the ObjCInterfaceDecl* referring to the class
        receiving the message. Now stores a TypeSourceInfo* so that we know
        how the class was spelled. This both maintains typedef information
        and opens the door for more complicated C++ types (e.g., dependent
        types). There was an alternative, unused representation of these
        sends by naming the class via an IdentifierInfo *. In practice, we
        either had an ObjCInterfaceDecl *, from which we would get the
        IdentifierInfo *, or we fell into the case below...
      
        3) Previously represented by a class message whose IdentifierInfo *
        referred to "super". Sema and CodeGen would use isStr("super") to
        determine if they had a send to super. Now represented as a
        "class super" send, where we have both the location of the "super"
        keyword and the ObjCInterfaceDecl* of the superclass we're
        targetting (statically).
      
        4) Previously represented by an instance message whose receiver is a
        an ObjCSuperExpr, which Sema and CodeGen would check for via
        isa<ObjCSuperExpr>(). Now represented as an "instance super" send,
        where we have both the location of the "super" keyword and the
        ObjCInterfaceDecl* of the superclass we're targetting
        (statically). Note that ObjCSuperExpr only has one remaining use in
        the AST, which is for "super.prop" references.
      
      The new representation of ObjCMessageExpr is 2 pointers smaller than
      the old one, since it combines more storage. It also eliminates a leak
      when we loaded message-send expressions from a precompiled header. The
      representation also feels much cleaner to me; comments welcome!
      
      This patch attempts to maintain the same semantics we previously had
      with Objective-C message sends. In several places, there are massive
      changes that boil down to simply replacing a nested-if structure such
      as:
      
        if (message has a receiver expression) {
          // instance message
          if (isa<ObjCSuperExpr>(...)) {
           // send to super
          } else {
           // send to an object
         }
        } else {
          // class message
          if (name->isStr("super")) {
            // class send to super
          } else {
            // send to class
          }
        }
      
      with a switch
      
        switch (E->getReceiverKind()) {
        case ObjCMessageExpr::SuperInstance: ...
        case ObjCMessageExpr::Instance: ...
        case ObjCMessageExpr::SuperClass: ...
        case ObjCMessageExpr::Class:...
        }
      
      There are quite a few places (particularly in the checkers) where
      send-to-super is effectively ignored. I've placed FIXMEs in most of
      them, and attempted to address send-to-super in a reasonable way. This
      could use some review.
      
      llvm-svn: 101972
      9a129194
    • Fariborz Jahanian's avatar
      Fixes a code gen. bug by removing an assert. · acdfa7ac
      Fariborz Jahanian authored
      It is ok to have c++-ness inside extern "C" 
      block. Fixes pr6644.
      
      llvm-svn: 101948
      acdfa7ac
  3. Apr 20, 2010
  4. Apr 19, 2010
  5. Apr 18, 2010
  6. Apr 17, 2010
Loading