hanchenye-llvm-project/clang/lib/CodeGen
Daniel Dunbar b76c4cd5ec Add a FIXME and reduce nesting.
llvm-svn: 100432
2010-04-05 16:20:33 +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 Minor include pruning. 2010-03-31 15:04:05 +00:00
CGBlocks.h Minor include pruning. 2010-03-31 15:04:05 +00:00
CGBuilder.h
CGBuiltin.cpp Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset. 2010-04-04 03:10:52 +00:00
CGCXX.cpp Remove the old vtable layout code. 2010-03-30 03:43:47 +00:00
CGCXX.h Remove tabs, and whitespace cleanups. 2009-09-09 15:08:12 +00:00
CGCall.cpp Remember the regparm attribute in FunctionType::ExtInfo. 2010-03-30 22:15:11 +00:00
CGCall.h Remember the regparm attribute in FunctionType::ExtInfo. 2010-03-30 22:15:11 +00:00
CGClass.cpp the big refactoring bits of PR3782. 2010-03-30 20:24:48 +00:00
CGDebugInfo.cpp NewDebugLoc got renamed to DebugLoc. 2010-04-02 20:21:43 +00:00
CGDebugInfo.h Minor include pruning. 2010-03-31 15:04:05 +00:00
CGDecl.cpp Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset. 2010-04-04 03:10:52 +00:00
CGDeclCXX.cpp C++: Add support for -fno-use-cxa-atexit. 2010-03-20 04:15:41 +00:00
CGException.cpp Replace some SmallVectors with arrays. 2010-03-18 16:59:57 +00:00
CGExpr.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
CGExprAgg.cpp Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset. 2010-04-04 03:10:52 +00:00
CGExprCXX.cpp Rework our handling of copy construction of temporaries, which was a 2010-04-02 18:24:57 +00:00
CGExprComplex.cpp Code gen for compound assignment of complex 2010-03-23 18:43:00 +00:00
CGExprConstant.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
CGExprScalar.cpp Introduce a new kind of derived-to-base cast which bypasses the need for 2010-03-30 23:58:03 +00:00
CGObjC.cpp the big refactoring bits of PR3782. 2010-03-30 20:24:48 +00:00
CGObjCGNU.cpp the big refactoring bits of PR3782. 2010-03-30 20:24:48 +00:00
CGObjCMac.cpp Add a FIXME and reduce nesting. 2010-04-05 16:20:33 +00:00
CGObjCRuntime.h Minor include pruning. 2010-03-31 15:04:05 +00:00
CGRTTI.cpp Drastically simplify the computation of linkage for typeinfo by using 2010-03-31 00:15:35 +00:00
CGRecordLayout.h 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
CGRecordLayoutBuilder.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
CGStmt.cpp When returning from a function that has a reference return type, use 2010-03-24 23:14:04 +00:00
CGTemporaries.cpp Introduce a CXXTemporariesCleanupScope RAII object and use it to cleanup the temporaries code. 2010-03-30 03:14:41 +00:00
CGVTT.cpp Remove the old vtable layout code. 2010-03-30 03:43:47 +00:00
CGValue.h Fix documentation. 2009-11-03 16:11:57 +00:00
CGVtable.cpp Don't produce a vtable for a class if we have an explicit template instantiation declaration and no key function. We will produce the vtable at the explicit template instantiation. 2010-04-03 04:26:42 +00:00
CGVtable.h Minor include pruning. 2010-03-31 15:04:05 +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 Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset. 2010-04-04 03:10:52 +00:00
CodeGenFunction.h Minor include pruning. 2010-03-31 15:04:05 +00:00
CodeGenModule.cpp Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset. 2010-04-04 03:10:52 +00:00
CodeGenModule.h Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset. 2010-04-04 03:10:52 +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 Minor include pruning. 2010-03-31 15:04:05 +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 Extend DependentNameType with a keyword enum that specifies whether 2010-03-31 20:19:30 +00:00
Mangle.h Remove the old vtable layout code. 2010-03-30 03:43:47 +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 fix PR6433, crash on va_arg of typedef. 2010-03-11 18:19: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!

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