llvm-project/clang/lib/CodeGen
Fariborz Jahanian 3d3426f321 Set visibility of ivar offset symbols according to
accessibility of the ivar (related to objc2's
non-fragile abi).

llvm-svn: 63166
2009-01-28 01:36:42 +00:00
..
CGBuilder.h Disable generation of basic block names in NDEBUG mode. 2008-11-12 00:01:12 +00:00
CGBuiltin.cpp Make the constant folder aware of 2009-01-25 01:54:01 +00:00
CGCXX.cpp Provide a new kind of iterator, the specific_decl_iterator, that 2009-01-09 17:18:27 +00:00
CGCall.cpp x86_64: Classify __m64 and __m128 "correctly". 2009-01-27 02:01:34 +00:00
CGCall.h Large mechanical patch. 2008-09-25 21:02:23 +00:00
CGDebugInfo.cpp fix PR3427: fix debuginfo for incomplete array types 2009-01-28 00:35:17 +00:00
CGDebugInfo.h reimplement debug info generation in terms of DebugInfo.h instead of 2008-11-10 06:08:34 +00:00
CGDecl.cpp Rename Expr::isConstantExpr to Expr::isConstantInitializer; this more 2009-01-25 02:32:41 +00:00
CGExpr.cpp Vector codegen improvements 2009-01-18 06:42:49 +00:00
CGExprAgg.cpp Support CodeGen for __extension__ operator on aggregates. 2009-01-27 09:03:41 +00:00
CGExprComplex.cpp Comment fix. 2009-01-26 18:02:34 +00:00
CGExprConstant.cpp Get rid of some code that should be unnecessary. 2009-01-25 02:10:46 +00:00
CGExprScalar.cpp Fix for PR2910: implement CodeGen for non-constant offsetof. 2009-01-24 22:38:55 +00:00
CGObjC.cpp Remove ScopedDecl, collapsing all of its functionality into Decl, so 2009-01-20 01:17:11 +00:00
CGObjCGNU.cpp improvements for GNU objc runtime support, patch by David Chisnall! 2009-01-27 05:06:01 +00:00
CGObjCMac.cpp Set visibility of ivar offset symbols according to 2009-01-28 01:36:42 +00:00
CGObjCRuntime.h Use NonFragileABI as name of new Next abi. More comments 2009-01-22 23:02:58 +00:00
CGStmt.cpp If an input constraint refers to an output constraint, it should have the same constraint info as the output constraint. Fixes PR3417 2009-01-27 20:38:24 +00:00
CGValue.h Remove tabs. 2008-12-16 19:57:09 +00:00
CMakeLists.txt CMake: Builds and installs clang binary and libs (no docs yet). It 2008-10-26 00:56:18 +00:00
CodeGenFunction.cpp Pull EmitReturnBlock out of FinishFunction and catch unified return 2009-01-26 23:27:52 +00:00
CodeGenFunction.h Pull EmitReturnBlock out of FinishFunction and catch unified return 2009-01-26 23:27:52 +00:00
CodeGenModule.cpp Use NonFragileABI as name of new Next abi. More comments 2009-01-22 23:02:58 +00:00
CodeGenModule.h Fix the bug that would cause Python to crash at startup. 2009-01-04 02:08:04 +00:00
CodeGenTypes.cpp Introduce an explicit case for member pointers in CodeGenTypes. However, it simply asserts. 2009-01-25 13:35:30 +00:00
CodeGenTypes.h Code gen. for ivar references; including bitfield 2008-12-15 20:35:07 +00:00
Makefile Make a major restructuring of the clang tree: introduce a top-level 2008-03-15 23:59:48 +00:00
ModuleBuilder.cpp Remove ScopedDecl, collapsing all of its functionality into Decl, so 2009-01-20 01:17:11 +00:00
README.txt Mention an optimization opportunity pointed out by Chris. 2008-12-04 09:05:45 +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.

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