llvm-project/clang/lib/CodeGen
Anders Carlsson e4424888e4 When possible, use the vbase offset offsets from the most derived class directly.
llvm-svn: 98247
2010-03-11 07:00:45 +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 add support for a 1<<29 bit in the block flags field to mark blocks using alternate struct return ABI 2010-03-05 01:29:59 +00:00
CGBlocks.h add support for a 1<<29 bit in the block flags field to mark blocks using alternate struct return ABI 2010-03-05 01:29:59 +00:00
CGBuilder.h Disable generation of basic block names in NDEBUG mode. 2008-11-12 00:01:12 +00:00
CGBuiltin.cpp PR6515: Implement __builtin_signbit and friends. 2010-03-06 02:17:52 +00:00
CGCXX.cpp Use static method in GlobalValue 2010-03-06 07:35:18 +00:00
CGCXX.h Remove tabs, and whitespace cleanups. 2009-09-09 15:08:12 +00:00
CGCall.cpp Use the power of types to track down another canonicalization bug in 2010-02-26 00:48:12 +00:00
CGCall.h Use the power of types to track down another canonicalization bug in 2010-02-26 00:48:12 +00:00
CGClass.cpp Perform two more constructor/destructor code-size optimizations: 2010-02-23 00:48:20 +00:00
CGDebugInfo.cpp Create a new InjectedClassNameType to represent bare-word references to the 2010-03-10 03:28:59 +00:00
CGDebugInfo.h More then one anonymous aggregates on one line creates chaos when MDNode uniquness is combined with RAUW operation. Right solution is to avoid using RAUW. 2010-03-09 21:32:27 +00:00
CGDecl.cpp set alignment on static locals properly, patch by Arnaud de Grandmaison! 2010-03-10 23:59:59 +00:00
CGDeclCXX.cpp Add support for threadsafe statics, and make them the default (matching gcc). 2010-02-06 23:23:06 +00:00
CGException.cpp More refactoring around constructor/destructor code generation. 2010-02-19 09:25:03 +00:00
CGExpr.cpp Fix PR6473. 2010-03-04 18:17:24 +00:00
CGExprAgg.cpp add a codegen hack to work around an AST bug, allowing us to compile the 2010-03-08 21:08:07 +00:00
CGExprCXX.cpp IRgen: Add CreateMemTemp, for creating an temporary memory object for a particular type, and flood fill. - CreateMemTemp sets the alignment on the alloca correctly, which fixes a great many places in IRgen where we were doing the wrong thing. 2010-02-09 02:48:28 +00:00
CGExprComplex.cpp Uniformize the names of type predicates: rather than having isFloatTy and 2010-02-15 16:14:01 +00:00
CGExprConstant.cpp really fix 6473 by handling weakref in constant expressions. 2010-03-04 21:26:03 +00:00
CGExprScalar.cpp Fix code gen bug generating code for 2010-03-03 22:09:47 +00:00
CGObjC.cpp Extend ObjCMessageExpr for class method sends with the source location 2010-03-08 16:40:19 +00:00
CGObjCGNU.cpp Don't generate method metadata for @dynamic properties. Fixes PR6354. 2010-02-26 01:11:38 +00:00
CGObjCMac.cpp Use the power of types to track down another canonicalization bug in 2010-02-26 00:48:12 +00:00
CGObjCRuntime.h Revert "Numerous changes to selector handling:", this breaks a whole bunch of 2010-02-03 20:11:42 +00:00
CGRTTI.cpp Extract a common structure for holding information about the definition 2010-02-04 22:26:26 +00:00
CGRecordLayoutBuilder.cpp Improve handling of emitting 'null' pointers to data members. 2010-02-02 05:17:25 +00:00
CGRecordLayoutBuilder.h Improve handling of emitting 'null' pointers to data members. 2010-02-02 05:17:25 +00:00
CGStmt.cpp fix PR6475, we were doing side-effecting stuff in an assert. 2010-03-03 21:52:23 +00:00
CGTemporaries.cpp Fix double-destruction assertion to account for temporaries in conditionals 2009-12-24 18:16:21 +00:00
CGVTT.cpp Pass information about whether a base is virtual or not down to getCtorVtable, we need this information in the vtable builder. 2010-02-28 00:36:23 +00:00
CGValue.h Fix documentation. 2009-11-03 16:11:57 +00:00
CGVtable.cpp When possible, use the vbase offset offsets from the most derived class directly. 2010-03-11 07:00:45 +00:00
CGVtable.h Delay codegen of vtables when handling implicit instantiations. 2010-03-10 02:19:29 +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 Eliminate the default arguments to ASTContext::getFunctionType(), 2010-02-21 22:15:06 +00:00
CodeGenFunction.h add framework for ARM builtins, Patch by Edmund Grimley Evans! 2010-03-03 19:03:45 +00:00
CodeGenModule.cpp Delay codegen of vtables when handling implicit instantiations. 2010-03-10 02:19:29 +00:00
CodeGenModule.h Delay codegen of vtables when handling implicit instantiations. 2010-03-10 02:19:29 +00:00
CodeGenTypes.cpp Split out types that are non-canonical unless dependent as their own 2010-03-01 23:49:17 +00:00
CodeGenTypes.h Use the power of types to track down another canonicalization bug in 2010-02-26 00:48:12 +00:00
GlobalDecl.h Use the correct function info for constructors when applying function attributes. Fixes PR6245. 2010-02-06 02:44:09 +00:00
Makefile -fno-rtti is now the default. 2010-01-24 20:43:31 +00:00
Mangle.cpp Don't turn off mangling in implicitly extern "C" system headers. GCC 2010-03-07 05:10:40 +00:00
Mangle.h Refactor local class name mangling and make it 2010-03-04 01:02:03 +00:00
ModuleBuilder.cpp Revert changes r97693, r97700, and r97718. 2010-03-04 04:29:44 +00:00
README.txt These IRgen improvements have been done. 2009-07-23 03:03:07 +00:00
TargetInfo.cpp Support PPC-32 DWARF EH intrinisics. Thanks to rdivacky for his assistance. 2010-03-11 00:10:12 +00:00
TargetInfo.h Implement __builtin_dwarf_sp_column for i386 (Darwin and not), x86-64 (all), 2010-03-06 00:35: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!

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