llvm-project/clang/lib/CodeGen
Bill Wendling 9987c0ea42 We shouldn't keep track of MMX registers "needed" separately from the SSE
registers needed.

llvm-svn: 116772
2010-10-18 23:51:38 +00:00
..
ABIInfo.h IRgen/ABI: Add support for realigning structures which are passed by indirect 2010-09-16 20:42:02 +00:00
BackendUtil.cpp IRgen: Change CodeGenPasses to be a PassManager, so it can have CallGraphSCC or 2010-09-17 07:35:16 +00:00
CGBlocks.cpp Eliminate usage of ObjCSuperExpr used for 2010-10-14 16:04:05 +00:00
CGBlocks.h IRgen: Move blocks runtime interfaces to CodeGenModule. 2010-07-16 00:00:15 +00:00
CGBuilder.h Make CGBuilderTy a typedef again; its functionality has been rolled back 2010-07-06 18:43:48 +00:00
CGBuiltin.cpp Implement __builtin_ia32_vec_ext_v2si function (required by Qt). 2010-10-10 03:19:11 +00:00
CGCXX.cpp Fix filename in header comment. 2010-10-04 21:15:33 +00:00
CGCXX.h Remove tabs, and whitespace cleanups. 2009-09-09 15:08:12 +00:00
CGCXXABI.h Implement ARM static local initialization guards, which are more compact than 2010-09-08 01:44:27 +00:00
CGCall.cpp IRgen/ABI: Add support for realigning structures which are passed by indirect 2010-09-16 20:42:02 +00:00
CGCall.h relax the CGFunctionInfo::CGFunctionInfo ctor to allow any sequence 2010-06-29 18:13:52 +00:00
CGClass.cpp Death to blocks, or at least the word "block" in one particular obnoxiously 2010-10-15 04:57:14 +00:00
CGDebugInfo.cpp patch fixes class names missing from method names in debug information for 2010-10-18 17:51:06 +00:00
CGDebugInfo.h Fix debug info for anon union. 2010-10-12 23:24:54 +00:00
CGDecl.cpp Death to blocks, or at least the word "block" in one particular obnoxiously 2010-10-15 04:57:14 +00:00
CGDeclCXX.cpp one piece of code is responsible for the lifetime of every aggregate 2010-09-15 10:14:12 +00:00
CGException.cpp Death to blocks, or at least the word "block" in one particular obnoxiously 2010-10-15 04:57:14 +00:00
CGException.h Opportunistically use the C++ personality function in ObjC++ 2010-09-16 06:16:50 +00:00
CGExpr.cpp Death to blocks, or at least the word "block" in one particular obnoxiously 2010-10-15 04:57:14 +00:00
CGExprAgg.cpp Revert the hack Chris Lattner added in r97981 to work around 2010-10-08 20:56:19 +00:00
CGExprCXX.cpp Introduce -flimit-debug-info. 2010-09-30 19:05:55 +00:00
CGExprComplex.cpp Implements in IRgen gnu extensions missing LHS for 2010-09-20 23:50:22 +00:00
CGExprConstant.cpp Death to blocks, or at least the word "block" in one particular obnoxiously 2010-10-15 04:57:14 +00:00
CGExprScalar.cpp Permit constant evaluation of const floating-point variables with 2010-10-09 01:34:31 +00:00
CGObjC.cpp Eliminate usage of ObjCSuperExpr used for 2010-10-14 16:04:05 +00:00
CGObjCGNU.cpp Death to blocks, or at least the word "block" in one particular obnoxiously 2010-10-15 04:57:14 +00:00
CGObjCMac.cpp Coding by inspection has its problems. 2010-10-16 16:34:08 +00:00
CGObjCRuntime.h Fixes an obscure bug in importd block variable layout 2010-09-11 01:27:29 +00:00
CGRTTI.cpp Make sure the VTables for template instantiations are emitted even if the key function doesn't have a body. 2010-10-11 03:25:57 +00:00
CGRecordLayout.h IRgen: Move CGBitFieldInfo strategy computation helpers to static member 2010-09-02 23:53:28 +00:00
CGRecordLayoutBuilder.cpp IRgen: Move CGBitFieldInfo strategy computation helpers to static member 2010-09-02 23:53:28 +00:00
CGStmt.cpp Death to blocks, or at least the word "block" in one particular obnoxiously 2010-10-15 04:57:14 +00:00
CGTemporaries.cpp one piece of code is responsible for the lifetime of every aggregate 2010-09-15 10:14:12 +00:00
CGVTT.cpp Teach IR generation to return 'this' from constructors and destructors 2010-08-31 07:33:07 +00:00
CGVTables.cpp Make sure the VTables for template instantiations are emitted even if the key function doesn't have a body. 2010-10-11 03:25:57 +00:00
CGVTables.h Make sure the VTables for template instantiations are emitted even if the key function doesn't have a body. 2010-10-11 03:25:57 +00:00
CGValue.h Experimental TBAA support. 2010-10-14 23:06:10 +00:00
CMakeLists.txt Update CMake. 2010-10-15 00:39:31 +00:00
CodeGenAction.cpp Break Frontend's dependency on Rewrite, Checker and CodeGen in shared library configuration 2010-06-15 17:48:49 +00:00
CodeGenFunction.cpp Permit constant evaluation of const floating-point variables with 2010-10-09 01:34:31 +00:00
CodeGenFunction.h Death to blocks, or at least the word "block" in one particular obnoxiously 2010-10-15 04:57:14 +00:00
CodeGenModule.cpp Experimental TBAA support for enum types. 2010-10-15 20:23:12 +00:00
CodeGenModule.h Experimental TBAA support. 2010-10-14 23:06:10 +00:00
CodeGenTBAA.cpp Mention the paragraphs in the standards which sanction TBAA. 2010-10-15 20:54:41 +00:00
CodeGenTBAA.h Experimental TBAA support for enum types. 2010-10-15 20:23:12 +00:00
CodeGenTypes.cpp Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked a 2010-10-08 23:50:27 +00:00
CodeGenTypes.h Teach IR generation to return 'this' from constructors and destructors 2010-08-31 07:33:07 +00:00
GlobalDecl.h Add GlobalDecl::getCanonicalDecl. 2010-06-22 16:00:14 +00:00
ItaniumCXXABI.cpp Implement ARM static local initialization guards, which are more compact than 2010-09-08 01:44:27 +00:00
Makefile BUILD_ARCHIVE is the default for libraries, no need to set it. 2010-07-18 00:14:47 +00:00
Mangle.cpp Fix some bugs in local class mangling brought up in PR8355. 2010-10-18 21:28:44 +00:00
Mangle.h Implement ARM static local initialization guards, which are more compact than 2010-09-08 01:44:27 +00:00
MicrosoftCXXABI.cpp Implement ARM static local initialization guards, which are more compact than 2010-09-08 01:44:27 +00:00
ModuleBuilder.cpp Move CodeGenOptions.h *back* into Frontend. This should have been done when the 2010-06-15 23:19:56 +00:00
README.txt These IRgen improvements have been done. 2009-07-23 03:03:07 +00:00
TargetInfo.cpp We shouldn't keep track of MMX registers "needed" separately from the SSE 2010-10-18 23:51:38 +00:00
TargetInfo.h Fix the IR generation for catching pointers by references. 2010-07-20 22:17:55 +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!

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