clang-1/lib/CodeGen
Fariborz Jahanian 11062e1123 Patch removes IVars list from ObjCInterfaceDecl and
instead relies on their DeclContext for iteration, etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96638 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-19 00:31:17 +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 remove unused function & enumerations 2010-02-19 00:24:37 +00:00
CGBlocks.h remove unused function & enumerations 2010-02-19 00:24:37 +00:00
CGBuilder.h Disable generation of basic block names in NDEBUG mode. 2008-11-12 00:01:12 +00:00
CGBuiltin.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
CGCXX.cpp Revert the ctor/dtor alias optimization for now; the buildbots can detect 2010-02-18 21:31:48 +00:00
CGCXX.h Remove tabs, and whitespace cleanups. 2009-09-09 15:08:12 +00:00
CGCall.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
CGCall.h Standardize the parsing of function type attributes in a way that 2010-02-05 21:31:56 +00:00
CGClass.cpp Make deleting and complete dtor variants defer to other dtor variants by 2010-02-18 19:59:28 +00:00
CGDebugInfo.cpp Distinguish two lexical blocks at the same level. 2010-02-16 21:41:20 +00:00
CGDebugInfo.h Refactor code that generates debug info for variables that has BlocksAttr. 2010-02-10 18:49:08 +00:00
CGDecl.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
CGDeclCXX.cpp Add support for threadsafe statics, and make them the default (matching gcc). 2010-02-06 23:23:06 +00:00
CGException.cpp Switch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixes 2010-02-10 18:49:11 +00:00
CGExpr.cpp IRgen: Add CreateIRTemp, which creates a temporary alloca but with type converted "not-for-memory". Dunno a better name. 2010-02-16 19:44:13 +00:00
CGExprAgg.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
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 hopefully silence a warning on the clang-i386-darwin9 tester. 2010-02-10 21:41:43 +00:00
CGExprScalar.cpp Uniformize the names of type predicates: rather than having isFloatTy and 2010-02-15 16:14:01 +00:00
CGObjC.cpp Use getLocStart(), instead of getLocEnd(), to record starting location of objc method. :) 2010-02-15 18:08:38 +00:00
CGObjCGNU.cpp StringRefize two random methods, remove a dead variable and a weird constructor call. 2010-02-09 19:31:24 +00:00
CGObjCMac.cpp Patch removes IVars list from ObjCInterfaceDecl and 2010-02-19 00:31:17 +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 Reapply r95393, without the change to CGExpr. I was wrong in assuming that the 2010-02-08 22:53:07 +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 Attempt to fix the 32-bit test failures. 2010-02-18 18:20:49 +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 Make deleting and complete dtor variants defer to other dtor variants by 2010-02-18 19:59:28 +00:00
CodeGenFunction.h Extract out function-body code generation into its own method. No functionality 2010-02-18 03:17:58 +00:00
CodeGenModule.cpp Revert the ctor/dtor alias optimization for now; the buildbots can detect 2010-02-18 21:31:48 +00:00
CodeGenModule.h Revert the ctor/dtor alias optimization for now; the buildbots can detect 2010-02-18 21:31:48 +00:00
CodeGenTypes.cpp Uniformize the names of type predicates: rather than having isFloatTy and 2010-02-15 16:14:01 +00:00
CodeGenTypes.h Use the correct function info for constructors when applying function attributes. Fixes PR6245. 2010-02-06 02:44:09 +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 Only append 'L' for internal variable declarations, not all declarations. (Found by the mangle checker, yay) 2010-02-06 04:52:27 +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 implement EmitVAArg. pretty much the same way other targets do. 2010-02-17 02:25:52 +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!

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