llvm-project/clang/lib/CodeGen
Bill Wendling f7d4598b74 Pack ivar offsets together.
Ivar offsets for synthesized ivars are wrong, which could end up with a large
number of dirty pages because of ivar fixups at runtime. When we pack all of the
synthesized ivars into the same section, it limits the number of dirty pages
created. Place them in the "__DATA,__objc_ivar" section.
<rdar://problem/9374905>

llvm-svn: 130870
2011-05-04 21:37:25 +00:00
..
ABIInfo.h Fix Whitespace. 2010-10-19 06:39:39 +00:00
BackendUtil.cpp Implement -fno-dwarf2-cfi-asm. 2011-04-30 18:35:43 +00:00
CGBlocks.cpp Emit debug info for __destroy_helper_block_ and __copy_helper_block. 2011-05-02 20:37:08 +00:00
CGBlocks.h Remove a rather egregious use of getFunctionInfo. 2011-03-09 08:39:33 +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 Simplification noticed by Chris. 2011-05-04 20:28:12 +00:00
CGCXX.cpp Convert the BaseOffset member of BaseSubobject to CharUnits from bits. No 2011-03-24 01:21:01 +00:00
CGCXXABI.cpp After some discussion with Doug, we decided that it made a lot more sense 2011-04-12 00:42:48 +00:00
CGCXXABI.h After some discussion with Doug, we decided that it made a lot more sense 2011-04-12 00:42:48 +00:00
CGCall.cpp Skip extra copy from aggregate where it isn't necessary; rdar://problem/8139919 . This shouldn't make much of a difference at -O3, but should substantially reduce the number of generated memcpy's at -O0. 2011-05-02 20:24:29 +00:00
CGCall.h Skip extra copy from aggregate where it isn't necessary; rdar://problem/8139919 . This shouldn't make much of a difference at -O3, but should substantially reduce the number of generated memcpy's at -O0. 2011-05-02 20:24:29 +00:00
CGClass.cpp Ensure that destructors are properly inovked when an exception leaves 2011-05-03 23:05:34 +00:00
CGCleanup.cpp implement rdar://9289524 - case followed immediately by break results in empty IR block, 2011-04-17 00:54:30 +00:00
CGCleanup.h Move all the cleanups framework code into a single file. 2011-01-28 11:13:47 +00:00
CGDebugInfo.cpp Finish off rules for z-length bitfields in ms_struct 2011-05-03 20:21:04 +00:00
CGDebugInfo.h Simplify. There is no need to have a method to just call another method. 2011-04-25 23:43:36 +00:00
CGDecl.cpp Simplify code a bit by using CallArgList::add. No intended functionality change. 2011-05-02 17:57:46 +00:00
CGDeclCXX.cpp Template static data members can have weak_odr linkage, not just 2011-04-12 01:46:54 +00:00
CGException.cpp IRgen/Darwin: Fix refacto introduced in Triple changes. 2011-04-26 19:43:00 +00:00
CGException.h Fix Objective-C++ exceptions (GNU runtime). 2011-03-20 21:35:39 +00:00
CGExpr.cpp Remove dead variable, flagged by gcc's -Wunused-but-set-variable. 2011-05-02 00:46:56 +00:00
CGExprAgg.cpp removes a meaningless comment. 2011-04-29 22:11:28 +00:00
CGExprCXX.cpp Fix delegating constructors stylistic issues. 2011-05-03 20:19:28 +00:00
CGExprComplex.cpp C1X: implement generic selections 2011-04-15 00:35:48 +00:00
CGExprConstant.cpp Finish off rules for z-length bitfields in ms_struct 2011-05-03 20:21:04 +00:00
CGExprScalar.cpp Implementation of Embarcadero array type traits 2011-04-28 00:16:57 +00:00
CGObjC.cpp Simplify code a bit by using CallArgList::add. No intended functionality change. 2011-05-02 17:57:46 +00:00
CGObjCGNU.cpp Simplify code a bit by using CallArgList::add. No intended functionality change. 2011-05-02 17:57:46 +00:00
CGObjCMac.cpp Pack ivar offsets together. 2011-05-04 21:37:25 +00:00
CGObjCRuntime.cpp Replace some literal 8s with char width and char align. No change in 2011-04-22 17:23:43 +00:00
CGObjCRuntime.h Remove unused STL header includes. 2011-04-23 19:53:52 +00:00
CGRTTI.cpp Make yet another placeholder type, this one marking that an expression is a bound 2011-04-26 20:42:42 +00:00
CGRecordLayout.h Convert AccessInfo::AccessAlignment to CharUnits. No change in functionality 2011-04-24 10:13:17 +00:00
CGRecordLayoutBuilder.cpp Finish off rules for z-length bitfields in ms_struct 2011-05-03 20:21:04 +00:00
CGStmt.cpp Parsing/AST support for Structured Exception Handling 2011-04-28 01:08:34 +00:00
CGTemporaries.cpp Fix some obvious bugs in the conditional-cleanup code and then make the 2011-01-26 19:15:39 +00:00
CGVTT.cpp We were emitting construction v-tables with internal linkage all the time. 2011-03-27 09:00:25 +00:00
CGVTables.cpp Simplify code a bit by using CallArgList::add. No intended functionality change. 2011-05-02 17:57:46 +00:00
CGVTables.h [Reapply r128776, modified so that it does not break debug info.] 2011-04-07 12:37:09 +00:00
CGValue.h More capturing of 'this': implicit member expressions. Getting that 2011-02-03 08:15:49 +00:00
CMakeLists.txt Wire up the -ftest-coverage and -fprofile-arcs flags to .gcno file emission (at 2011-04-21 23:44:07 +00:00
CodeGenAction.cpp fix a bunch of comment typos found by codespell. Patch by 2011-04-15 05:22:18 +00:00
CodeGenFunction.cpp Eliminate some literal 8s from EmitNullInitialization() by converting 2011-04-22 17:51:05 +00:00
CodeGenFunction.h Fully implement delegating constructors! 2011-05-01 07:04:31 +00:00
CodeGenModule.cpp Record where the GCOV data files should be placed. 2011-05-04 20:46:58 +00:00
CodeGenModule.h Record where the GCOV data files should be placed. 2011-05-04 20:46:58 +00:00
CodeGenTBAA.cpp PR9214: Convert Metadata API to use ArrayRef. 2011-04-21 19:59:12 +00:00
CodeGenTBAA.h Move name mangling support from CodeGen to AST. In the 2011-01-13 18:57:25 +00:00
CodeGenTypes.cpp Make yet another placeholder type, this one marking that an expression is a bound 2011-04-26 20:42:42 +00:00
CodeGenTypes.h Don't add type names for enums; they're never used in LLVM IR. 2011-04-20 23:51:43 +00:00
GlobalDecl.h When IRgen refers to a function declaration that is not a definition, 2011-02-09 02:03:05 +00:00
ItaniumCXXABI.cpp Remove dead variable flagged by gcc's -Wunused-but-set-variable. No 2011-05-02 00:41:17 +00:00
Makefile BUILD_ARCHIVE is the default for libraries, no need to set it. 2010-07-18 00:14:47 +00:00
MicrosoftCXXABI.cpp fix a bunch of comment typos found by codespell. Patch by 2011-04-15 05:22:18 +00:00
ModuleBuilder.cpp In addition to in-class member functions marked with the "used" 2011-02-19 21:54:50 +00:00
README.txt These IRgen improvements have been done. 2009-07-23 03:03:07 +00:00
TargetInfo.cpp Raise ARM byval minimum size from 32 to 64, addressing a performance 2011-04-28 21:35:59 +00:00
TargetInfo.h Re-instate r125819 and r125820 with no functionality change 2011-02-19 23:03:58 +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!

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