llvm-project/clang/lib/CodeGen
Anders Carlsson 9523ad4fd3 Simplify EmitClassMemberwiseCopy now that it's only used for fields.
llvm-svn: 102281
2010-04-24 22:36:50 +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 Keep track of the actual storage specifier written on a variable or 2010-04-19 22:54:31 +00:00
CGBlocks.h Miscellaneous codegen cleanups. Mostly, don't create new basic blocks 2010-04-21 10:05:39 +00:00
CGBuilder.h Disable generation of basic block names in NDEBUG mode. 2008-11-12 00:01:12 +00:00
CGBuiltin.cpp Rewrite handling of 64-bit palignr intrinsics to be vector shuffles. 2010-04-15 01:43:08 +00:00
CGCXX.cpp Vtable -> VTable renames across the board. 2010-04-17 20:15:18 +00:00
CGCXX.h Remove tabs, and whitespace cleanups. 2009-09-09 15:08:12 +00:00
CGCall.cpp don't slap noalias attribute on stret result arguments. 2010-04-20 05:44:43 +00:00
CGCall.h Remember the regparm attribute in FunctionType::ExtInfo. 2010-03-30 22:15:11 +00:00
CGClass.cpp Simplify EmitClassMemberwiseCopy now that it's only used for fields. 2010-04-24 22:36:50 +00:00
CGDebugInfo.cpp Fix pasto, add a comment. 2010-04-24 20:26:20 +00:00
CGDebugInfo.h Fix pasto, add a comment. 2010-04-24 20:26:20 +00:00
CGDecl.cpp I hate default statements. Fixes PR6874. 2010-04-23 02:02:43 +00:00
CGDeclCXX.cpp C++: Add support for -fno-use-cxa-atexit. 2010-03-20 04:15:41 +00:00
CGException.cpp Call PerformCopyInitialization to properly initialize the exception temporary 2010-04-22 01:10:34 +00:00
CGExpr.cpp Change CodeGenFunction::GetAddressOfDerivedClass to take a BasePath. 2010-04-24 21:23:59 +00:00
CGExprAgg.cpp Get rid of the old GetNonVirtualBaseClassOffset and change all call sites to use the new version. 2010-04-24 21:27:51 +00:00
CGExprCXX.cpp Vtable -> VTable renames across the board. 2010-04-17 20:15:18 +00:00
CGExprComplex.cpp Code gen for compound assignment of complex 2010-03-23 18:43:00 +00:00
CGExprConstant.cpp Get rid of the old GetNonVirtualBaseClassOffset and change all call sites to use the new version. 2010-04-24 21:27:51 +00:00
CGExprScalar.cpp Get rid of the old GetNonVirtualBaseClassOffset and change all call sites to use the new version. 2010-04-24 21:27:51 +00:00
CGObjC.cpp CastExpr should not hold a pointer to the base path. More cleanup. 2010-04-24 16:57:13 +00:00
CGObjCGNU.cpp Improve the AST representation of Objective-C @try/@catch/@finally 2010-04-23 22:50:49 +00:00
CGObjCMac.cpp NeXT: Clean up dispatch method policy selection. 2010-04-24 17:56:46 +00:00
CGObjCRuntime.h Add some API code for future work. 2010-04-12 18:18:10 +00:00
CGRTTI.cpp Vtable -> VTable renames across the board. 2010-04-17 20:15:18 +00:00
CGRecordLayout.h IRgen: Change CGBitFieldInfo to take the AccessInfo as constructor arguments, it is now an immutable object. 2010-04-15 05:09:32 +00:00
CGRecordLayoutBuilder.cpp IRgen: Fix another case where we generated an invalid access component when we 2010-04-22 15:22:33 +00:00
CGStmt.cpp Fix a place in inline asm lowering which was creating a TruncInst with a 2010-04-24 04:55:02 +00:00
CGTemporaries.cpp Call PerformCopyInitialization to properly initialize the exception temporary 2010-04-22 01:10:34 +00:00
CGVTT.cpp Clarify an assertion. 2010-04-11 20:23:06 +00:00
CGVTables.cpp Vtable -> VTable renames across the board. 2010-04-17 20:15:18 +00:00
CGVTables.h If a method is virtual and the class key function is in another file, emit the method as available_externally. 2010-04-19 00:44:22 +00:00
CGValue.h IRgen: Move the bit-field access type into CGBitFieldInfo, and change bit-field LValues to just store the base address of object containing the bit-field. 2010-04-08 02:59:45 +00:00
CMakeLists.txt Rename CGVtable files to CGVTables. 2010-04-08 16:30:25 +00:00
CodeGenFunction.cpp Fix debug info for cleanup block. 2010-04-13 00:08:43 +00:00
CodeGenFunction.h Simplify EmitClassMemberwiseCopy now that it's only used for fields. 2010-04-24 22:36:50 +00:00
CodeGenModule.cpp More -fno-constant-cfstrings API work. 2010-04-23 22:33:39 +00:00
CodeGenModule.h Get rid of the old GetNonVirtualBaseClassOffset and change all call sites to use the new version. 2010-04-24 21:27:51 +00:00
CodeGenTypes.cpp IRGen: Move the auxiliary data structures tracking AST -> LLVM mappings out of CodeGenTypes, to per-record CGRecordLayout structures. 2010-03-31 01:09:11 +00:00
CodeGenTypes.h Vtable -> VTable renames across the board. 2010-04-17 20:15:18 +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 Allow users to set CPPFLAGS and CXXFLAGS on the make command line. 2010-03-12 22:55:16 +00:00
Mangle.cpp Emit a lame diagnostic when we can't mangle operator names 2010-04-23 03:19:53 +00:00
Mangle.h Vtable -> VTable renames across the board. 2010-04-17 20:15:18 +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 ABI/x86-32 & x86-64: Alignment on 'byval' must be set when when the alignment 2010-04-21 19:49:55 +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!

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