Richard Smith a9b21d22bb Bug fix: do not emit static const local variables with mutable members 13 lat temu
..
ABIInfo.h f0cc2087b1 Add field PaddingType to ABIArgInfo which specifies the type of padding that 13 lat temu
BackendUtil.cpp 6bd17d2f2e Make use of const-correct ParseCommandLineOptions 13 lat temu
CGBlocks.cpp de5d3c7176 Whether an argument is required (in contrast with being an 13 lat temu
CGBlocks.h 6f103ba42c Whenever explicitly activating or deactivating a cleanup, we 13 lat temu
CGBuilder.h df921aef35 Make CGBuilderTy a typedef again; its functionality has been rolled back 15 lat temu
CGBuiltin.cpp 8b418685e9 simplify a bunch of code to use the well-known LLVM IR types computed by CodeGenModule. 13 lat temu
CGCUDANV.cpp a4ae2294b6 CUDA: IR generation support for device stubs 14 lat temu
CGCUDARuntime.cpp 6c0aa5ff6e CUDA: IR generation support for kernel call expressions 14 lat temu
CGCUDARuntime.h a4ae2294b6 CUDA: IR generation support for device stubs 14 lat temu
CGCXX.cpp de5d3c7176 Whether an argument is required (in contrast with being an 13 lat temu
CGCXXABI.cpp de5d3c7176 Whether an argument is required (in contrast with being an 13 lat temu
CGCXXABI.h 4d4e5c1ae8 Split reinterpret_casts of member pointers out from CK_BitCast; this 13 lat temu
CGCall.cpp de5d3c7176 Whether an argument is required (in contrast with being an 13 lat temu
CGCall.h de5d3c7176 Whether an argument is required (in contrast with being an 13 lat temu
CGClass.cpp de5d3c7176 Whether an argument is required (in contrast with being an 13 lat temu
CGCleanup.cpp ab14ae2ab1 Compatability fix for SwitchInst refactoring. 13 lat temu
CGCleanup.h 777d6e56ad Simplify EH control flow by observing that EH scopes form a simple 14 lat temu
CGDebugInfo.cpp 9965deaad4 Reapply r150631: 13 lat temu
CGDebugInfo.h 9965deaad4 Reapply r150631: 13 lat temu
CGDecl.cpp a9b21d22bb Bug fix: do not emit static const local variables with mutable members 13 lat temu
CGDeclCXX.cpp de5d3c7176 Whether an argument is required (in contrast with being an 13 lat temu
CGException.cpp af2771b147 CodeGen: Move EHPersonality from CGException.h into the cpp file, it has no other users. 13 lat temu
CGExpr.cpp de5d3c7176 Whether an argument is required (in contrast with being an 13 lat temu
CGExprAgg.cpp 4d4e5c1ae8 Split reinterpret_casts of member pointers out from CK_BitCast; this 13 lat temu
CGExprCXX.cpp de5d3c7176 Whether an argument is required (in contrast with being an 13 lat temu
CGExprComplex.cpp 4d4e5c1ae8 Split reinterpret_casts of member pointers out from CK_BitCast; this 13 lat temu
CGExprConstant.cpp 4d4e5c1ae8 Split reinterpret_casts of member pointers out from CK_BitCast; this 13 lat temu
CGExprScalar.cpp 4d4e5c1ae8 Split reinterpret_casts of member pointers out from CK_BitCast; this 13 lat temu
CGObjC.cpp de5d3c7176 Whether an argument is required (in contrast with being an 13 lat temu
CGObjCGNU.cpp de5d3c7176 Whether an argument is required (in contrast with being an 13 lat temu
CGObjCMac.cpp de5d3c7176 Whether an argument is required (in contrast with being an 13 lat temu
CGObjCRuntime.cpp de5d3c7176 Whether an argument is required (in contrast with being an 13 lat temu
CGObjCRuntime.h de5d3c7176 Whether an argument is required (in contrast with being an 13 lat temu
CGOpenCLRuntime.cpp 8c25fc584c OpenCL: introduce support for function scope __local variables 14 lat temu
CGOpenCLRuntime.h 8c25fc584c OpenCL: introduce support for function scope __local variables 14 lat temu
CGRTTI.cpp 8b418685e9 simplify a bunch of code to use the well-known LLVM IR types computed by CodeGenModule. 13 lat temu
CGRecordLayout.h d47d3b0cfe clean up forward declarations of raw_ostream to use the new LLVM.h 14 lat temu
CGRecordLayoutBuilder.cpp 89e6e85f1a A base subobject type doesn't make sense for unions; don't try to compute it. Based on patch by Yin Ma. Fixes PR11751. 13 lat temu
CGStmt.cpp 8b418685e9 simplify a bunch of code to use the well-known LLVM IR types computed by CodeGenModule. 13 lat temu
CGVTT.cpp 8b418685e9 simplify a bunch of code to use the well-known LLVM IR types computed by CodeGenModule. 13 lat temu
CGVTables.cpp de5d3c7176 Whether an argument is required (in contrast with being an 13 lat temu
CGVTables.h 24018467dd Move VTable builder to AST 14 lat temu
CGValue.h 9f32a920c6 Reuse forAddr to create ignored AggValueSlots. 13 lat temu
CMakeLists.txt a28c1df2cc Add missing dependency to unbreak the CMake build 13 lat temu
CodeGenAction.cpp 6f42b62b61 Basic: import OwningPtr<> into clang namespace 13 lat temu
CodeGenFunction.cpp 27dd7d962b Rework the Sema/AST/IRgen dance for the lambda closure type's 13 lat temu
CodeGenFunction.h 27dd7d962b Rework the Sema/AST/IRgen dance for the lambda closure type's 13 lat temu
CodeGenModule.cpp a9b21d22bb Bug fix: do not emit static const local variables with mutable members 13 lat temu
CodeGenModule.h a9b21d22bb Bug fix: do not emit static const local variables with mutable members 13 lat temu
CodeGenTBAA.cpp d7a3e2c5f6 Revert my patches which removed Diagnostic.h includes by moving some operator overloads out of line. 13 lat temu
CodeGenTBAA.h 686775deca now that we have a centralized place to do so, add some using declarations for 14 lat temu
CodeGenTypes.cpp de5d3c7176 Whether an argument is required (in contrast with being an 13 lat temu
CodeGenTypes.h de5d3c7176 Whether an argument is required (in contrast with being an 13 lat temu
ItaniumCXXABI.cpp de5d3c7176 Whether an argument is required (in contrast with being an 13 lat temu
Makefile 9638eef7e3 BUILD_ARCHIVE is the default for libraries, no need to set it. 15 lat temu
MicrosoftCXXABI.cpp 5f9e272e63 remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports 14 lat temu
ModuleBuilder.cpp 6f42b62b61 Basic: import OwningPtr<> into clang namespace 13 lat temu
README.txt f1c8380d26 These IRgen improvements have been done. 16 lat temu
TargetInfo.cpp de5d3c7176 Whether an argument is required (in contrast with being an 13 lat temu
TargetInfo.h de5d3c7176 Whether an argument is required (in contrast with being an 13 lat temu

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!

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