Skip to content
  1. Mar 11, 2012
    • Stepan Dyatkovskiy's avatar
      llvm::SwitchInst · fe3b069a
      Stepan Dyatkovskiy authored
      Renamed methods caseBegin, caseEnd and caseDefault with case_begin, case_end, and case_default.
      Added some notes relative to case iterators.
      
      llvm-svn: 152533
      fe3b069a
  2. Mar 10, 2012
    • Benjamin Kramer's avatar
      Simplify code. No functionality change. · 53ba6364
      Benjamin Kramer authored
      llvm-svn: 152503
      53ba6364
    • John McCall's avatar
      Remove BlockDeclRefExpr and introduce a bit on DeclRefExpr to · 113bee05
      John McCall authored
      track whether the referenced declaration comes from an enclosing
      local context.  I'm amenable to suggestions about the exact meaning
      of this bit.
      
      llvm-svn: 152491
      113bee05
    • John McCall's avatar
      Unify the BlockDeclRefExpr and DeclRefExpr paths so that · 71335059
      John McCall authored
      we correctly emit loads of BlockDeclRefExprs even when they
      don't qualify as ODR-uses.  I think I'm adequately convinced
      that BlockDeclRefExpr can die.
      
      llvm-svn: 152479
      71335059
    • Daniel Dunbar's avatar
      IRgen/ABI/x86_64: Avoid passing small structs using byval sometimes. · f07b5ec0
      Daniel Dunbar authored
       - We do this when it is easy to determine that the backend will pass them on
         the stack properly by itself.
      
      Currently LLVM codegen is really bad in some cases with byval, for example, on
      the test case here (which is derived from Sema code, which likes to pass
      SourceLocations around)::
      
        struct s47 { unsigned a; };
        void f47(int,int,int,int,int,int,struct s47);
        void test47(int a, struct s47 b) { f47(a, a, a, a, a, a, b); }
      
      we used to emit code like this::
      
        ...
        movl	%esi, -8(%rbp)
        movl	-8(%rbp), %ecx
        movl	%ecx, (%rsp)
        ...
      
      to handle moving the struct onto the stack, which is just appalling.
      
      Now we generate::
      
        movl	%esi, (%rsp)
      
      which seems better, no?
      
      llvm-svn: 152462
      f07b5ec0
  3. Mar 09, 2012
  4. Mar 08, 2012
    • Rafael Espindola's avatar
      Replace MarkVarRequired with a more generic · df88f6fe
      Rafael Espindola authored
      HandleCXXStaticMemberVarInstantiation. Suggested by Argyrios.
      
      llvm-svn: 152320
      df88f6fe
    • Stepan Dyatkovskiy's avatar
      Taken into account Duncan's comments for r149481 dated by 2nd Feb 2012: · 85fcc2da
      Stepan Dyatkovskiy authored
      http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120130/136146.html
      
      Implemented CaseIterator and it solves almost all described issues: we don't need to mix operand/case/successor indexing anymore. Base iterator class is implemented as a template since it may be initialized either from "const SwitchInst*" or from "SwitchInst*".
      
      ConstCaseIt is just a read-only iterator.
      CaseIt is read-write iterator; it allows to change case successor and case value.
      
      Usage of iterator allows totally remove resolveXXXX methods. All indexing convertions done automatically inside the iterator's getters.
      
      Main way of iterator usage looks like this:
      SwitchInst *SI = ... // intialize it somehow
      
      for (SwitchInst::CaseIt i = SI->caseBegin(), e = SI->caseEnd(); i != e; ++i) {
        BasicBlock *BB = i.getCaseSuccessor();
        ConstantInt *V = i.getCaseValue();
        // Do something.
      }
      
      If you want to convert case number to TerminatorInst successor index, just use getSuccessorIndex iterator's method.
      If you want initialize iterator from TerminatorInst successor index, use CaseIt::fromSuccessorIndex(...) method.
      
      There are also related changes in llvm-clients: klee and clang.
      
      llvm-svn: 152298
      85fcc2da
  5. Mar 07, 2012
    • Richard Smith's avatar
      AST representation for user-defined literals, plus just enough of semantic · c67fdd4e
      Richard Smith authored
      analysis to make the AST representation testable. They are represented by a
      new UserDefinedLiteral AST node, which is a sugared CallExpr. All semantic
      properties, including full CodeGen support, are achieved for free by this
      representation.
      
      UserDefinedLiterals can never be dependent, so no custom instantiation
      behavior is required. They are mangled as if they were direct calls to the
      underlying literal operator. This matches g++'s apparent behavior (but not its
      actual mangling, which is broken for literal-operator-ids).
      
      User-defined *string* literals are now fully-operational, but the semantic
      analysis is quite hacky and needs more work. No other forms of user-defined
      literal are created yet, but the AST support for them is present.
      
      This patch committed after midnight because we had already hit the quota for
      new kinds of literal yesterday.
      
      llvm-svn: 152211
      c67fdd4e
    • Richard Smith's avatar
      Don't even try to directly emit the value of a DeclRefExpr if that declaration · 8c029611
      Richard Smith authored
      is not usable in a constant expression. ~2.5% speedup on 403.gcc / combine.c.
      
      llvm-svn: 152193
      8c029611
  6. Mar 06, 2012
    • Ted Kremenek's avatar
      Add clang support for new Objective-C literal syntax for NSDictionary, NSArray, · e65b086e
      Ted Kremenek authored
      NSNumber, and boolean literals.  This includes both Sema and Codegen support.
      Included is also support for new Objective-C container subscripting.
      
      My apologies for the large patch.  It was very difficult to break apart.
      The patch introduces changes to the driver as well to cause clang to link
      in additional runtime support when needed to support the new language features.
      
      Docs are forthcoming to document the implementation and behavior of these features.
      
      llvm-svn: 152137
      e65b086e
  7. Mar 05, 2012
    • Rafael Espindola's avatar
      Fix a small difference in sema and codegen views of what needs to be output. · 189fa748
      Rafael Espindola authored
      In the included testcase, soma thinks that we already have a definition after we
      see the out of line decl. Codegen puts it in a deferred list, to be output if
      a use is seen. This would break when we saw an explicit template instantiation
      definition, since codegen would not be notified.
      
      This patch adds a method to the consumer interface so that soma can notify
      codegen that this decl is now required.
      
      llvm-svn: 152024
      189fa748
  8. Mar 04, 2012
  9. Mar 03, 2012
  10. Mar 02, 2012
  11. Mar 01, 2012
  12. Feb 29, 2012
  13. Feb 28, 2012
  14. Feb 27, 2012
  15. Feb 26, 2012
    • Richard Smith's avatar
      Ensure that we delete destructors in the right cases. Specifically: · 921bd20d
      Richard Smith authored
       - variant members with nontrivial destructors make the containing class's
         destructor deleted
       - check for a virtual destructor after checking for overridden methods in the
         base class(es)
       - check for an inaccessible operator delete for a class with a virtual
         destructor.
      
      Do not try to call an anonymous union field's destructor from the destructor of
      the containing class.
      
      llvm-svn: 151483
      921bd20d
  16. Feb 25, 2012
Loading