Skip to content
  1. Dec 14, 2012
  2. Dec 13, 2012
    • David Blaikie's avatar
      Debug Info: Emit vtables pointer members as artificial. · 831c9927
      David Blaikie authored
      I wasn't sure where to put the test case for this, but this seemed like as good
      a place as any. I had to reorder the tests here to make them legible while
      still matching the order of metadata output in the IR file (for some reason
      making it virtual changed the ordering).
      
      Relevant commit to fix up LLVM to actually respect 'artificial' member
      variables is coming once I write up a test case for it.
      
      llvm-svn: 170154
      831c9927
    • Richard Smith's avatar
      ubsan: Add -fsanitize=bool and -fsanitize=enum, which check for loads of · 1629da95
      Richard Smith authored
      bit-patterns which are not valid values for enumerated or boolean types.
      These checks are the ubsan analogue of !range metadata.
      
      llvm-svn: 170108
      1629da95
  3. Dec 09, 2012
    • Chandler Carruth's avatar
      6bb5c06e
    • Chandler Carruth's avatar
      Add a test case that I've been using to clarify the bitfield layout for · e8f7a959
      Chandler Carruth authored
      both LE and BE targets.
      
      AFAICT, Clang get's this correct for PPC64. I've compared it to GCC 4.8
      output for PPC64 (thanks Roman!) and to my limited ability to read power
      assembly, it looks functionally equivalent. It would be really good to
      fill in the assertions on this test case for x86-32, PPC32, ARM, etc.,
      but I've reached the limit of my time and energy... Hopefully other
      folks can chip in as it would be good to have this in place to test any
      subsequent changes.
      
      To those who care about PPC64 performance, a side note: there is some
      *obnoxiously* bad code generated for these test cases. It would be worth
      someone's time to sit down and teach the PPC backend to pattern match
      these IR constructs better. It appears that things like '(shr %foo,
      <imm>)' turn into 'rldicl R, R, 64-<imm>, <imm>' or some such. They
      don't even get combined with other 'rldicl' instructions *immediately
      adjacent*. I'll add a couple of these patterns to the README, but
      I think it would be better to look at all the patterns produced by this
      and other bitfield access code, and systematically build up a collection
      of patterns that efficiently reduce them to the minimal code.
      
      llvm-svn: 169693
      e8f7a959
    • 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
  4. 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
  5. Dec 05, 2012
  6. Dec 04, 2012
  7. Dec 02, 2012
  8. Dec 01, 2012
  9. Nov 29, 2012
  10. Nov 28, 2012
  11. Nov 27, 2012
  12. Nov 26, 2012
  13. Nov 14, 2012
    • Richard Smith's avatar
      PR14279: Work around this major miscompilation by treating move operations as · 5fa94b09
      Richard Smith authored
      non-trivial if they would not call a move operation, even if they would in fact
      call a trivial copy operation. A proper fix is to follow, but this small
      directed fix is intended for porting to the 3.2 release branch.
      
      llvm-svn: 167920
      5fa94b09
    • David Blaikie's avatar
      Provide the correct mangling and linkage for certain unnamed nested classes. · 095deba5
      David Blaikie authored
      This corrects the mangling and linkage of classes (& their member functions) in
      cases like this:
      
        struct foo {
          struct {
            void func() { ... }
          } x;
        };
      
      we were accidentally giving this nested unnamed struct 'no' linkage where it
      should've had the linkage of the outer class. The mangling was incorrecty too,
      mangling as TU-wide unnamed type mangling of $_X rather than class-scoped
      mangling of UtX_.
      
      This also fixes -Wunused-member-function which would incorrectly diagnose
      'func' as unused due to it having no linkage & thus appearing to be TU-local
      when in fact it might be correctly used in another TU.
      
      Similar mangling should be applied to function local classes in similar cases
      but I've deferred that for a subsequent patch.
      
      Review/discussion by Richard Smith, John McCall, & especially Eli Friedman.
      
      llvm-svn: 167906
      095deba5
    • Richard Smith's avatar
      Remove another questionable use of hasTrivial*. The relevant thing for this · 41ae3288
      Richard Smith authored
      test was whether the /selected/ operator= was trivial, not whether the class
      had any trivial (or any non-trivial) operator=s.
      
      llvm-svn: 167897
      41ae3288
    • Eric Christopher's avatar
      Revert "Use the 'count' attribute instead of the 'upper_bound' attribute." · 175c7265
      Eric Christopher authored
      temporarily since it breaks the gdb bots.
      
      This reverts commit r167807/30305bec25cac981c6d4a3b8be004401310a82a7.
      
      llvm-svn: 167887
      175c7265
  14. Nov 13, 2012
  15. Nov 12, 2012
  16. Nov 09, 2012
    • Nico Weber's avatar
      [Windows] Fix mangling of number literal '0' · 7d37f05a
      Nico Weber authored
      Do this by making the mangleNumber(APSInt) overload look like
      the int64_t version. (The latter should probably just delegate
      to the former).
      
      Test from Evgeny Eltsin!
      
      llvm-svn: 167599
      7d37f05a
  17. Nov 08, 2012
  18. Nov 06, 2012
  19. Nov 05, 2012
  20. Nov 03, 2012
  21. Nov 02, 2012
  22. Oct 31, 2012
    • Bill Schmidt's avatar
      This patch removes the XFAIL for powerpc for · 22bd6d18
      Bill Schmidt authored
      test/CodeGenCXX/member-alignment.cpp.  The test succeeds for
      powerpc64-unknown-linux-gnu.  If other flavors of powerpc are
      shown by buildbots to still be broken, we can adjust the test
      at that time.
      
      llvm-svn: 167143
      22bd6d18
  23. Oct 27, 2012
    • Douglas Gregor's avatar
      When an externally-supplied record layout has a size that clearly · 1423a5cf
      Douglas Gregor authored
      doesn't include padding up to the alignment of the record, take this
      as a cue that the alignment of the record should (conservatively) be
      set to 1. This is similar to other the other cues we use to determine
      that the record has a lower alignment, e.g., that the
      externally-supplied layout places fields at lower offsets than we
      would. Fixes <rdar://problem/12582052>; test case in LLDB.
      
      llvm-svn: 166824
      1423a5cf
  24. Oct 26, 2012
  25. Oct 25, 2012
Loading