hanchenye-llvm-project/clang/lib/CodeGen
Fariborz Jahanian 5e575c03b8 Removes a FIXME.
llvm-svn: 101161
2010-04-13 18:43:37 +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 Disable generation of basic block names in NDEBUG mode. 2008-11-12 00:01:12 +00:00
CGBuiltin.cpp @llvm.sqrt isn't really close enough to C's sqrt to justify emitting calls 2010-04-07 08:20:20 +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 Have the CXXBaseOrMemberInitializer keep track of whether an initializer initializes a virtual base or not. 2010-04-12 00:51:03 +00:00
CGDebugInfo.cpp Emit debug info for objc getters and setters. 2010-04-05 21:09:15 +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 fix PR6805: llvm.objectsize changed to take an i1 instead of an i32. 2010-04-10 18:34:14 +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 Rework the ConstStructBuilder code to emit missing initializer 2010-04-13 18:16:19 +00:00
CGExprScalar.cpp IRgen: Move BitField LValues to just hold a reference to the CGBitFieldInfo. 2010-04-05 21:36:35 +00:00
CGObjC.cpp Removes a FIXME. 2010-04-13 18:43:37 +00:00
CGObjCGNU.cpp Add some API code for future work. 2010-04-12 18:18:10 +00:00
CGObjCMac.cpp Add some API code for future work. 2010-04-12 18:18:10 +00:00
CGObjCRuntime.h Add some API code for future work. 2010-04-12 18:18:10 +00:00
CGRTTI.cpp Eliminate excessive PCH deserialization caused by the search for 2010-04-08 15:52:03 +00:00
CGRecordLayout.h IRgen: Add CGRecordLayout::dump, and dump (irgen) record layouts as part of -fdump-record-layouts. 2010-04-12 18:14:18 +00:00
CGRecordLayoutBuilder.cpp IRgen: Factor out ComputeBitFieldInfo. 2010-04-12 21:01:28 +00:00
CGStmt.cpp Fix debug info for cleanup block. 2010-04-13 00:08:43 +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 Clarify an assertion. 2010-04-11 20:23:06 +00:00
CGVTables.cpp Fix another bug where we wouldn't generate secondary vtables for construction vtables in some cases. 2010-04-11 22:20:36 +00:00
CGVTables.h Rename CGVtable files to CGVTables. 2010-04-08 16:30:25 +00:00
CGValue.h IRgen: Move the bit-field access type into CGBitFieldInfo, and change bit-field LValues to just store the base address of object containing the bit-field. 2010-04-08 02:59:45 +00:00
CMakeLists.txt Rename CGVtable files to CGVTables. 2010-04-08 16:30:25 +00:00
CodeGenFunction.cpp Fix debug info for cleanup block. 2010-04-13 00:08:43 +00:00
CodeGenFunction.h Variation of objc_copyStruct API generation when 2010-04-13 18:32:24 +00:00
CodeGenModule.cpp unbreak tests. 2010-04-13 17:57:11 +00:00
CodeGenModule.h Rename CGVtable files to CGVTables. 2010-04-08 16:30:25 +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 A bunch of string-related microoptimizations in Mangler. 2010-04-10 16:03:31 +00:00
Mangle.h Provide an extremely unsatisfactory diagnostic (instead of crashing) when 2010-04-09 22:26:14 +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 fit in 80 cols 2010-04-06 17:29:22 +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!

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