Name Last Update
..
ABIInfo.h Loading commit data...
Address.h Loading commit data...
BackendUtil.cpp Loading commit data...
CGAtomic.cpp Loading commit data...
CGBlocks.cpp Loading commit data...
CGBlocks.h Loading commit data...
CGBuilder.h Loading commit data...
CGBuiltin.cpp Loading commit data...
CGCUDANV.cpp Loading commit data...
CGCUDARuntime.cpp Loading commit data...
CGCUDARuntime.h Loading commit data...
CGCXX.cpp Loading commit data...
CGCXXABI.cpp Loading commit data...
CGCXXABI.h Loading commit data...
CGCall.cpp Loading commit data...
CGCall.h Loading commit data...
CGClass.cpp Loading commit data...
CGCleanup.cpp Loading commit data...
CGCleanup.h Loading commit data...
CGCoroutine.cpp Loading commit data...
CGDebugInfo.cpp Loading commit data...
CGDebugInfo.h Loading commit data...
CGDecl.cpp Loading commit data...
CGDeclCXX.cpp Loading commit data...
CGException.cpp Loading commit data...
CGExpr.cpp Loading commit data...
CGExprAgg.cpp Loading commit data...
CGExprCXX.cpp Loading commit data...
CGExprComplex.cpp Loading commit data...
CGExprConstant.cpp Loading commit data...
CGExprScalar.cpp Loading commit data...
CGGPUBuiltin.cpp Loading commit data...
CGLoopInfo.cpp Loading commit data...
CGLoopInfo.h Loading commit data...
CGNonTrivialStruct.cpp Loading commit data...
CGObjC.cpp Loading commit data...
CGObjCGNU.cpp Loading commit data...
CGObjCMac.cpp Loading commit data...
CGObjCRuntime.cpp Loading commit data...
CGObjCRuntime.h Loading commit data...
CGOpenCLRuntime.cpp Loading commit data...
CGOpenCLRuntime.h Loading commit data...
CGOpenMPRuntime.cpp Loading commit data...
CGOpenMPRuntime.h Loading commit data...
CGOpenMPRuntimeNVPTX.cpp Loading commit data...
CGOpenMPRuntimeNVPTX.h Loading commit data...
CGRecordLayout.h Loading commit data...
CGRecordLayoutBuilder.cpp Loading commit data...
CGStmt.cpp Loading commit data...
CGStmtOpenMP.cpp Loading commit data...
CGVTT.cpp Loading commit data...
CGVTables.cpp Loading commit data...
CGVTables.h Loading commit data...
CGValue.h Loading commit data...
CMakeLists.txt Loading commit data...
CodeGenABITypes.cpp Loading commit data...
CodeGenAction.cpp Loading commit data...
CodeGenFunction.cpp Loading commit data...
CodeGenFunction.h Loading commit data...
CodeGenModule.cpp Loading commit data...
CodeGenModule.h Loading commit data...
CodeGenPGO.cpp Loading commit data...
CodeGenPGO.h Loading commit data...
CodeGenTBAA.cpp Loading commit data...
CodeGenTBAA.h Loading commit data...
CodeGenTypeCache.h Loading commit data...
CodeGenTypes.cpp Loading commit data...
CodeGenTypes.h Loading commit data...
ConstantEmitter.h Loading commit data...
ConstantInitBuilder.cpp Loading commit data...
CoverageMappingGen.cpp Loading commit data...
CoverageMappingGen.h Loading commit data...
EHScopeStack.h Loading commit data...
ItaniumCXXABI.cpp Loading commit data...
MacroPPCallbacks.cpp Loading commit data...
MacroPPCallbacks.h Loading commit data...
MicrosoftCXXABI.cpp Loading commit data...
ModuleBuilder.cpp Loading commit data...
ObjectFilePCHContainerOperations.cpp Loading commit data...
PatternInit.cpp Loading commit data...
PatternInit.h Loading commit data...
README.txt Loading commit data...
SanitizerMetadata.cpp Loading commit data...
SanitizerMetadata.h Loading commit data...
SwiftCallingConv.cpp Loading commit data...
TargetInfo.cpp Loading commit data...
TargetInfo.h Loading commit data...
VarBypassDetector.cpp Loading commit data...
VarBypassDetector.h Loading commit data...
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!

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