Skip to content
  1. Dec 12, 2012
  2. Dec 11, 2012
  3. Dec 10, 2012
  4. Dec 09, 2012
    • Benjamin Kramer's avatar
      Unbreak the clang build after r169712. · 7464efca
      Benjamin Kramer authored
      llvm-svn: 169713
      7464efca
    • Chandler Carruth's avatar
      Cleanup and fix an assert that was mis-firing. · ed72cdc0
      Chandler Carruth authored
      Note that there is no test suite update. This was found by a couple of
      tests failing when the test suite was run on a powerpc64 host (thanks
      Roman!). The tests don't specify a triple, which might seem surprising
      for a codegen test. But in fact, these tests don't even inspect their
      output. Not at all. I could add a bunch of triples to these tests so
      that we'd get the test coverage for normal builds, but really someone
      needs to go through and add actual *tests* to these tests. =[ The ones
      in question are:
      
        test/CodeGen/bitfield-init.c
        test/CodeGen/union.c
      
      llvm-svn: 169694
      ed72cdc0
    • Chandler Carruth's avatar
      Fix the bitfield record layout in codegen for big endian targets. · fd8eca20
      Chandler Carruth authored
      This was an egregious bug due to the several iterations of refactorings
      that took place. Size no longer meant what it original did by the time
      I finished, but this line of code never got updated. Unfortunately we
      had essentially zero tests for this in the regression test suite. =[
      
      I've added a PPC64 run over the bitfield test case I've been primarily
      using. I'm still looking at adding more tests and making sure this is
      the *correct* bitfield access code on PPC64 linux, but it looks pretty
      close to me, and it is *worlds* better than before this patch as it no
      longer asserts! =] More commits to follow with at least additional tests
      and maybe more fixes.
      
      Sorry for the long breakage due to this....
      
      llvm-svn: 169691
      fd8eca20
  5. Dec 08, 2012
  6. Dec 07, 2012
    • John McCall's avatar
      Fix the required args count for variadic blocks. · c818bbb8
      John McCall authored
      We were emitting calls to blocks as if all arguments were
      required --- i.e. with signature (A,B,C,D,...) rather than
      (A,B,...).  This patch fixes that and accounts for the
      implicit block-context argument as a required argument.
      In addition, this patch changes the function type under which
      we call unprototyped functions on platforms like x86-64 that
      guarantee compatibility of variadic functions with unprototyped
      function types;  previously we would always call such functions
      under the LLVM type T (...)*, but now we will call them under
      the type T (A,B,C,D,...)*.  This last change should have no
      material effect except for making the type conventions more
      explicit;  it was a side-effect of the most convenient implementation.
      
      llvm-svn: 169588
      c818bbb8
  7. Dec 06, 2012
    • Chandler Carruth's avatar
      Rework the bitfield access IR generation to address PR13619 and · ff0e3a1e
      Chandler Carruth authored
      generally support the C++11 memory model requirements for bitfield
      accesses by relying more heavily on LLVM's memory model.
      
      The primary change this introduces is to move from a manually aligned
      and strided access pattern across the bits of the bitfield to a much
      simpler lump access of all bits in the bitfield followed by math to
      extract the bits relevant for the particular field.
      
      This simplifies the code significantly, but relies on LLVM to
      intelligently lowering these integers.
      
      I have tested LLVM's lowering both synthetically and in benchmarks. The
      lowering appears to be functional, and there are no really significant
      performance regressions. Different code patterns accessing bitfields
      will vary in how this impacts them. The only real regressions I'm seeing
      are a few patterns where the LLVM code generation for loads that feed
      directly into a mask operation don't take advantage of the x86 ability
      to do a smaller load and a cheap zero-extension. This doesn't regress
      any benchmark in the nightly test suite on my box past the noise
      threshold, but my box is quite noisy. I'll be watching the LNT numbers,
      and will look into further improvements to the LLVM lowering as needed.
      
      llvm-svn: 169489
      ff0e3a1e
  8. Dec 04, 2012
  9. Dec 03, 2012
  10. Dec 02, 2012
  11. Dec 01, 2012
  12. Nov 30, 2012
  13. Nov 29, 2012
    • Alexey Samsonov's avatar
      This patch exposes to Clang users three more sanitizers are experimental features of ASan: · 0e96becf
      Alexey Samsonov authored
      1) init-order sanitizer: initialization-order checker.
      Status: usable, but may produce false positives w/o proper blacklisting.
      2) use-after-return sanitizer
      Status: implemented, but heavily understed.
      Should be optional, as it significanlty slows program down.
      3) use-after-scope sanitizer
      Status: in progress.
      
      llvm-svn: 168950
      0e96becf
    • Rafael Espindola's avatar
      Merge function types in C. · 8778c280
      Rafael Espindola authored
      Among other differences, GCC accepts
      
        typedef int IA[];
        typedef int A10[10];
        static A10 *f(void);
        static IA  *f(void);
        void g(void) {
          (void)sizeof(*f());
        }
      
      but clang used to reject it with:
      
        invalid application of 'sizeof' to an incomplete type 'IA' (aka 'int []')
      
      The intention of c99's 6.2.7 seems to be that we should use the composite type
      and accept as gcc does.
      
      Doing the type merging required some extra fixes:
        * Use the type from the function type in initializations, even if an parameter
          is available.
        * Fix the merging of the noreturn attribute in function types.
        * Make CodeGen  handle the fact that an parameter type can be different from
          the corresponding type in the function type.
      
      llvm-svn: 168895
      8778c280
    • Fariborz Jahanian's avatar
      objective-C blocks: Make sure that identical logic is used · 998f0a33
      Fariborz Jahanian authored
      in deciding a copy/dispose field is needed in a byref structure
      and when generating the copy/dispose helpers. In certain
      cases, these fields were being added but no copy/dispose was
      being generated. This was uncovered in ARC, but not in MRR.
      // rdar://12759433
      
      llvm-svn: 168825
      998f0a33
  14. Nov 28, 2012
  15. Nov 27, 2012
    • Will Dietz's avatar
      Add -fsanitize=integer for reporting suspicious integer behaviors. · 1897cb3b
      Will Dietz authored
      Introduces new sanitizer "unsigned-integer-overflow".
      
      llvm-svn: 168701
      1897cb3b
    • Bill Schmidt's avatar
      This patch addresses an incompatibility relative to the 64-bit PowerPC · 90b22c9d
      Bill Schmidt authored
      ELF ABI.
      
      Complex values are to be passed in registers as though the real and
      imaginary parts were passed as separate parameters.  Prior to this
      patch, complex values were passed as byval aggregates.  It turns out
      that specifying getDirect() for all complex types when classifying the
      argument type results in the desired behavior.
      
      The new Clang test case verifies that the correct LLVM IR is generated
      for caller and callee for each of the underlying types for _Complex.
      
      llvm-svn: 168673
      90b22c9d
  16. Nov 26, 2012
  17. Nov 23, 2012
  18. Nov 20, 2012
  19. Nov 17, 2012
  20. Nov 16, 2012
    • Richard Smith's avatar
      A step towards sorting out handling of triviality of special members in C++11. · 16488472
      Richard Smith authored
      Separate out the notions of 'has a trivial special member' and 'has a
      non-trivial special member', and use them appropriately. These are not
      opposites of one another (there might be no special member, or in C++11 there
      might be a trivial one and a non-trivial one). The CXXRecordDecl predicates
      continue to produce incorrect results, but do so in fewer cases now, and
      they document the cases where they might be wrong.
      
      No functionality changes are intended here (they will come when the predicates
      start producing the right answers...).
      
      llvm-svn: 168119
      16488472
    • Eli Friedman's avatar
      Make sure CodeGenTypes correctly reconverts function types. Fixes PR14355, a... · ab197128
      Eli Friedman authored
      Make sure CodeGenTypes correctly reconverts function types.  Fixes PR14355, a crash in IR generation.
      
      llvm-svn: 168112
      ab197128
Loading