llvm-project/clang/lib
Chandler Carruth ff0e3a1e1c Rework the bitfield access IR generation to address PR13619 and
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
2012-12-06 11:14:44 +00:00
..
ARCMigrate Sort all of Clang's files under 'lib', and fix up the broken headers 2012-12-04 09:13:33 +00:00
AST Don't use dyn_cast on a Type* which might not be canonical. Fixes an extremely obscure record layout bug. 2012-12-06 03:04:50 +00:00
ASTMatchers Fixes crash in isDerivedFrom for recursive templates. 2012-12-04 13:40:29 +00:00
Analysis Use the BlockDecl captures list to infer the direct captures for a BlockDataRegion. Fixes <rdar://problem/12415065>. 2012-12-06 07:17:26 +00:00
Basic Adapt to LLVM commit 169291 which streamlines the usage of NaCl/NativeClient 2012-12-04 18:38:10 +00:00
CodeGen Rework the bitfield access IR generation to address PR13619 and 2012-12-06 11:14:44 +00:00
Driver [driver, ms-inline asm] MS-Style inline assembly is controlled by the 2012-12-05 21:08:21 +00:00
Edit Sort all of Clang's files under 'lib', and fix up the broken headers 2012-12-04 09:13:33 +00:00
Format "<<" alignment for clang-format. 2012-12-06 09:56:08 +00:00
Frontend [driver, ms-inline asm] -fms-compatibility enables -fms-extensions, so this should enable 2012-12-05 23:35:10 +00:00
FrontendTool Sort all of Clang's files under 'lib', and fix up the broken headers 2012-12-04 09:13:33 +00:00
Headers Code cleanup: Remove trailing whitespace in unwind.h. 2012-11-14 06:33:58 +00:00
Lex Sort all of Clang's files under 'lib', and fix up the broken headers 2012-12-04 09:13:33 +00:00
Parse [driver, ms-inline asm] MS-Style inline assembly is controlled by the 2012-12-05 21:08:21 +00:00
Rewrite Sort all of Clang's files under 'lib', and fix up the broken headers 2012-12-04 09:13:33 +00:00
Sema Fix http://stackoverflow.com/questions/13521163 2012-12-06 06:44:44 +00:00
Serialization Sort all of Clang's files under 'lib', and fix up the broken headers 2012-12-04 09:13:33 +00:00
StaticAnalyzer Only provide explicit getCapturedRegion() and getOriginalRegion() from referenced_vars_iterator. 2012-12-06 07:17:20 +00:00
Tooling Sort all of Clang's files under 'lib', and fix up the broken headers 2012-12-04 09:13:33 +00:00
CMakeLists.txt Initial version of formatting library. 2012-12-03 18:12:45 +00:00
Makefile Initial version of formatting library. 2012-12-03 18:12:45 +00:00