clang-1/lib/CodeGen
Anders Carlsson ada4b32749 Refactor the null-initialization for record types and make it handle bases that aren't i8 arrays.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119980 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-22 18:42:14 +00:00
..
ABIInfo.h Fix Whitespace. 2010-10-19 06:39:39 +00:00
BackendUtil.cpp IRgen: Change CodeGenPasses to be a PassManager, so it can have CallGraphSCC or 2010-09-17 07:35:16 +00:00
CGBlocks.cpp Calculate the value kind of an expression when it's created and 2010-11-18 06:31:45 +00:00
CGBlocks.h Some cleanup of block API code. 2010-11-15 19:19:38 +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 Restore r117403 (fixing IR gen for bool atomics), this time being less 2010-10-27 20:58:56 +00:00
CGCXX.cpp Simplify the logic for emitting guard variables for template static 2010-11-06 09:44:32 +00:00
CGCXX.h Remove tabs, and whitespace cleanups. 2009-09-09 15:08:12 +00:00
CGCXXABI.h Simplify the logic for emitting guard variables for template static 2010-11-06 09:44:32 +00:00
CGCall.cpp Fix Whitespace. 2010-10-19 06:39:39 +00:00
CGCall.h relax the CGFunctionInfo::CGFunctionInfo ctor to allow any sequence 2010-06-29 18:13:52 +00:00
CGClass.cpp Block API patch to do copy ctor of copied-in cxx objects in 2010-11-13 21:53:34 +00:00
CGDebugInfo.cpp Refactoring of Diagnostic class. 2010-11-18 20:06:41 +00:00
CGDebugInfo.h Simplify. Builtin types' context is always implied. 2010-11-01 16:52:40 +00:00
CGDecl.cpp Fix warning: enumeration value 'IndirectField' not handled in switch. 2010-11-21 06:49:41 +00:00
CGDeclCXX.cpp Simplify the logic for emitting guard variables for template static 2010-11-06 09:44:32 +00:00
CGException.cpp ARM EH uses a different personality function in C. 2010-11-07 02:35:25 +00:00
CGException.h ARM EH uses a different personality function in C. 2010-11-07 02:35:25 +00:00
CGExpr.cpp Minor cleanup. No change otherwise. 2010-11-19 18:17:09 +00:00
CGExprAgg.cpp Reset the lifetime-managed flag between emission of the agg conditional 2010-11-17 00:07:33 +00:00
CGExprCXX.cpp Silence an unused variable warning during release builds by folding the 2010-11-15 13:54:43 +00:00
CGExprComplex.cpp Support compound complex operations as l-values in C++. Add a test 2010-11-16 23:07:28 +00:00
CGExprConstant.cpp Refactor the null-initialization for record types and make it handle bases that aren't i8 arrays. 2010-11-22 18:42:14 +00:00
CGExprScalar.cpp comparison of AltiVec vectors now gives bool result (fix for 7533) 2010-11-18 03:19:30 +00:00
CGObjC.cpp Calculate the value kind of an expression when it's created and 2010-11-18 06:31:45 +00:00
CGObjCGNU.cpp Remove the use of aliases in outputted code from ObjC (GNU runtime). 2010-11-09 11:21:43 +00:00
CGObjCMac.cpp Some fixes for synthesized ivar metadata (GNU runtime). 2010-11-03 16:12:44 +00:00
CGObjCRuntime.h Fixes an obscure bug in importd block variable layout 2010-09-11 01:27:29 +00:00
CGRTTI.cpp std::nullptr_t is a fundamental type for RTTI purposes. 2010-11-04 05:28:09 +00:00
CGRecordLayout.h Rename BaseLLVMType to NonVirtualBaseLLVMType. 2010-11-21 23:59:45 +00:00
CGRecordLayoutBuilder.cpp Remove FIXME; we don't ever want to lay out empty bases. 2010-11-22 00:03:08 +00:00
CGStmt.cpp When forming the !srcloc mdnode for an inline asm, add the SourceLocations 2010-11-17 08:25:26 +00:00
CGTemporaries.cpp one piece of code is responsible for the lifetime of every aggregate 2010-09-15 10:14:12 +00:00
CGVTT.cpp Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset. 2010-10-31 23:22:37 +00:00
CGVTables.cpp When re-using a vtable slot for the nearest overridden method, just because 2010-11-09 01:18:05 +00:00
CGVTables.h Make sure the VTables for template instantiations are emitted even if the key function doesn't have a body. 2010-10-11 03:25:57 +00:00
CGValue.h Reset the lifetime-managed flag between emission of the agg conditional 2010-11-17 00:07:33 +00:00
CMakeLists.txt Update CMake. 2010-10-15 00:39:31 +00:00
CodeGenAction.cpp Refactoring of Diagnostic class. 2010-11-18 20:06:41 +00:00
CodeGenFunction.cpp Use CodeGenFunction's getContext(), for consistency. 2010-10-29 22:47:07 +00:00
CodeGenFunction.h Support compound complex operations as l-values in C++. Add a test 2010-11-16 23:07:28 +00:00
CodeGenModule.cpp Simplify the logic for emitting guard variables for template static 2010-11-06 09:44:32 +00:00
CodeGenModule.h Simplify the logic for emitting guard variables for template static 2010-11-06 09:44:32 +00:00
CodeGenTBAA.cpp Add infrastructure for emitting TBAA metadata with the "constant" flag. 2010-10-25 23:51:23 +00:00
CodeGenTBAA.h Add infrastructure for emitting TBAA metadata with the "constant" flag. 2010-10-25 23:51:23 +00:00
CodeGenTypes.cpp Reduce string thrashing. 2010-11-12 18:45:23 +00:00
CodeGenTypes.h Fix Whitespace. 2010-10-19 06:39:39 +00:00
GlobalDecl.h Add GlobalDecl::getCanonicalDecl. 2010-06-22 16:00:14 +00:00
ItaniumCXXABI.cpp Simplify the logic for emitting guard variables for template static 2010-11-06 09:44:32 +00:00
Makefile BUILD_ARCHIVE is the default for libraries, no need to set it. 2010-07-18 00:14:47 +00:00
Mangle.cpp Refactoring of Diagnostic class. 2010-11-18 20:06:41 +00:00
Mangle.h Implement ARM static local initialization guards, which are more compact than 2010-09-08 01:44:27 +00:00
MicrosoftCXXABI.cpp Use the right calling convention when mangling names in the Microsoft C++ 2010-11-09 18:04:24 +00:00
ModuleBuilder.cpp Move CodeGenOptions.h *back* into Frontend. This should have been done when the 2010-06-15 23:19:56 +00:00
README.txt These IRgen improvements have been done. 2009-07-23 03:03:07 +00:00
TargetInfo.cpp Use a twine. 2010-11-12 15:42:18 +00:00
TargetInfo.h Fix the IR generation for catching pointers by references. 2010-07-20 22:17:55 +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!

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