clang-1/lib/CodeGen
Anton Korobeynikov 2f402708e6 Add full dllimport / dllexport support: both sema checks and codegen.
Patch by Ilya Okonsky

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61437 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-26 00:52:02 +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 Warning fixes to operator precedence warnings. 2008-12-16 20:06:41 +00:00
CGCall.cpp Allow ABI to use StructRet even for scalar values. 2008-12-18 04:52:14 +00:00
CGCall.h Large mechanical patch. 2008-09-25 21:02:23 +00:00
CGDebugInfo.cpp Actually distinguish between RecordDecl::field_iterator and RecordDecl::field_const_iterator, propagating the constness down to the FieldDecls. 2008-12-11 17:59:21 +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 Add ASTContext::getBaseElementType and use it in CodeGenFunction::EmitArraySubscriptExpr. 2008-12-21 03:44:36 +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 support for member references (E1.E2, E1->E2) with C++ semantics, 2008-12-20 23:49:58 +00:00
CGExprScalar.cpp Add codegen support for __null 2008-12-21 22:39:40 +00:00
CGObjC.cpp Removed a slot in ObjCMemRegExpr used in 2008-12-18 17:29:46 +00:00
CGObjCGNU.cpp Code gen. for ivar references; including bitfield 2008-12-15 20:35:07 +00:00
CGObjCMac.cpp More encoding support. This time for 2008-12-19 23:34:38 +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 CMake: Builds and installs clang binary and libs (no docs yet). It 2008-10-26 00:56:18 +00:00
CodeGenFunction.cpp Handle typedefs to VLAs (Emit the size expr when we encounter the typedef 2008-12-20 21:51:53 +00:00
CodeGenFunction.h Change EmitVLASize to take a QualType that must be a variably modified type. 2008-12-20 20:46:34 +00:00
CodeGenModule.cpp Add full dllimport / dllexport support: both sema checks and codegen. 2008-12-26 00:52:02 +00:00
CodeGenModule.h Add option argument to GetAddrOfConstantString to use for name of 2008-10-17 21:56:50 +00:00
CodeGenTypes.cpp This patch will build the Records lazily per Steve's comments. 2008-12-17 21:40:49 +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.

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