llvm-project/clang/lib/CodeGen
Bill Wendling ec9d2633f1 When we adjust the inline ASM type, we need to take into account an early
clobber with the 'y' constraint. Otherwise, we get the wrong return type and an
assert, because it created a '<1 x i64>' vector type instead of the x86_mmx
type.

llvm-svn: 127185
2011-03-07 22:47:14 +00:00
..
ABIInfo.h Fix Whitespace. 2010-10-19 06:39:39 +00:00
BackendUtil.cpp If -fno-builtin is passed, tell TargetLibraryInfo to 2011-02-18 22:34:47 +00:00
CGBlocks.cpp CodeGenFunction::GenerateBlockFunction() should initialize DebugInfo just like CodeGenFunction::GenerateCode() 2011-03-07 21:53:18 +00:00
CGBlocks.h Emit the structure layout of the block literal parameter to a block 2011-02-22 22:38: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 update for ConstantVector API change. 2011-02-15 00:14:06 +00:00
CGCXX.cpp Look through array types when deciding whether a field requires non-trivial 2011-02-13 00:46:43 +00:00
CGCXXABI.cpp More capturing of 'this': implicit member expressions. Getting that 2011-02-03 08:15:49 +00:00
CGCXXABI.h More capturing of 'this': implicit member expressions. Getting that 2011-02-03 08:15:49 +00:00
CGCall.cpp Encode argument numbering in debug info so that code generator can emit them in order. 2011-03-03 20:13:15 +00:00
CGCall.h relax the CGFunctionInfo::CGFunctionInfo ctor to allow any sequence 2010-06-29 18:13:52 +00:00
CGClass.cpp Get rid of the areExceptionsEnabled() getter from LangOptions. 2011-02-28 00:33:03 +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 Correctly unwrap 'auto' types. Fixes PR9414. 2011-03-06 16:43:04 +00:00
CGDebugInfo.h Encode argument numbering in debug info so that code generator can emit them in order. 2011-03-03 20:13:15 +00:00
CGDecl.cpp Revert r126422 "Use private linkage to avoid symbol conflicts in 2011-03-06 23:28:21 +00:00
CGDeclCXX.cpp Revert "Add CC_Win64ThisCall and set it in the necessary places." 2011-03-02 21:36:49 +00:00
CGException.cpp Add a -fcxx-exceptions flag to the frontend, which can be used to enable 2011-02-28 02:27:16 +00:00
CGException.h Move all the cleanups framework code into a single file. 2011-01-28 11:13:47 +00:00
CGExpr.cpp DebugInfo can be enabled or disabled at function level (e.g. using an attribute). However, at module level it is determined by command line option and the state of command line option does not change during compilation. Make this layering explicit and fix accidental cases where the code generator was checking whether module has debug info enabled instead of checking whether debug info is enabled for this function or not. 2011-03-07 18:45:56 +00:00
CGExprAgg.cpp Change the representation of GNU ?: expressions to use a different expression 2011-02-17 10:25:35 +00:00
CGExprCXX.cpp The conditional needs to be pushed before the branch. Make the test less 2011-03-07 03:12:35 +00:00
CGExprComplex.cpp Remove the "conditional save" hashtables from IR generation. 2011-02-17 19:02:56 +00:00
CGExprConstant.cpp Only emit string initializers in-place if types match. Fixes PR9373. 2011-03-02 21:27:44 +00:00
CGExprScalar.cpp DebugInfo can be enabled or disabled at function level (e.g. using an attribute). However, at module level it is determined by command line option and the state of command line option does not change during compilation. Make this layering explicit and fix accidental cases where the code generator was checking whether module has debug info enabled instead of checking whether debug info is enabled for this function or not. 2011-03-07 18:45:56 +00:00
CGObjC.cpp DebugInfo can be enabled or disabled at function level (e.g. using an attribute). However, at module level it is determined by command line option and the state of command line option does not change during compilation. Make this layering explicit and fix accidental cases where the code generator was checking whether module has debug info enabled instead of checking whether debug info is enabled for this function or not. 2011-03-07 18:45:56 +00:00
CGObjCGNU.cpp Fix type mismatch between property function that CGObjCGNU was returning and the one CGObjC was calling. Fixes bug r9294. 2011-02-23 14:05:31 +00:00
CGObjCMac.cpp Access ivars with inbounds GEPs, even in -fwrapv. It's unlikely that 2011-03-04 08:25:59 +00:00
CGObjCRuntime.h A few more tweaks to the blocks AST representation: 2011-02-07 10:33:21 +00:00
CGRTTI.cpp Implement the C++0x deduced 'auto' feature. 2011-02-20 03:19:35 +00:00
CGRecordLayout.h Perform zero-initialization of virtual base classes when emitting 2011-02-15 06:40:56 +00:00
CGRecordLayoutBuilder.cpp A much-delayed response to Ken Dyck's review: make this somewhat more 2011-02-26 08:41:59 +00:00
CGStmt.cpp Make skipping of vardecls more precise: it's ok to skip a decl if the entire 2011-02-28 07:22:44 +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 For consistency, use llvm::raw_ostream in the rest of the mangle api. 2011-02-11 02:52:17 +00:00
CGVTables.cpp Revert "Add CC_Win64ThisCall and set it in the necessary places." 2011-03-02 21:36:49 +00:00
CGVTables.h When building with optimizations, emit thunks with available_externally linkage so devirtualized function calls can also be de-thunked. 2011-02-06 18:31:40 +00:00
CGValue.h More capturing of 'this': implicit member expressions. Getting that 2011-02-03 08:15:49 +00:00
CMakeLists.txt Add CMake dependencies so that LLVM_USED_LIBS order doesn't matter. 2011-02-11 23:46:38 +00:00
CodeGenAction.cpp Re-instate r125819 and r125820 with no functionality change 2011-02-19 23:03:58 +00:00
CodeGenFunction.cpp DebugInfo can be enabled or disabled at function level (e.g. using an attribute). However, at module level it is determined by command line option and the state of command line option does not change during compilation. Make this layering explicit and fix accidental cases where the code generator was checking whether module has debug info enabled instead of checking whether debug info is enabled for this function or not. 2011-03-07 18:45:56 +00:00
CodeGenFunction.h DebugInfo can be enabled or disabled at function level (e.g. using an attribute). However, at module level it is determined by command line option and the state of command line option does not change during compilation. Make this layering explicit and fix accidental cases where the code generator was checking whether module has debug info enabled instead of checking whether debug info is enabled for this function or not. 2011-03-07 18:45:56 +00:00
CodeGenModule.cpp DebugInfo can be enabled or disabled at function level (e.g. using an attribute). However, at module level it is determined by command line option and the state of command line option does not change during compilation. Make this layering explicit and fix accidental cases where the code generator was checking whether module has debug info enabled instead of checking whether debug info is enabled for this function or not. 2011-03-07 18:45:56 +00:00
CodeGenModule.h DebugInfo can be enabled or disabled at function level (e.g. using an attribute). However, at module level it is determined by command line option and the state of command line option does not change during compilation. Make this layering explicit and fix accidental cases where the code generator was checking whether module has debug info enabled instead of checking whether debug info is enabled for this function or not. 2011-03-07 18:45:56 +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 Implement the C++0x deduced 'auto' feature. 2011-02-20 03:19:35 +00:00
CodeGenTypes.h Revert "Add CC_Win64ThisCall and set it in the necessary places." 2011-03-02 21:36:49 +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 For consistency, use llvm::raw_ostream in the rest of the mangle api. 2011-02-11 02:52:17 +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 When we adjust the inline ASM type, we need to take into account an early 2011-03-07 22:47:14 +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!

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