clang/lib/CodeGen
Devang Patel 0ac8f31af4 While emitting debugging infor for a C++ class, identify the holder of class's vtable, if any.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94712 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 00:54:21 +00:00
..
ABIInfo.h
CGBlocks.cpp Change the return type of ASTContext::getDeclAlignInBytes() to CharUnits and, 2010-01-27 17:10:57 +00:00
CGBlocks.h Use CharUnits for alignments in character units. 2010-01-26 19:13:33 +00:00
CGBuilder.h
CGBuiltin.cpp Add bzero builtin; this should help codegen quality for code using this 2010-01-23 19:00:10 +00:00
CGCXX.cpp
CGCXX.h
CGCall.cpp
CGCall.h
CGClass.cpp Fix a couple bugs in copy assignment operator synthesis. 2010-01-15 20:06:11 +00:00
CGDebugInfo.cpp While emitting debugging infor for a C++ class, identify the holder of class's vtable, if any. 2010-01-28 00:54:21 +00:00
CGDebugInfo.h Include "this" pointer argument while emitting debug info for a C++ method. 2010-01-28 00:28:01 +00:00
CGDecl.cpp Change the return type of ASTContext::getDeclAlignInBytes() to CharUnits and, 2010-01-27 17:10:57 +00:00
CGDeclCXX.cpp global variable that binds reference to a non-lvalue reproted 2010-01-25 21:40:39 +00:00
CGException.cpp
CGExpr.cpp Use CharUnits for alignment in EmitNullInitializationLValue(). 2010-01-26 18:35:11 +00:00
CGExprAgg.cpp
CGExprCXX.cpp Convert one last size variable to CharUnits (follow-on to 94577). 2010-01-26 19:59:28 +00:00
CGExprComplex.cpp refactor pre/postinc logic into CGF and require the caller to pass in the 2010-01-09 21:40:03 +00:00
CGExprConstant.cpp Created __builtin___NSStringMakeConstantString() builtin, which generates constant Objective-C strings. 2010-01-23 02:40:42 +00:00
CGExprScalar.cpp Roll out ASTContext::getTypeSizeInChars(), replacing instances of 2010-01-11 17:06:35 +00:00
CGObjC.cpp Created __builtin___NSStringMakeConstantString() builtin, which generates constant Objective-C strings. 2010-01-23 02:40:42 +00:00
CGObjCGNU.cpp Unique ObjC strings (GNU Runtime); fix for PR6142. Note: Doing this in the runtime-specific code is a bit ugly. It would be a good idea to hoist all of the string / protocol uniqueing code up into CGObjCRuntime or CodeGenModule and only handle emitting the original versions in the runtime-specific code. 2010-01-27 12:49:23 +00:00
CGObjCMac.cpp Created __builtin___NSStringMakeConstantString() builtin, which generates constant Objective-C strings. 2010-01-23 02:40:42 +00:00
CGObjCRuntime.h Created __builtin___NSStringMakeConstantString() builtin, which generates constant Objective-C strings. 2010-01-23 02:40:42 +00:00
CGRTTI.cpp
CGRecordLayoutBuilder.cpp
CGRecordLayoutBuilder.h
CGStmt.cpp
CGTemporaries.cpp
CGVTT.cpp Move the VTT related code into its own file, CGVTT.cpp 2010-01-21 16:50:45 +00:00
CGValue.h
CGVtable.cpp Refine the non-virtual this adjustments for thunks by using the offset 2010-01-26 22:44:01 +00:00
CGVtable.h Store the address points for constructor vtables directly in the VTT builder, because that's the only time they're needed. 2010-01-14 02:29:07 +00:00
CMakeLists.txt Move the VTT related code into its own file, CGVTT.cpp 2010-01-21 16:50:45 +00:00
CodeGenFunction.cpp Fix a nasty bug where temporaries weren't marked as being conditional in some cases. 2010-01-24 00:20:05 +00:00
CodeGenFunction.h Use CharUnits for alignments in character units. 2010-01-26 19:13:33 +00:00
CodeGenModule.cpp Change the return type of ASTContext::getDeclAlignInBytes() to CharUnits and, 2010-01-27 17:10:57 +00:00
CodeGenModule.h Introduce CodeGenModule::GetTargetTypeStoreSize() to calculate the store size 2010-01-26 13:48:07 +00:00
CodeGenTypes.cpp Use the new isInteger() method in a couple places, some random cleanup, and 2010-01-11 19:58:10 +00:00
CodeGenTypes.h Generalize target weirdness handling having proper layering in mind: 2010-01-10 12:58:08 +00:00
GlobalDecl.h
Makefile -fno-rtti is now the default. 2010-01-24 20:43:31 +00:00
Mangle.cpp Mangle static variables with an extra name to distinguish them from non-static variables in the same TU. 2010-01-24 03:04:27 +00:00
Mangle.h
ModuleBuilder.cpp
README.txt
TargetInfo.cpp Structs and classes with non-trivial destructors or copy constructors should be passed indirectly in the 32-bit ABI. Fixes PR6094. 2010-01-27 03:25:19 +00:00
TargetInfo.h Eliminate some Clang warnings 2010-01-22 15:41:14 +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.

NOTE: The main case we care about this for is for -O0 -g compile time
performance, and in that scenario we will need to emit the alloca
anyway currently to emit proper debug info. So this is blocked by
being able to emit debug information which refers to an LLVM
temporary, not an alloca.

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

We should try and avoid generating basic blocks which only contain
jumps. At -O0, this penalizes us all the way from IRgen (malloc &
instruction overhead), all the way down through code generation and
assembly time.

On 176.gcc:expr.ll, it looks like over 12% of basic blocks are just
direct branches!

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