llvm-project/clang/lib/CodeGen
Daniel Dunbar 435bbe0254 Fix some unused variable, control reaches end of non-void function,
and uninitialized use options.

llvm-svn: 62270
2009-01-15 18:32:35 +00:00
..
CGBuilder.h Disable generation of basic block names in NDEBUG mode. 2008-11-12 00:01:12 +00:00
CGBuiltin.cpp Generate code for __builtin_ia32_pshufw 2008-12-22 04:54:32 +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 Add dummy X86_64 ABIInfo implementation. 2009-01-15 18:18:40 +00:00
CGCall.h Large mechanical patch. 2008-09-25 21:02:23 +00:00
CGDebugInfo.cpp Generate debug info for VLA types 2009-01-05 01:23:29 +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 Make VLAs usable, and make basic usage work correctly. Also, add a 2008-12-20 23:11:59 +00:00
CGExpr.cpp Patch to implement code gen for aggrgate-valued property used 2009-01-12 23:27:26 +00:00
CGExprAgg.cpp Prevent a segfault for vaarg expressions on unsupported architectures. 2009-01-09 21:09:38 +00:00
CGExprComplex.cpp Normalize many BasicBlock names. 2008-11-13 01:38:36 +00:00
CGExprConstant.cpp (LLVM up) Match TargetData API change in LLVM TOT. 2009-01-12 21:08:18 +00:00
CGExprScalar.cpp make ScalarExprEmitter::EmitCompare() emit the expression with the correct type instead of always zext it to an int 2009-01-11 23:22:37 +00:00
CGObjC.cpp Fix some unused variable, control reaches end of non-void function, 2009-01-15 18:32:35 +00:00
CGObjCGNU.cpp (LLVM up) Match TargetData API change in LLVM TOT. 2009-01-12 21:08:18 +00:00
CGObjCMac.cpp Cleanup DeclContext::addDecl and DeclContext::insert interface, from Piotr Rak 2009-01-12 23:27:07 +00:00
CGObjCRuntime.h This patch fixes the code gen failures which was a fallout from 2009-01-10 21:06:09 +00:00
CGStmt.cpp Handle multi-value inputs 2009-01-12 02:22:13 +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 Block pointer types are not aggregate types. 2009-01-09 02:44:18 +00:00
CodeGenFunction.h Forgot to commit this 2009-01-11 19:40:10 +00:00
CodeGenModule.cpp Bug fix, __private_extern__ globals were always introducing a definition. 2009-01-13 02:25:00 +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 (LLVM up) Match TargetData API change in LLVM TOT. 2009-01-12 21:08:18 +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 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.

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