teak-llvm/clang/lib/CodeGen
Fariborz Jahanian 4723fb70a9 Patch to build class meta-data for each implementation
of class in objc2's nonfragile abi.

llvm-svn: 62935
2009-01-24 21:21:53 +00:00
..
CGBuilder.h Disable generation of basic block names in NDEBUG mode. 2008-11-12 00:01:12 +00:00
CGBuiltin.cpp Slight cleanup, and fix for va_arg on architectures where va_list is a 2009-01-20 17:46:04 +00:00
CGCall.cpp Start filling in x86_64 ABI implementation. 2009-01-24 08:32:22 +00:00
CGCall.h Large mechanical patch. 2008-09-25 21:02:23 +00:00
CGCXX.cpp Provide a new kind of iterator, the specific_decl_iterator, that 2009-01-09 17:18:27 +00:00
CGDebugInfo.cpp Allow creation of "dummy" compile units for debug information. 2009-01-22 00:09:25 +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 Vector codegen improvements 2009-01-18 06:42:49 +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 remove dead code. 2009-01-24 20:24:49 +00:00
CGExprScalar.cpp remove a bunch of alignment handling code out of CGExprScalar, since 2009-01-24 21:09:45 +00:00
CGObjC.cpp Remove ScopedDecl, collapsing all of its functionality into Decl, so 2009-01-20 01:17:11 +00:00
CGObjCGNU.cpp revert the gnu objc patches, they regress codegen-gnu.m 2009-01-21 19:37:47 +00:00
CGObjCMac.cpp Patch to build class meta-data for each implementation 2009-01-24 21:21:53 +00:00
CGObjCRuntime.h Use NonFragileABI as name of new Next abi. More comments 2009-01-22 23:02:58 +00:00
CGStmt.cpp silence a couple unused variable 'result' warnings. 2009-01-21 07:35:26 +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 Slight cleanup, and fix for va_arg on architectures where va_list is a 2009-01-20 17:46:04 +00:00
CodeGenFunction.h Slight cleanup, and fix for va_arg on architectures where va_list is a 2009-01-20 17:46:04 +00:00
CodeGenModule.cpp Use NonFragileABI as name of new Next abi. More comments 2009-01-22 23:02:58 +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 Remove ScopedDecl, collapsing all of its functionality into Decl, so 2009-01-20 01:17:11 +00:00
README.txt Mention an optimization opportunity pointed out by Chris. 2008-12-04 09:05:45 +00:00

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.

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