llvm-project/clang/lib/CodeGen
Benjamin Kramer 8f8f405c71 No need to terminate this buffer.
llvm-svn: 94313
2010-01-23 18:16:07 +00:00
..
ABIInfo.h x86-64 ABI: If a type is a C++ record with either a non-trivial destructor or a non-trivial copy constructor, it should be passed in a pointer. Daniel, plz review. 2009-09-16 15:53:40 +00:00
CGBlocks.cpp Simplify code. 2010-01-22 13:59:13 +00:00
CGBlocks.h Roll out ASTContext::getTypeSizeInChars(), replacing instances of 2010-01-11 17:06:35 +00:00
CGBuilder.h Disable generation of basic block names in NDEBUG mode. 2008-11-12 00:01:12 +00:00
CGBuiltin.cpp Created __builtin___NSStringMakeConstantString() builtin, which generates constant Objective-C strings. 2010-01-23 02:40:42 +00:00
CGCXX.cpp Move a few more functions away from CGCXX and to CGClass and CGExprCXX. 2010-01-01 20:29:01 +00:00
CGCXX.h Remove tabs, and whitespace cleanups. 2009-09-09 15:08:12 +00:00
CGCall.cpp Fill in the return value slot in CGExprAgg::VisitCallExpr. This takes us halfway towards fixing PR5824. 2009-12-24 20:40:36 +00:00
CGCall.h Fill in the return value slot in CGExprAgg::VisitCallExpr. This takes us halfway towards fixing PR5824. 2009-12-24 20:40:36 +00:00
CGClass.cpp Fix a couple bugs in copy assignment operator synthesis. 2010-01-15 20:06:11 +00:00
CGDebugInfo.cpp No need to terminate this buffer. 2010-01-23 18:16:07 +00:00
CGDebugInfo.h First cut at emitting debugging information for C++ member functions. 2010-01-19 01:54:44 +00:00
CGDecl.cpp Roll out ASTContext::getTypeSizeInChars(), replacing instances of 2010-01-11 17:06:35 +00:00
CGDeclCXX.cpp Fix for PR5967: Make const-marking for LLVM globals correct for cases requiring 2010-01-08 00:50:11 +00:00
CGException.cpp Fix last patch, catch of reference to non-pointer. 2010-01-01 03:20:32 +00:00
CGExpr.cpp Roll out ASTContext::getTypeSizeInChars(), replacing instances of 2010-01-11 17:06:35 +00:00
CGExprAgg.cpp When emitting member function pointers, use the canonical decl if the member function is virtual. Fixes PR5940. 2010-01-05 05:04:05 +00:00
CGExprCXX.cpp Correctly pass VTT parameters to constructors and destructors. The VTTs aren't yet used in the ctors/dtors, but that will follow. 2010-01-02 01:01:18 +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 Created __builtin___NSStringMakeConstantString() builtin, which generates constant Objective-C strings. 2010-01-23 02:40:42 +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 Fix linkage for RTTI names by re-using the logic for computing the 2010-01-06 22:00:56 +00:00
CGRecordLayoutBuilder.cpp Baby steps towards fixing PR5589. If a class needs a vtable pointer, add one. 2009-12-16 17:27:20 +00:00
CGRecordLayoutBuilder.h Baby steps towards fixing PR5589. If a class needs a vtable pointer, add one. 2009-12-16 17:27:20 +00:00
CGStmt.cpp Implement proper cleanup semantics for condition variables in for 2009-11-25 01:51:31 +00:00
CGTemporaries.cpp Fix double-destruction assertion to account for temporaries in conditionals 2009-12-24 18:16:21 +00:00
CGVTT.cpp Move the VTT related code into its own file, CGVTT.cpp 2010-01-21 16:50:45 +00:00
CGValue.h Fix documentation. 2009-11-03 16:11:57 +00:00
CGVtable.cpp Finish off fixing up debug information. 2010-01-22 18:48:47 +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 Emit human readable names for c/c++ functions. Avoid emitting linkage name if it matches regular name. 2010-01-14 00:36:21 +00:00
CodeGenFunction.h Roll out ASTContext::getTypeSizeInChars(), replacing instances of 2010-01-11 17:06:35 +00:00
CodeGenModule.cpp Created __builtin___NSStringMakeConstantString() builtin, which generates constant Objective-C strings. 2010-01-23 02:40:42 +00:00
CodeGenModule.h Created __builtin___NSStringMakeConstantString() builtin, which generates constant Objective-C strings. 2010-01-23 02:40:42 +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 update to match LLVM API change: 2009-12-15 07:26:51 +00:00
Makefile Allow customization for the producer information in the debug output. 2009-10-09 18:38:12 +00:00
Mangle.cpp fix PR5869: mangle static symbols like gcc does to make it easier to diff symbol tables 2010-01-07 09:36:51 +00:00
Mangle.h Work-in-progress: teach mangler how to mangle thunks for destructors. 2009-12-03 00:03:05 +00:00
ModuleBuilder.cpp Remove ';' after method definition. Noticed by clang++, which one would think 2009-12-19 17:50:07 +00:00
README.txt These IRgen improvements have been done. 2009-07-23 03:03:07 +00:00
TargetInfo.cpp Eliminate some Clang warnings 2010-01-22 15:41:14 +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!

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