hanchenye-llvm-project/clang/lib/CodeGen
Daniel Dunbar 8429dbc753 Implement EmitUnsupportedRValue to generate an appropriately typed RValue.
llvm-svn: 62004
2009-01-09 20:09:28 +00:00
..
CGBuilder.h
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 Provide a new kind of iterator, the specific_decl_iterator, that 2009-01-09 17:18:27 +00:00
CGCall.h
CGDebugInfo.cpp Generate debug info for VLA types 2009-01-05 01:23:29 +00:00
CGDebugInfo.h
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 Unifies the name-lookup mechanisms used in various parts of the AST 2008-12-11 16:49:14 +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 Emit more refined "unsupported" error for block expressions. 2009-01-09 17:04:29 +00:00
CGObjC.cpp Couple of code gen. fixes in ObjC's colection-statement. Hard 2009-01-06 18:56:31 +00:00
CGObjCGNU.cpp Provide a new kind of iterator, the specific_decl_iterator, that 2009-01-09 17:18:27 +00:00
CGObjCMac.cpp Provide a new kind of iterator, the specific_decl_iterator, that 2009-01-09 17:18:27 +00:00
CGObjCRuntime.h Remove tabs. 2008-12-16 19:57:09 +00:00
CGStmt.cpp Fix for PR3246: an empty clobber list is the empty string, not a null 2008-12-21 01:15:32 +00:00
CGValue.h Remove tabs. 2008-12-16 19:57:09 +00:00
CMakeLists.txt
CodeGenFunction.cpp Block pointer types are not aggregate types. 2009-01-09 02:44:18 +00:00
CodeGenFunction.h Give "unsupported" error on calls through block pointers instead of 2009-01-09 16:50:52 +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
ModuleBuilder.cpp
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.

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