clang-1/lib/CodeGen
Peter Collingbourne 0ac2cf4d28 If this is an intrinsic function, set the function's attributes to the intrinsic's attributes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129000 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-06 12:29:04 +00:00
..
ABIInfo.h Fix Whitespace. 2010-10-19 06:39:39 +00:00
BackendUtil.cpp Added *hidden* flags -print-options and -print-all-options so 2011-04-05 18:56:55 +00:00
CGBlocks.cpp Whoops. 2011-03-31 09:19:20 +00:00
CGBlocks.h Remove a rather egregious use of getFunctionInfo. 2011-03-09 08:39:33 +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 Oops, prefer C-style cast here 2011-03-31 01:56:27 +00:00
CGCXX.cpp Convert the BaseOffset member of BaseSubobject to CharUnits from bits. No 2011-03-24 01:21:01 +00:00
CGCXXABI.cpp Use the "undergoes default argument promotion" bit on parameters to 2011-03-09 04:27:21 +00:00
CGCXXABI.h More capturing of 'this': implicit member expressions. Getting that 2011-02-03 08:15:49 +00:00
CGCall.cpp Add support for language-specific address spaces. On top of that, 2011-03-18 22:38:29 +00:00
CGCall.h Use a slightly more semantic interface for emitting call arguments. 2011-03-11 20:59:21 +00:00
CGClass.cpp Revert r128770, r128771, r128773 and r128776 for now. It breaks debug info. 2011-04-04 20:36:06 +00:00
CGCleanup.cpp Tame an assert; the scope depth of a jump destination does not 2011-02-25 04:19:13 +00:00
CGCleanup.h Move all the cleanups framework code into a single file. 2011-01-28 11:13:47 +00:00
CGDebugInfo.cpp Simplify. 2011-04-05 23:26:36 +00:00
CGDebugInfo.h Emit debug info for function template parameters. 2011-04-05 22:54:11 +00:00
CGDecl.cpp Fix typo. 2011-04-05 20:28:21 +00:00
CGDeclCXX.cpp __cxa_atexit does not throw. 2011-03-20 20:52:32 +00:00
CGException.cpp Fix Objective-C++ exceptions (GNU runtime). 2011-03-20 21:35:39 +00:00
CGException.h Fix Objective-C++ exceptions (GNU runtime). 2011-03-20 21:35:39 +00:00
CGExpr.cpp IRgen: Reapply r128691 with a fix to ensure we don't increase alignment past 2011-04-01 00:49:43 +00:00
CGExprAgg.cpp Fix IRGen issues related to using property-dot syntax 2011-03-30 16:11:20 +00:00
CGExprCXX.cpp Remove PHINode::reserveOperandSpace(). Instead, add a parameter to 2011-03-30 11:28:58 +00:00
CGExprComplex.cpp Remove PHINode::reserveOperandSpace(). Instead, add a parameter to 2011-03-30 11:28:58 +00:00
CGExprConstant.cpp supported: AltiVec vector initialization with a single literal according to PIM section 2.5.1 - after initialization all elements have the value specified by the literal 2011-03-27 09:32:40 +00:00
CGExprScalar.cpp Remove PHINode::reserveOperandSpace(). Instead, add a parameter to 2011-03-30 11:28:58 +00:00
CGObjC.cpp Fixes a regression caused by my last patch. 2011-04-05 23:01:27 +00:00
CGObjCGNU.cpp Fix copy-and-paste bug that I introduced while tidying up the code. 2011-04-05 17:15:18 +00:00
CGObjCMac.cpp Obj-C/NeXT: Update and reapply 108847, now that changes are more baked. 2011-03-25 20:09:09 +00:00
CGObjCRuntime.cpp Continuing work on ObjC tidyup: 2011-03-25 11:57:33 +00:00
CGObjCRuntime.h Continuing work on ObjC tidyup: 2011-03-25 11:57:33 +00:00
CGRTTI.cpp Revert r128770, r128771, r128773 and r128776 for now. It breaks debug info. 2011-04-04 20:36:06 +00:00
CGRecordLayout.h Perform zero-initialization of virtual base classes when emitting 2011-02-15 06:40:56 +00:00
CGRecordLayoutBuilder.cpp Fix typo in comment. 2011-03-22 17:35:47 +00:00
CGStmt.cpp Fix in r128471 is very broad. Some of the unconditional branches need line number information for better user experience. 2011-03-30 00:08:31 +00:00
CGTemporaries.cpp Fix some obvious bugs in the conditional-cleanup code and then make the 2011-01-26 19:15:39 +00:00
CGVTT.cpp We were emitting construction v-tables with internal linkage all the time. 2011-03-27 09:00:25 +00:00
CGVTables.cpp Revert r128770, r128771, r128773 and r128776 for now. It breaks debug info. 2011-04-04 20:36:06 +00:00
CGVTables.h Revert r128770, r128771, r128773 and r128776 for now. It breaks debug info. 2011-04-04 20:36:06 +00:00
CGValue.h More capturing of 'this': implicit member expressions. Getting that 2011-02-03 08:15:49 +00:00
CMakeLists.txt Unbreak CMake build. 2011-03-25 14:16:48 +00:00
CodeGenAction.cpp Re-instate r125819 and r125820 with no functionality change 2011-02-19 23:03:58 +00:00
CodeGenFunction.cpp Remove PHINode::reserveOperandSpace(). Instead, add a parameter to 2011-03-30 11:28:58 +00:00
CodeGenFunction.h After much contemplation, I've decided that we probably shouldn't "unique" 2011-03-31 08:03:29 +00:00
CodeGenModule.cpp If this is an intrinsic function, set the function's attributes to the intrinsic's attributes. 2011-04-06 12:29:04 +00:00
CodeGenModule.h After much contemplation, I've decided that we probably shouldn't "unique" 2011-03-31 08:03:29 +00:00
CodeGenTBAA.cpp For consistency, use llvm::raw_ostream in the rest of the mangle api. 2011-02-11 02:52:17 +00:00
CodeGenTBAA.h Move name mangling support from CodeGen to AST. In the 2011-01-13 18:57:25 +00:00
CodeGenTypes.cpp Add support for language-specific address spaces. On top of that, 2011-03-18 22:38:29 +00:00
CodeGenTypes.h Use the "undergoes default argument promotion" bit on parameters to 2011-03-09 04:27:21 +00:00
GlobalDecl.h When IRgen refers to a function declaration that is not a definition, 2011-02-09 02:03:05 +00:00
ItaniumCXXABI.cpp Remove PHINode::reserveOperandSpace(). Instead, add a parameter to 2011-03-30 11:28:58 +00:00
Makefile BUILD_ARCHIVE is the default for libraries, no need to set it. 2010-07-18 00:14:47 +00:00
MicrosoftCXXABI.cpp Notes on dynamic array cookies in MSVC. 2011-01-27 02:46:02 +00:00
ModuleBuilder.cpp In addition to in-class member functions marked with the "used" 2011-02-19 21:54:50 +00:00
README.txt These IRgen improvements have been done. 2009-07-23 03:03:07 +00:00
TargetInfo.cpp Set AAPCS-VFP calling convention accordingly and hard float ABI command handling. 2011-04-05 00:23:47 +00:00
TargetInfo.h Re-instate r125819 and r125820 with no functionality change 2011-02-19 23:03:58 +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!

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