Skip to content
  1. Jun 16, 2012
    • Chandler Carruth's avatar
      Try to reduce the size of the array used for compile-time testing by · 8710d886
      Chandler Carruth authored
      making the bounds all '1', and chunking it a bit.
      
      llvm-svn: 158598
      8710d886
    • Chandler Carruth's avatar
      Add support to the alignment support header for conjuring a character · dea00d7c
      Chandler Carruth authored
      array of a suitable size and alignment for any of a number of different
      types to be stored into the character array.
      
      The mechanisms for producing an explicitly aligned type are fairly
      complex because this operation is poorly supported on all compilers.
      We've spent a fairly significant amount of time experimenting with
      different implementations inside of Google, and the one using explicitly
      expanded templates has been the most robust.
      
      Credit goes to Nick Lewycky for writing the first 20 versions or so of
      this logic we had inside of Google. I based this on the only one to
      actually survive. In case anyone is worried, yes we are both explicitly
      re-contributing and re-licensing it for LLVM. =]
      
      Once the issues with actually specifying the alignment are finished, it
      turns out that most compilers don't in turn align anything the way they
      are instructed. Testing of this logic against both Clang and GCC
      indicate that the alignment constraints are largely ignored by both
      compilers! I've come up with and used a work-around by wrapping each
      alignment-hinted type directly in a struct, and using that struct to
      align the character array through a union. This elaborate hackery is
      terrifying, but I've included testing that caught a terrifying number of
      bugs in every other technique I've tried.
      
      All of this in order to implement a poor C++98 programmers emulation of
      C++11 unrestricted unions in classes such as SmallDenseMap.
      
      llvm-svn: 158597
      dea00d7c
    • Evan Cheng's avatar
      It's not deterministic to iterate over SmallPtrSet. Replace it with... · 773b2cd6
      Evan Cheng authored
      It's not deterministic to iterate over SmallPtrSet. Replace it with SmallSetVector. Patch by Daniel Reynaud. rdar://11671029
      
      llvm-svn: 158594
      773b2cd6
    • Chandler Carruth's avatar
      Work around a bug with MSVC 10 where it fails to recognize a valid use · a68dcb44
      Chandler Carruth authored
      of typename. GCC and Clang were fine with this, but MSVC won't accept
      it. Fortunately, it also doesn't need it. Yuck.
      
      Thanks to Nakamura for pointing this out in IRC.
      
      llvm-svn: 158593
      a68dcb44
    • Pete Cooper's avatar
      Fix crash from r158529 on Bullet. · 818e9f4a
      Pete Cooper authored
      Dynamic GEPs created by SROA needed to insert extra "i32 0"
      operands to index through structs and arrays to get to the
      vector being indexed.
      
      llvm-svn: 158590
      818e9f4a
    • Chandler Carruth's avatar
      Type parameterize the DenseMap unit tests. · 2b50c40e
      Chandler Carruth authored
      These were already trying to be type parameterized over different
      key/value pairs. I've realized this goal using GoogleTest's typed test
      functionality. This allows us to easily replicate the tests across
      different key/value combinations and soon different mapping templates.
      
      I've fixed a few bugs in the tests and extended them a bit in the
      process as many tests were only applying to the int->int mapping.
      
      llvm-svn: 158589
      2b50c40e
    • Chandler Carruth's avatar
      Lift the NumElements and NumTombstones members into the super class · 144a2ac8
      Chandler Carruth authored
      rather than the base class. Add a pile of boilerplate to indirect around
      this.
      
      This is pretty ugly, but it allows the super class to change the
      representation of these values, which will be key for doing
      a SmallDenseMap.
      
      Suggestions on better method structuring / naming are welcome, but keep
      in mind that SmallDenseMap won't have an 'unsigned' member to expose
      a reference to... =/
      
      llvm-svn: 158586
      144a2ac8
    • Chandler Carruth's avatar
      Factor DenseMap into a base class that implements the hashtable logic, · d7291625
      Chandler Carruth authored
      and a derived class that provides the allocation and growth strategy.
      
      This is the first (and biggest) step toward building a SmallDenseMap
      that actually behaves exactly the same as DenseMap, and supports all the
      same types and interface points with the same semantics.
      
      llvm-svn: 158585
      d7291625
    • Chandler Carruth's avatar
      Don't call 'FilesToRemove[0]' when the vector is empty, even to compute · 52de271d
      Chandler Carruth authored
      the address of it. Found by a checking STL implementation used on
      a dragonegg builder. Sorry about this one. =/
      
      llvm-svn: 158582
      52de271d
    • Chandler Carruth's avatar
      Harden the Unix signals code to be more async signal safe. · e6196eba
      Chandler Carruth authored
      This is likely only the tip of the ice berg, but this particular bug
      caused any double-free on a glibc system to turn into a deadlock! It is
      not generally safe to either allocate or release heap memory from within
      the signal handler. The 'pop_back()' in RemoveFilesToRemove was deleting
      memory and causing the deadlock. What's worse, eraseFromDisk in PathV1
      has lots of allocation and deallocation paths. We even passed 'true' in
      a place that would have caused the *signal handler* to try to run the
      'system' system call and shell out to 'rm -rf'. That was never going to
      work...
      
      This patch switches the file removal to use a vector of strings so that
      the exact text needed for the 'unlink' system call can be stored there.
      It switches the loop to be a boring indexed loop, and directly calls
      unlink without looking at the error. It also works quite hard to ensure
      that calling 'c_str()' is safe, by ensuring that the non-signal-handling
      code path that manipulates the vector always leaves it in a state where
      every element has already had 'c_str()' called at least once.
      
      I dunno exactly how overkill this is, but it fixes the
      deadlock-on-double free issue, and seems likely to prevent any other
      issues from sneaking up.
      
      Sorry for not having a test case, but I *really* don't know how to test
      signal handling code easily....
      
      llvm-svn: 158580
      e6196eba
    • Jakob Stoklund Olesen's avatar
      Remove final verification in RABasic. · 38a6fbf9
      Jakob Stoklund Olesen authored
      We now have a proper machine code verifier pass between register
      allocation and rewriting.
      
      llvm-svn: 158577
      38a6fbf9
    • Jakob Stoklund Olesen's avatar
      Print out register number in InlineSpiller. · 45c1f997
      Jakob Stoklund Olesen authored
      llvm-svn: 158575
      45c1f997
    • Andrew Trick's avatar
      Unit test for LSR kind=Special fix: r158536. · e67a30c7
      Andrew Trick authored
      llvm-svn: 158570
      e67a30c7
    • Jakob Stoklund Olesen's avatar
      Accept null PhysReg arguments to checkRegMaskInterference. · 13dffcb7
      Jakob Stoklund Olesen authored
      Calling checkRegMaskInterference(VirtReg) checks if VirtReg crosses any
      regmask operands, regardless of the registers they clobber.
      
      llvm-svn: 158563
      13dffcb7
    • Michael J. Spencer's avatar
      [docs] Make it pretty. · a9acafa6
      Michael J. Spencer authored
      llvm-svn: 158561
      a9acafa6
    • Kevin Enderby's avatar
      Fix the encoding of the armv7m (MClass) for MSR registers other than aspr, · 6c7279ec
      Kevin Enderby authored
      iaspr, espr and xpsr which also needed to have 0b10 in their mask encoding bits.
      
      llvm-svn: 158560
      6c7279ec
  2. Jun 15, 2012
  3. Jun 14, 2012
Loading