teak-llvm/clang/lib/CodeGen
Anders Carlsson 00057e4e09 Handle multi-value inputs
llvm-svn: 62069
2009-01-12 02:22:13 +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
CGCall.cpp Provide a new kind of iterator, the specific_decl_iterator, that 2009-01-09 17:18:27 +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 Generate debug info for VLA types 2009-01-05 01:23:29 +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 Make VLAs usable, and make basic usage work correctly. Also, add a 2008-12-20 23:11:59 +00:00
CGExpr.cpp Implement EmitUnsupportedRValue to generate an appropriately typed RValue. 2009-01-09 20:09:28 +00:00
CGExprAgg.cpp Prevent a segfault for vaarg expressions on unsupported architectures. 2009-01-09 21:09:38 +00:00
CGExprComplex.cpp Normalize many BasicBlock names. 2008-11-13 01:38:36 +00:00
CGExprConstant.cpp Add QualifiedDeclRefExpr, which retains additional source-location 2009-01-06 05:10:23 +00:00
CGExprScalar.cpp make ScalarExprEmitter::EmitCompare() emit the expression with the correct type instead of always zext it to an int 2009-01-11 23:22:37 +00:00
CGObjC.cpp Fix a misleading comment. 2009-01-10 22:55:25 +00:00
CGObjCGNU.cpp This patch fixes the code gen failures which was a fallout from 2009-01-10 21:06:09 +00:00
CGObjCMac.cpp Convert property implementation to DeclContext::addDecl(). 2009-01-11 12:47:58 +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 Objc's compatibility-alias semantics and code 2009-01-08 01:10:55 +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 Provide a new kind of iterator, the specific_decl_iterator, that 2009-01-09 17:18:27 +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

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.

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