llvm-project/clang/lib/CodeGen
Devang Patel 22e99c2bad Fix enum size and align. Tested by setvar.exp in gdb testsuite.
llvm-svn: 111936
2010-08-24 18:14:06 +00:00
..
ABIInfo.h fix PR5179 and correctly fix PR5831 to not miscompile. 2010-07-30 04:02:24 +00:00
BackendUtil.cpp Driver/IRgen: Add support for -momit-leaf-frame-pointer. 2010-07-01 01:31:45 +00:00
CGBlocks.cpp Make use of __func__ in a block actually refer to 2010-08-13 00:19:55 +00:00
CGBlocks.h IRgen: Move blocks runtime interfaces to CodeGenModule. 2010-07-16 00:00:15 +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 Translate NEON vmovl intrinsics to zero/sign-extend operations. 2010-08-20 03:36:08 +00:00
CGCXX.cpp Abstract out everything having to do with member pointers into the ABI 2010-08-23 01:21:21 +00:00
CGCXX.h Remove tabs, and whitespace cleanups. 2009-09-09 15:08:12 +00:00
CGCXXABI.h Abstract out everything having to do with member pointers into the ABI 2010-08-23 01:21:21 +00:00
CGCall.cpp IRgen: Switch more MakeAddr() users to MakeAddrLValue; this time for calls which were previously not computing the qualifier list. In most cases, I don't think it matters, but I believe this is conservatively more correct / consistent. 2010-08-21 03:15:20 +00:00
CGCall.h relax the CGFunctionInfo::CGFunctionInfo ctor to allow any sequence 2010-06-29 18:13:52 +00:00
CGClass.cpp IRgen: Switch a bunch of trivial MakeAddr calls to use MakeAddrLValue. 2010-08-21 03:08:16 +00:00
CGDebugInfo.cpp Fix enum size and align. Tested by setvar.exp in gdb testsuite. 2010-08-24 18:14:06 +00:00
CGDebugInfo.h Emit debug info for enum constants. 2010-08-23 22:07:25 +00:00
CGDecl.cpp IRgen: Change Emit{Load,Store}OfScalar to take a required Alignment argument and 2010-08-21 02:24:36 +00:00
CGDeclCXX.cpp IRgen: Change Emit{Load,Store}OfScalar to take a required Alignment argument and 2010-08-21 02:24:36 +00:00
CGException.cpp IRgen: Change Emit{Load,Store}OfScalar to take a required Alignment argument and 2010-08-21 02:24:36 +00:00
CGException.h More cleanup enabling. 2010-08-14 07:46:19 +00:00
CGExpr.cpp fix rdar://8340348, a miscompile of boost that was exposed by r109848. 2010-08-23 05:26:13 +00:00
CGExprAgg.cpp When performing value-initialization for a class with a non-trivial, 2010-08-22 16:15:35 +00:00
CGExprCXX.cpp Extract a method to check whether a function is the global placement 2010-08-23 01:17:59 +00:00
CGExprComplex.cpp Add lvalue-bitcast support for complex numbers. 2010-07-14 21:35:45 +00:00
CGExprConstant.cpp Abstract out everything having to do with member pointers into the ABI 2010-08-23 01:21:21 +00:00
CGExprScalar.cpp Emit an error noting that Clang does not support code generation for 2010-08-23 14:50:27 +00:00
CGObjC.cpp Store inheritance paths after CastExprs instead of inside them. 2010-08-07 06:22:56 +00:00
CGObjCGNU.cpp Convert all uses of StringLiteral::getStrData() to StringLiteral::getString() 2010-08-17 12:54:38 +00:00
CGObjCMac.cpp Simplify. 2010-08-21 04:05:54 +00:00
CGObjCRuntime.h Some early work for providing block layout info. 2010-08-04 16:57:49 +00:00
CGRTTI.cpp Detabify. 2010-08-22 01:00:03 +00:00
CGRecordLayout.h Go back to asking CodeGenTypes whether a type is zero-initializable. 2010-08-22 21:01:12 +00:00
CGRecordLayoutBuilder.cpp Go back to asking CodeGenTypes whether a type is zero-initializable. 2010-08-22 21:01:12 +00:00
CGStmt.cpp Detabify. 2010-08-22 01:00:03 +00:00
CGTemporaries.cpp Rename LazyCleanup -> Cleanup. No functionality change for these last three 2010-07-21 07:22:38 +00:00
CGVTT.cpp The global variable for the VTT might not have external linkage; allow 2010-05-06 22:18:21 +00:00
CGVTables.cpp Just disable the hidden-visibility optimization for now by hiding it behind 2010-08-12 23:36:15 +00:00
CGVTables.h Introduce Decl::hasBody() and FunctionDecl::hasBody() and use them instead of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH. 2010-07-07 11:31:19 +00:00
CGValue.h IRgen/CGValue: Give MakeAddrLValue() an alignment argument, and eliminate old form of MakeAddr(). 2010-08-21 03:58:45 +00:00
CMakeLists.txt Update CMake build for new attribute changes. 2010-06-17 00:37:02 +00:00
CodeGenAction.cpp Break Frontend's dependency on Rewrite, Checker and CodeGen in shared library configuration 2010-06-15 17:48:49 +00:00
CodeGenFunction.cpp Go back to asking CodeGenTypes whether a type is zero-initializable. 2010-08-22 21:01:12 +00:00
CodeGenFunction.h IRgen: Set the alignment correctly when creating LValue for a decls. 2010-08-21 04:20:22 +00:00
CodeGenModule.cpp Support for IRGen of synthesize bitfield ivars in 2010-08-23 18:51:39 +00:00
CodeGenModule.h Abstract out everything having to do with member pointers into the ABI 2010-08-23 01:21:21 +00:00
CodeGenTypes.cpp Abstract out everything having to do with member pointers into the ABI 2010-08-23 01:21:21 +00:00
CodeGenTypes.h Go back to asking CodeGenTypes whether a type is zero-initializable. 2010-08-22 21:01:12 +00:00
GlobalDecl.h Add GlobalDecl::getCanonicalDecl. 2010-06-22 16:00:14 +00:00
ItaniumCXXABI.cpp chandlerc pointed out that ending a line with /\ is not very friendly. :) 2010-08-23 06:56:36 +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 Detabify. 2010-08-22 01:00:03 +00:00
Mangle.h Add function for mangling reference temporaries. 2010-06-26 16:09:40 +00:00
MicrosoftCXXABI.cpp Experiment with using first-class aggregates to represent member function 2010-08-22 10:59:02 +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 Experiment with using first-class aggregates to represent member function 2010-08-22 10:59:02 +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!

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