hanchenye-llvm-project/clang/lib/CodeGen
Eli Friedman 6257e08a3d Get rid of more dead code.
llvm-svn: 92439
2010-01-03 01:11:47 +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 Pass the return value slot to all call exprs. 2009-12-24 21:13:40 +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 Promote arguments of frameaddr / returnaddr builtins to i32 type, when needed. 2009-12-27 14:27:22 +00:00
CGCXX.cpp Move a few more functions away from CGCXX and to CGClass and CGExprCXX. 2010-01-01 20:29:01 +00:00
CGCXX.h Remove tabs, and whitespace cleanups. 2009-09-09 15:08:12 +00:00
CGCall.cpp Fill in the return value slot in CGExprAgg::VisitCallExpr. This takes us halfway towards fixing PR5824. 2009-12-24 20:40:36 +00:00
CGCall.h Fill in the return value slot in CGExprAgg::VisitCallExpr. This takes us halfway towards fixing PR5824. 2009-12-24 20:40:36 +00:00
CGClass.cpp Move address points to CGVtableInfo, no functionality change. 2010-01-02 18:02:32 +00:00
CGDebugInfo.cpp Get rid of FixedWidthIntType, as suggested by Chris and Eli. 2009-12-29 07:07:36 +00:00
CGDebugInfo.h Use StringRef in CGDebugInfo::EmitFunctionStart. 2009-12-08 14:04:35 +00:00
CGDecl.cpp Pass ReturnValueSlot to EmitCall. No functionality change yet. 2009-12-24 19:25:24 +00:00
CGDeclCXX.cpp Actually store the pointer into the global variable, spotted by Eli. 2009-12-10 01:58:33 +00:00
CGException.cpp Fix last patch, catch of reference to non-pointer. 2010-01-01 03:20:32 +00:00
CGExpr.cpp Minor optimization; emit proper unsupported messages for a couple of cases. 2009-12-25 06:17:05 +00:00
CGExprAgg.cpp Delete impossible case. 2010-01-02 23:28:56 +00:00
CGExprCXX.cpp Correctly pass VTT parameters to constructors and destructors. The VTTs aren't yet used in the ctors/dtors, but that will follow. 2010-01-02 01:01:18 +00:00
CGExprComplex.cpp Minor optimization; emit proper unsupported messages for a couple of cases. 2009-12-25 06:17:05 +00:00
CGExprConstant.cpp Get rid of some unnecessary code. 2010-01-02 23:43:59 +00:00
CGExprScalar.cpp Get rid of more dead code. 2010-01-03 01:11:47 +00:00
CGObjC.cpp Pass ReturnValueSlot to EmitCall. No functionality change yet. 2009-12-24 19:25:24 +00:00
CGObjCGNU.cpp Pass ReturnValueSlot to EmitCall. No functionality change yet. 2009-12-24 19:25:24 +00:00
CGObjCMac.cpp Remove some dead variables clang-analyzer found. 2009-12-25 15:43:36 +00:00
CGObjCRuntime.h Patch fixes a code gen. bug in generation of objc_assign_ivar 2009-09-24 22:25:38 +00:00
CGRTTI.cpp Speculative MSVC fix. 2010-01-02 18:46:23 +00:00
CGRecordLayoutBuilder.cpp Baby steps towards fixing PR5589. If a class needs a vtable pointer, add one. 2009-12-16 17:27:20 +00:00
CGRecordLayoutBuilder.h Baby steps towards fixing PR5589. If a class needs a vtable pointer, add one. 2009-12-16 17:27:20 +00:00
CGStmt.cpp Implement proper cleanup semantics for condition variables in for 2009-11-25 01:51:31 +00:00
CGTemporaries.cpp Fix double-destruction assertion to account for temporaries in conditionals 2009-12-24 18:16:21 +00:00
CGValue.h Fix documentation. 2009-11-03 16:11:57 +00:00
CGVtable.cpp Move address points to CGVtableInfo, no functionality change. 2010-01-02 18:02:32 +00:00
CGVtable.h Move address points to CGVtableInfo, no functionality change. 2010-01-02 18:02:32 +00:00
CMakeLists.txt Add CGDeclCXX.cpp and move EmitCXXGlobalVarDeclInit there. 2009-12-10 00:16:00 +00:00
CodeGenFunction.cpp Correctly pass VTT parameters to constructors and destructors. The VTTs aren't yet used in the ctors/dtors, but that will follow. 2010-01-02 01:01:18 +00:00
CodeGenFunction.h Get rid of more dead code. 2010-01-03 01:11:47 +00:00
CodeGenModule.cpp strength reduce this call away. 2009-12-29 07:49:13 +00:00
CodeGenModule.h Move address points to CGVtableInfo, no functionality change. 2010-01-02 18:02:32 +00:00
CodeGenTypes.cpp Get rid of FixedWidthIntType, as suggested by Chris and Eli. 2009-12-29 07:07:36 +00:00
CodeGenTypes.h Have ASTRecordLayout keep track of the key function, in preparation of fixing a synthetic ctor/dtor bug. 2009-11-30 23:41:22 +00:00
GlobalDecl.h update to match LLVM API change: 2009-12-15 07:26:51 +00:00
Makefile Allow customization for the producer information in the debug output. 2009-10-09 18:38:12 +00:00
Mangle.cpp Get rid of FixedWidthIntType, as suggested by Chris and Eli. 2009-12-29 07:07:36 +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
TargetABIInfo.cpp x86_64: Structures with no fields but which have padding should be classified as 2009-12-22 01:19:25 +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!

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