llvm-project/clang/lib/CodeGen
Anders Carlsson a726c1763a Append an extra newline to the module inline asm if it's not empty.
llvm-svn: 60827
2008-12-10 02:21:04 +00:00
..
CGBuilder.h Disable generation of basic block names in NDEBUG mode. 2008-11-12 00:01:12 +00:00
CGBuiltin.cpp Use the new Expr::Evaluate 2008-12-01 02:31:41 +00:00
CGCXX.cpp Rename Selector::getName() to Selector::getAsString(), and add 2008-11-24 03:33:13 +00:00
CGCall.cpp Handle returning complex types that get coerced. Fixes PR3131 2008-11-25 22:21:48 +00:00
CGCall.h Large mechanical patch. 2008-09-25 21:02:23 +00:00
CGDebugInfo.cpp Convert incomplete array types before emitting debug info for them, fixes PR3134. 2008-11-26 17:40:42 +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 Migrate some stuff from NamedDecl::getName() to 2008-11-24 04:00:27 +00:00
CGExpr.cpp Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of 2008-11-24 05:29:24 +00:00
CGExprAgg.cpp Disabling this code due to regression on test/CodeGen/bitfield.c. See 2008-12-02 01:17:45 +00:00
CGExprComplex.cpp Normalize many BasicBlock names. 2008-11-13 01:38:36 +00:00
CGExprConstant.cpp Change more code over to using the new Expr::Evaluate 2008-12-01 02:42:14 +00:00
CGExprScalar.cpp Fix for PR3150: obvious copy-paste bug in 2008-12-02 16:02:46 +00:00
CGObjC.cpp Support for implementation of property in the case where 2008-12-09 20:23:04 +00:00
CGObjCGNU.cpp Correct CodeGen assumption that LongTy == Int32Ty in a few places. This makes several CodeGenObjC tests pass on 64-bit by fixing assertions. This doesn't mean that the result is actually what the GNU runtime expects, though. 2008-12-04 00:10:55 +00:00
CGObjCMac.cpp Append an extra newline to the module inline asm if it's not empty. 2008-12-10 02:21:04 +00:00
CGObjCRuntime.h Consolidated @try and @synchronize into a single 2008-11-21 00:49:24 +00:00
CGStmt.cpp Use Expr::Evaluate for case statements. Fixes PR2525 2008-11-22 21:04:56 +00:00
CGValue.h Implemented ir-gen for 'implicit' properties using the new AST nodes. 2008-11-22 22:30:21 +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 Change more code over to using the new Expr::Evaluate 2008-12-01 02:46:24 +00:00
CodeGenFunction.h Support for implementation of property in the case where 2008-12-09 20:23:04 +00:00
CodeGenModule.cpp Support for implementation of property in the case where 2008-12-09 20:23:04 +00:00
CodeGenModule.h Add option argument to GetAddrOfConstantString to use for name of 2008-10-17 21:56:50 +00:00
CodeGenTypes.cpp Introduce basic support for dependent types, type-dependent 2008-12-05 23:32:09 +00:00
CodeGenTypes.h Lift out ABIInfo abstract base class. 2008-10-13 17:02:26 +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 Add GetModule accessor to ModuleBuilder 2008-10-21 19:55:09 +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.

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