llvm-project/clang/lib/CodeGen
John McCall d441b1e637 Tweak this assert.
llvm-svn: 113863
2010-09-14 21:45:42 +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 Fixes an obscure bug in importd block variable layout 2010-09-11 01:27:29 +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 vabdl, vaba, and vabal builtins to be implemented using the 2010-09-03 01:27:09 +00:00
CGCXX.cpp Implement ARM static local initialization guards, which are more compact than 2010-09-08 01:44:27 +00:00
CGCXX.h Remove tabs, and whitespace cleanups. 2009-09-09 15:08:12 +00:00
CGCXXABI.h Implement ARM static local initialization guards, which are more compact than 2010-09-08 01:44:27 +00:00
CGCall.cpp Add symantic support for the Pascal calling convention via 2010-09-03 01:29:35 +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 Tidy up last commit, as per Devang's comments. 2010-09-02 18:01:51 +00:00
CGDebugInfo.h Tidy up last commit, as per Devang's comments. 2010-09-02 18:01:51 +00:00
CGDecl.cpp Implement ARM static local initialization guards, which are more compact than 2010-09-08 01:44:27 +00:00
CGDeclCXX.cpp Implement ARM static local initialization guards, which are more compact than 2010-09-08 01:44:27 +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 Implement the EH cleanup to call 'operator delete' if a new-expression throws 2010-09-14 07:57:04 +00:00
CGExpr.cpp Local static block variable referecned in its 2010-09-07 23:26:17 +00:00
CGExprAgg.cpp move the hackaround for PR6537 to catch unions as well, 2010-09-06 00:13:11 +00:00
CGExprCXX.cpp Tweak this assert. 2010-09-14 21:45:42 +00:00
CGExprComplex.cpp GCC didn't care for my attempt at API compatibility, so brute-force everything 2010-08-25 11:45:40 +00:00
CGExprConstant.cpp Teach IR generation to return 'this' from constructors and destructors 2010-08-31 07:33:07 +00:00
CGExprScalar.cpp Eagerly evaluate type traits in Sema instead of lazily in AST. They actually need Sema access to be correct, fixes coming up. 2010-09-13 20:56:31 +00:00
CGObjC.cpp IRGen fix for using property-dot syntax to pass 2010-09-10 18:56:35 +00:00
CGObjCGNU.cpp Fixes an obscure bug in importd block variable layout 2010-09-11 01:27:29 +00:00
CGObjCMac.cpp Block description for trivial block literals have 2010-09-13 16:09:44 +00:00
CGObjCRuntime.h Fixes an obscure bug in importd block variable layout 2010-09-11 01:27:29 +00:00
CGRTTI.cpp Petty optimization. 2010-09-04 01:26:37 +00:00
CGRecordLayout.h IRgen: Move CGBitFieldInfo strategy computation helpers to static member 2010-09-02 23:53:28 +00:00
CGRecordLayoutBuilder.cpp IRgen: Move CGBitFieldInfo strategy computation helpers to static member 2010-09-02 23:53:28 +00:00
CGStmt.cpp Fix 'for' loop variables' scope. 2010-08-25 00:28:56 +00:00
CGTemporaries.cpp Rename LazyCleanup -> Cleanup. No functionality change for these last three 2010-07-21 07:22:38 +00:00
CGVTT.cpp Teach IR generation to return 'this' from constructors and destructors 2010-08-31 07:33:07 +00:00
CGVTables.cpp Teach IR generation to return 'this' from constructors and destructors 2010-08-31 07:33:07 +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 CGValue: Increase width of allowed alignment. We could switch to log2, but we 2010-08-26 06:02:12 +00:00
CMakeLists.txt Revert "CMake: Update to use standard CMake dependency tracking facilities instead" 2010-09-13 23:54:41 +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 Implement the EH cleanup to call 'operator delete' if a new-expression throws 2010-09-14 07:57:04 +00:00
CodeGenFunction.h Implement the EH cleanup to call 'operator delete' if a new-expression throws 2010-09-14 07:57:04 +00:00
CodeGenModule.cpp get rid of a warning. 2010-09-07 19:57:04 +00:00
CodeGenModule.h Teach IR generation to return 'this' from constructors and destructors 2010-08-31 07:33:07 +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 Teach IR generation to return 'this' from constructors and destructors 2010-08-31 07:33:07 +00:00
GlobalDecl.h Add GlobalDecl::getCanonicalDecl. 2010-06-22 16:00:14 +00:00
ItaniumCXXABI.cpp Implement ARM static local initialization guards, which are more compact than 2010-09-08 01:44:27 +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 Define and implement CXXNoexceptExpr. Create it in Sema. 2010-09-10 20:55:43 +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 Implement ARM static local initialization guards, which are more compact than 2010-09-08 01:44:27 +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 fix rdar://8360877 a really nasty miscompilation in Boost.Xpressive 2010-09-01 00:50:20 +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!

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