llvm-project/clang/lib/CodeGen
Fariborz Jahanian 705c6d9cdd Patch to re-implement ivar-list meta-data generation to fix
cases of unnamed ivar bitfields.

llvm-svn: 62429
2009-01-17 19:36:33 +00:00
..
CGBuilder.h Disable generation of basic block names in NDEBUG mode. 2008-11-12 00:01:12 +00:00
CGBuiltin.cpp Generate code for __builtin_ia32_pshufw 2008-12-22 04:54:32 +00:00
CGCXX.cpp Provide a new kind of iterator, the specific_decl_iterator, that 2009-01-09 17:18:27 +00:00
CGCall.cpp Add dummy X86_64 ABIInfo implementation. 2009-01-15 18:18:40 +00:00
CGCall.h Large mechanical patch. 2008-09-25 21:02:23 +00:00
CGDebugInfo.cpp more SourceLocation lexicon change: instead of referring to the 2009-01-16 07:36:28 +00:00
CGDebugInfo.h reimplement debug info generation in terms of DebugInfo.h instead of 2008-11-10 06:08:34 +00:00
CGDecl.cpp more SourceLocation lexicon change: instead of referring to the 2009-01-16 07:36:28 +00:00
CGExpr.cpp Patch to implement code gen for aggrgate-valued property used 2009-01-12 23:27:26 +00:00
CGExprAgg.cpp add codegen support to union casts 2009-01-15 20:14:33 +00:00
CGExprComplex.cpp Normalize many BasicBlock names. 2008-11-13 01:38:36 +00:00
CGExprConstant.cpp add support for usage of cast to union thing with static vars 2009-01-17 00:48:48 +00:00
CGExprScalar.cpp Changed the API yet again. 2009-01-16 19:02:53 +00:00
CGObjC.cpp Attempt to unbreak Windows build. 2009-01-16 01:50:29 +00:00
CGObjCGNU.cpp (LLVM up) Match TargetData API change in LLVM TOT. 2009-01-12 21:08:18 +00:00
CGObjCMac.cpp Patch to re-implement ivar-list meta-data generation to fix 2009-01-17 19:36:33 +00:00
CGObjCRuntime.h This patch fixes the code gen failures which was a fallout from 2009-01-10 21:06:09 +00:00
CGStmt.cpp Handle multi-value inputs 2009-01-12 02:22:13 +00:00
CGValue.h Remove tabs. 2008-12-16 19:57:09 +00:00
CMakeLists.txt CMake: Builds and installs clang binary and libs (no docs yet). It 2008-10-26 00:56:18 +00:00
CodeGenFunction.cpp Block pointer types are not aggregate types. 2009-01-09 02:44:18 +00:00
CodeGenFunction.h Forgot to commit this 2009-01-11 19:40:10 +00:00
CodeGenModule.cpp more SourceLocation lexicon change: instead of referring to the 2009-01-16 07:36:28 +00:00
CodeGenModule.h Fix the bug that would cause Python to crash at startup. 2009-01-04 02:08:04 +00:00
CodeGenTypes.cpp (LLVM up) Match TargetData API change in LLVM TOT. 2009-01-12 21:08:18 +00:00
CodeGenTypes.h Code gen. for ivar references; including bitfield 2008-12-15 20:35:07 +00:00
Makefile Make a major restructuring of the clang tree: introduce a top-level 2008-03-15 23:59:48 +00:00
ModuleBuilder.cpp Add GetModule accessor to ModuleBuilder 2008-10-21 19:55:09 +00:00
README.txt Mention an optimization opportunity pointed out by Chris. 2008-12-04 09:05:45 +00:00

README.txt

IRgen optimization opportunities.

//===---------------------------------------------------------------------===//

The common pattern of
--
short x; // or char, etc
(x == 10)
--
generates an zext/sext of x which can easily be avoided.

//===---------------------------------------------------------------------===//

Bitfields accesses can be shifted to simplify masking and sign
extension. For example, if the bitfield width is 8 and it is
appropriately aligned then is is a lot shorter to just load the char
directly.

//===---------------------------------------------------------------------===//

It may be worth avoiding creation of alloca's for formal arguments
for the common situation where the argument is never written to or has
its address taken. The idea would be to begin generating code by using
the argument directly and if its address is taken or it is stored to
then generate the alloca and patch up the existing code.

In theory, the same optimization could be a win for block local
variables as long as the declaration dominates all statements in the
block.

//===---------------------------------------------------------------------===//