llvm-project/clang/lib/CodeGen
Anders Carlsson c778540f9a Add a ThunkAdjustment struct which holds a non-virtual and a virtual adjustment offset. Start using it. General cleanup in Mangle.cpp.
llvm-svn: 89925
2009-11-26 02:32:05 +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 Centralize and complete the computation of value- and type-dependence for DeclRefExprs 2009-11-23 11:41:28 +00:00
CGBlocks.h Added block type introspection support. 2009-11-17 19:33:30 +00:00
CGBuilder.h Disable generation of basic block names in NDEBUG mode. 2008-11-12 00:01:12 +00:00
CGBuiltin.cpp Pass a value for the isSigned parameter of CreateIntCast, rather than 2009-11-16 13:11:21 +00:00
CGCXX.cpp Add a ThunkAdjustment struct which holds a non-virtual and a virtual adjustment offset. Start using it. General cleanup in Mangle.cpp. 2009-11-26 02:32:05 +00:00
CGCXX.h Remove tabs, and whitespace cleanups. 2009-09-09 15:08:12 +00:00
CGCall.cpp Add VTT parameter to base ctors/dtors with virtual bases. (They aren't used yet). 2009-11-25 03:15:49 +00:00
CGCall.h Change CodeGenModule::ConstructTypeAttributes to return the calling convention 2009-09-12 00:59:20 +00:00
CGClass.cpp Get rid of the ugly CGCXX names and replace them with CGClass, CGExprCXX and CGTemporaries. 2009-11-24 05:51:11 +00:00
CGDebugInfo.cpp Use StringRef (again) in DebugInfo interface. 2009-11-25 17:37:31 +00:00
CGDebugInfo.h Do not store DIDescriptor directly into a container. Store MDNode directly, through TrackingVH. 2009-11-13 19:10:24 +00:00
CGDecl.cpp Rename CleanupScope -> DelayedCleanupBlock. No functionality change. 2009-11-24 16:21:10 +00:00
CGException.cpp Checkpoint current work. WIP. 2009-11-20 23:44:51 +00:00
CGExpr.cpp Eliminate CXXConditionDeclExpr with extreme prejudice. 2009-11-25 00:27:52 +00:00
CGExprAgg.cpp Fix lifetime of conditional temporaries. Patch by Victor Zverovich! 2009-11-20 17:27:56 +00:00
CGExprCXX.cpp Handle cases where we're constructing an array of objects and the constructor has default arguments. 2009-11-24 18:43:52 +00:00
CGExprComplex.cpp Change all the Type::getAsFoo() methods to specializations of Type::getAs(). 2009-09-21 23:43:11 +00:00
CGExprConstant.cpp Support emitting aggregate class initializers. Fixes PR5581. 2009-11-21 23:56:04 +00:00
CGExprScalar.cpp We always need to emit the base expression of a member expression, even when the member decl refers to an enum. Thanks to Eli for pointing this out! 2009-11-24 16:57:33 +00:00
CGObjC.cpp Fix crash when synthesizing property setters when the property type and ivar 2009-10-27 19:21:30 +00:00
CGObjCGNU.cpp Fixed crash when using undefined protocols (GNU runtime). 2009-11-20 14:50:59 +00:00
CGObjCMac.cpp This patch finalizes implementatin of weak_import 2009-11-17 22:42:00 +00:00
CGObjCRuntime.h Patch fixes a code gen. bug in generation of objc_assign_ivar 2009-09-24 22:25:38 +00:00
CGRecordLayoutBuilder.cpp Fixup key function calculations. 2009-11-20 00:02:19 +00:00
CGRecordLayoutBuilder.h Update location of DataTypes.h to reflect move in LLVM with r85086. 2009-10-26 01:37:10 +00:00
CGRtti.cpp IRgen: Switch the C++ mangler interfaces to take the SmallVector to write into, 2009-11-21 09:06:22 +00:00
CGStmt.cpp Implement proper cleanup semantics for condition variables in for 2009-11-25 01:51:31 +00:00
CGTemporaries.cpp Get rid of the ugly CGCXX names and replace them with CGClass, CGExprCXX and CGTemporaries. 2009-11-24 05:51:11 +00:00
CGValue.h Fix documentation. 2009-11-03 16:11:57 +00:00
CGVtable.cpp Add a ThunkAdjustment struct which holds a non-virtual and a virtual adjustment offset. Start using it. General cleanup in Mangle.cpp. 2009-11-26 02:32:05 +00:00
CGVtable.h Add a ThunkAdjustment struct which holds a non-virtual and a virtual adjustment offset. Start using it. General cleanup in Mangle.cpp. 2009-11-26 02:32:05 +00:00
CMakeLists.txt Get rid of the ugly CGCXX names and replace them with CGClass, CGExprCXX and CGTemporaries. 2009-11-24 05:51:11 +00:00
CodeGenFunction.cpp Add VTT parameter to base ctors/dtors with virtual bases. (They aren't used yet). 2009-11-25 03:15:49 +00:00
CodeGenFunction.h Add a ThunkAdjustment struct which holds a non-virtual and a virtual adjustment offset. Start using it. General cleanup in Mangle.cpp. 2009-11-26 02:32:05 +00:00
CodeGenModule.cpp Ignore constructor member templates in CodeGenModule::EmitTopLevelDecl. 2009-11-24 05:16:24 +00:00
CodeGenModule.h Add a ThunkAdjustment struct which holds a non-virtual and a virtual adjustment offset. Start using it. General cleanup in Mangle.cpp. 2009-11-26 02:32:05 +00:00
CodeGenTypes.cpp This patch implements objective-c's 'SEL' type as a built-in 2009-11-21 19:53:08 +00:00
CodeGenTypes.h Add VTT parameter to base ctors/dtors with virtual bases. (They aren't used yet). 2009-11-25 03:15:49 +00:00
GlobalDecl.h Move GlobalDecl to its own file. Also add DenseMapInfo traits. 2009-11-13 04:25:07 +00:00
Makefile Allow customization for the producer information in the debug output. 2009-10-09 18:38:12 +00:00
Mangle.cpp Add a ThunkAdjustment struct which holds a non-virtual and a virtual adjustment offset. Start using it. General cleanup in Mangle.cpp. 2009-11-26 02:32:05 +00:00
Mangle.h Add a ThunkAdjustment struct which holds a non-virtual and a virtual adjustment offset. Start using it. General cleanup in Mangle.cpp. 2009-11-26 02:32:05 +00:00
ModuleBuilder.cpp Move CompileOptions -> CodeGenOptions, and sink it into the CodeGen library. 2009-11-12 17:24:48 +00:00
README.txt These IRgen improvements have been done. 2009-07-23 03:03:07 +00:00
TargetABIInfo.cpp x86_64, PR5582: Layout bases for C++ records. 2009-11-22 23:01:23 +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!

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