You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jianglk.darker 7ee447c011
v811_spc009_project
4 months ago
..
ABIInfo.h v811_spc009_project 4 months ago
Address.h v811_spc009_project 4 months ago
BackendUtil.cpp v811_spc009_project 4 months ago
CGAtomic.cpp v811_spc009_project 4 months ago
CGBlocks.cpp v811_spc009_project 4 months ago
CGBlocks.h v811_spc009_project 4 months ago
CGBuilder.h v811_spc009_project 4 months ago
CGBuiltin.cpp v811_spc009_project 4 months ago
CGCUDANV.cpp v811_spc009_project 4 months ago
CGCUDARuntime.cpp v811_spc009_project 4 months ago
CGCUDARuntime.h v811_spc009_project 4 months ago
CGCXX.cpp v811_spc009_project 4 months ago
CGCXXABI.cpp v811_spc009_project 4 months ago
CGCXXABI.h v811_spc009_project 4 months ago
CGCall.cpp v811_spc009_project 4 months ago
CGCall.h v811_spc009_project 4 months ago
CGClass.cpp v811_spc009_project 4 months ago
CGCleanup.cpp v811_spc009_project 4 months ago
CGCleanup.h v811_spc009_project 4 months ago
CGCoroutine.cpp v811_spc009_project 4 months ago
CGDebugInfo.cpp v811_spc009_project 4 months ago
CGDebugInfo.h v811_spc009_project 4 months ago
CGDecl.cpp v811_spc009_project 4 months ago
CGDeclCXX.cpp v811_spc009_project 4 months ago
CGException.cpp v811_spc009_project 4 months ago
CGExpr.cpp v811_spc009_project 4 months ago
CGExprAgg.cpp v811_spc009_project 4 months ago
CGExprCXX.cpp v811_spc009_project 4 months ago
CGExprComplex.cpp v811_spc009_project 4 months ago
CGExprConstant.cpp v811_spc009_project 4 months ago
CGExprScalar.cpp v811_spc009_project 4 months ago
CGGPUBuiltin.cpp v811_spc009_project 4 months ago
CGLoopInfo.cpp v811_spc009_project 4 months ago
CGLoopInfo.h v811_spc009_project 4 months ago
CGNonTrivialStruct.cpp v811_spc009_project 4 months ago
CGObjC.cpp v811_spc009_project 4 months ago
CGObjCGNU.cpp v811_spc009_project 4 months ago
CGObjCMac.cpp v811_spc009_project 4 months ago
CGObjCRuntime.cpp v811_spc009_project 4 months ago
CGObjCRuntime.h v811_spc009_project 4 months ago
CGOpenCLRuntime.cpp v811_spc009_project 4 months ago
CGOpenCLRuntime.h v811_spc009_project 4 months ago
CGOpenMPRuntime.cpp v811_spc009_project 4 months ago
CGOpenMPRuntime.h v811_spc009_project 4 months ago
CGOpenMPRuntimeAMDGCN.cpp v811_spc009_project 4 months ago
CGOpenMPRuntimeAMDGCN.h v811_spc009_project 4 months ago
CGOpenMPRuntimeGPU.cpp v811_spc009_project 4 months ago
CGOpenMPRuntimeGPU.h v811_spc009_project 4 months ago
CGOpenMPRuntimeNVPTX.cpp v811_spc009_project 4 months ago
CGOpenMPRuntimeNVPTX.h v811_spc009_project 4 months ago
CGRecordLayout.h v811_spc009_project 4 months ago
CGRecordLayoutBuilder.cpp v811_spc009_project 4 months ago
CGStmt.cpp v811_spc009_project 4 months ago
CGStmtOpenMP.cpp v811_spc009_project 4 months ago
CGVTT.cpp v811_spc009_project 4 months ago
CGVTables.cpp v811_spc009_project 4 months ago
CGVTables.h v811_spc009_project 4 months ago
CGValue.h v811_spc009_project 4 months ago
CMakeLists.txt v811_spc009_project 4 months ago
CodeGenABITypes.cpp v811_spc009_project 4 months ago
CodeGenAction.cpp v811_spc009_project 4 months ago
CodeGenFunction.cpp v811_spc009_project 4 months ago
CodeGenFunction.h v811_spc009_project 4 months ago
CodeGenModule.cpp v811_spc009_project 4 months ago
CodeGenModule.h v811_spc009_project 4 months ago
CodeGenPGO.cpp v811_spc009_project 4 months ago
CodeGenPGO.h v811_spc009_project 4 months ago
CodeGenTBAA.cpp v811_spc009_project 4 months ago
CodeGenTBAA.h v811_spc009_project 4 months ago
CodeGenTypeCache.h v811_spc009_project 4 months ago
CodeGenTypes.cpp v811_spc009_project 4 months ago
CodeGenTypes.h v811_spc009_project 4 months ago
ConstantEmitter.h v811_spc009_project 4 months ago
ConstantInitBuilder.cpp v811_spc009_project 4 months ago
CoverageMappingGen.cpp v811_spc009_project 4 months ago
CoverageMappingGen.h v811_spc009_project 4 months ago
EHScopeStack.h v811_spc009_project 4 months ago
ItaniumCXXABI.cpp v811_spc009_project 4 months ago
MacroPPCallbacks.cpp v811_spc009_project 4 months ago
MacroPPCallbacks.h v811_spc009_project 4 months ago
MicrosoftCXXABI.cpp v811_spc009_project 4 months ago
ModuleBuilder.cpp v811_spc009_project 4 months ago
ObjectFilePCHContainerOperations.cpp v811_spc009_project 4 months ago
PatternInit.cpp v811_spc009_project 4 months ago
PatternInit.h v811_spc009_project 4 months ago
README.txt v811_spc009_project 4 months ago
SanitizerMetadata.cpp v811_spc009_project 4 months ago
SanitizerMetadata.h v811_spc009_project 4 months ago
SwiftCallingConv.cpp v811_spc009_project 4 months ago
TargetInfo.cpp v811_spc009_project 4 months ago
TargetInfo.h v811_spc009_project 4 months ago
VarBypassDetector.cpp v811_spc009_project 4 months ago
VarBypassDetector.h v811_spc009_project 4 months ago

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!

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