clang/lib/CodeGen
Chris Lattner 2eb91e4812 emit signed integer subtractions as 'sub nsw', patch by
Anton Yartsev!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99817 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-29 17:28:16 +00:00
..
ABIInfo.h
CGBlocks.cpp add support for a 1<<29 bit in the block flags field to mark blocks using alternate struct return ABI 2010-03-05 01:29:59 +00:00
CGBlocks.h add support for a 1<<29 bit in the block flags field to mark blocks using alternate struct return ABI 2010-03-05 01:29:59 +00:00
CGBuilder.h
CGBuiltin.cpp Remove support for nand atomic builtins. They are inconsistently implemented in 2010-03-25 17:13:09 +00:00
CGCXX.cpp Remove old thunks code. 2010-03-24 00:57:54 +00:00
CGCXX.h
CGCall.cpp When mapping restrict to noalias, look for 'restrict' on the parameter variable 2010-03-27 00:47:27 +00:00
CGCall.h Use the power of types to track down another canonicalization bug in 2010-02-26 00:48:12 +00:00
CGClass.cpp Flip the switch to always get vtables from the VTT when necessary, I've verified that clang bootstraps with this. 2010-03-29 02:38:51 +00:00
CGDebugInfo.cpp Rename CGVtableInfo to CodeGenVTables in preparation of adding another VTableInfo class. 2010-03-23 04:11:45 +00:00
CGDebugInfo.h More then one anonymous aggregates on one line creates chaos when MDNode uniquness is combined with RAUW operation. Right solution is to avoid using RAUW. 2010-03-09 21:32:27 +00:00
CGDecl.cpp Change CodeGenModule to rely on the Module's symbol table instead of 2010-03-19 23:29:14 +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 Fix PR6473. 2010-03-04 18:17:24 +00:00
CGExprAgg.cpp Rename CGVtableInfo to CodeGenVTables in preparation of adding another VTableInfo class. 2010-03-23 04:11:45 +00:00
CGExprCXX.cpp Code gen for multi-dimensional dynamic allocations. 2010-03-24 16:57:01 +00:00
CGExprComplex.cpp Code gen for compound assignment of complex 2010-03-23 18:43:00 +00:00
CGExprConstant.cpp Rename CGVtableInfo to CodeGenVTables in preparation of adding another VTableInfo class. 2010-03-23 04:11:45 +00:00
CGExprScalar.cpp emit signed integer subtractions as 'sub nsw', patch by 2010-03-29 17:28:16 +00:00
CGObjC.cpp Fix a code gen. bug involving generation of getter method 2010-03-25 21:56:43 +00:00
CGObjCGNU.cpp Fixed synthesizing properties declared in properties (GNU runtime). 2010-03-20 19:53:29 +00:00
CGObjCMac.cpp Use the power of types to track down another canonicalization bug in 2010-02-26 00:48:12 +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 When given the magic class __cxxabiv1::__fundamental_type_info, produce 2010-03-27 02:52:14 +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 When returning from a function that has a reference return type, use 2010-03-24 23:14:04 +00:00
CGTemporaries.cpp Fix double-destruction assertion to account for temporaries in conditionals 2009-12-24 18:16:21 +00:00
CGVTT.cpp Use the newly added function in the VTT builder. 2010-03-29 02:14:35 +00:00
CGValue.h Fix documentation. 2009-11-03 16:11:57 +00:00
CGVtable.cpp Another vtable layout fix, making us match gcc better. 2010-03-29 15:08:41 +00:00
CGVtable.h More vtable work - it's not possible to use the new vtable code for everything by setting a flag inside CGVtable.cpp. My plan is to run some tests and bootstrap and once that's done flip the bit. 2010-03-29 03:38:52 +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 Rename CGVtableInfo to CodeGenVTables in preparation of adding another VTableInfo class. 2010-03-23 04:11:45 +00:00
CodeGenFunction.h Reapply r99775 with a fix for a silly bug - we were setting the vtable pointer for all bases, even those without a vtable pointer :) 2010-03-28 21:07:49 +00:00
CodeGenModule.cpp When given the magic class __cxxabiv1::__fundamental_type_info, produce 2010-03-27 02:52:14 +00:00
CodeGenModule.h When given the magic class __cxxabiv1::__fundamental_type_info, produce 2010-03-27 02:52:14 +00:00
CodeGenTypes.cpp Split out types that are non-canonical unless dependent as their own 2010-03-01 23:49:17 +00:00
CodeGenTypes.h Use the power of types to track down another canonicalization bug in 2010-02-26 00:48:12 +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 Implement new mangling for vectors. 2010-03-26 07:18:04 +00:00
Mangle.h Change two class forward declarations to struct forward declarations, silencing a Clang warning 2010-03-24 16:59:08 +00:00
ModuleBuilder.cpp Revert changes r97693, r97700, and r97718. 2010-03-04 04:29:44 +00:00
README.txt
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!

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