Skip to content
  1. Dec 09, 2012
  2. 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
  3. Aug 19, 2011
Loading