Richard Smith 38c1f7c254 Properly handle instantiation-dependent array bounds. 5 年之前
..
ABIInfo.h 324f918438 Update the file headers across all of the LLVM projects in the monorepo 6 年之前
Address.h 324f918438 Update the file headers across all of the LLVM projects in the monorepo 6 年之前
BackendUtil.cpp 95e1920019 [TimeProfiler] Fix "OptModule" section and add new "Backend" sections 5 年之前
CGAtomic.cpp 38c1f7c254 Properly handle instantiation-dependent array bounds. 5 年之前
CGBlocks.cpp e870496ea6 [CodeGen][ObjC] Annotate retain-agnostic ObjC globals with attribute 6 年之前
CGBlocks.h 324f918438 Update the file headers across all of the LLVM projects in the monorepo 6 年之前
CGBuilder.h ce7674d7be Fix parameter name comments using clang-tidy. NFC. 6 年之前
CGBuiltin.cpp 38c1f7c254 Properly handle instantiation-dependent array bounds. 5 年之前
CGCUDANV.cpp 4eef7a8ad0 [Alignment][Clang][NFC] Add CharUnits::getAsAlign 5 年之前
CGCUDARuntime.cpp 324f918438 Update the file headers across all of the LLVM projects in the monorepo 6 年之前
CGCUDARuntime.h 5e6563143c [HIP] Add the interface deriving the stub name of device kernels. 6 年之前
CGCXX.cpp 84d475a5ed Silence static analyzer getAs<RecordType> null dereference warnings. NFCI. 5 年之前
CGCXXABI.cpp 84d475a5ed Silence static analyzer getAs<RecordType> null dereference warnings. NFCI. 5 年之前
CGCXXABI.h 2eb4788e8c Improve code generation for thread_local variables: 6 年之前
CGCall.cpp 4eef7a8ad0 [Alignment][Clang][NFC] Add CharUnits::getAsAlign 5 年之前
CGCall.h 6d763e31d2 [opaque pointer types] Make EmitCall pass Function Types to 6 年之前
CGClass.cpp 84d475a5ed Silence static analyzer getAs<RecordType> null dereference warnings. NFCI. 5 年之前
CGCleanup.cpp 4eef7a8ad0 [Alignment][Clang][NFC] Add CharUnits::getAsAlign 5 年之前
CGCleanup.h 324f918438 Update the file headers across all of the LLVM projects in the monorepo 6 年之前
CGCoroutine.cpp ce7674d7be Fix parameter name comments using clang-tidy. NFC. 6 年之前
CGDebugInfo.cpp 38c1f7c254 Properly handle instantiation-dependent array bounds. 5 年之前
CGDebugInfo.h eb045be428 Revert "[CGDebugInfo] Simplify EmitFunctionDecl parameters, NFC" 6 年之前
CGDecl.cpp 4eef7a8ad0 [Alignment][Clang][NFC] Add CharUnits::getAsAlign 5 年之前
CGDeclCXX.cpp 39625a79bf For P0784R7: compute whether a variable has constant destruction if it 5 年之前
CGException.cpp ed5c51707d [WebAssembly] Add -fwasm-exceptions for wasm EH 6 年之前
CGExpr.cpp 4eef7a8ad0 [Alignment][Clang][NFC] Add CharUnits::getAsAlign 5 年之前
CGExprAgg.cpp 4eef7a8ad0 [Alignment][Clang][NFC] Add CharUnits::getAsAlign 5 年之前
CGExprCXX.cpp 4eef7a8ad0 [Alignment][Clang][NFC] Add CharUnits::getAsAlign 5 年之前
CGExprComplex.cpp 159cd770e3 [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast 6 年之前
CGExprConstant.cpp 4eef7a8ad0 [Alignment][Clang][NFC] Add CharUnits::getAsAlign 5 年之前
CGExprScalar.cpp 84d475a5ed Silence static analyzer getAs<RecordType> null dereference warnings. NFCI. 5 年之前
CGGPUBuiltin.cpp 324f918438 Update the file headers across all of the LLVM projects in the monorepo 6 年之前
CGLoopInfo.cpp 44ed889c4d Revert r372082 "[Clang] Pragma vectorize_width() implies vectorize(enable)" 6 年之前
CGLoopInfo.h e03316caa0 Don't keep stale pointers to LoopInfos. 6 年之前
CGNonTrivialStruct.cpp e63380d34e Do a sweep of symbol internalization. NFC. 6 年之前
CGObjC.cpp 38c1f7c254 Properly handle instantiation-dependent array bounds. 5 年之前
CGObjCGNU.cpp 4eef7a8ad0 [Alignment][Clang][NFC] Add CharUnits::getAsAlign 5 年之前
CGObjCMac.cpp 4eef7a8ad0 [Alignment][Clang][NFC] Add CharUnits::getAsAlign 5 年之前
CGObjCRuntime.cpp 679ab5f711 [opaque pointer types] Pass function types for runtime function calls. 6 年之前
CGObjCRuntime.h 679ab5f711 [opaque pointer types] Pass function types for runtime function calls. 6 年之前
CGOpenCLRuntime.cpp eae71f8d05 [OpenCL] Simplify LLVM IR generated for OpenCL blocks 6 年之前
CGOpenCLRuntime.h eae71f8d05 [OpenCL] Simplify LLVM IR generated for OpenCL blocks 6 年之前
CGOpenMPRuntime.cpp 38c1f7c254 Properly handle instantiation-dependent array bounds. 5 年之前
CGOpenMPRuntime.h 53f33d5a65 [clang][OpenMP][NFC] #include GlobalDecl.h to avoid incomplete class type 5 年之前
CGOpenMPRuntimeNVPTX.cpp 38c1f7c254 Properly handle instantiation-dependent array bounds. 5 年之前
CGOpenMPRuntimeNVPTX.h 830db7a928 [OpenMP] Add support for registering requires directives with the runtime 6 年之前
CGRecordLayout.h 324f918438 Update the file headers across all of the LLVM projects in the monorepo 6 年之前
CGRecordLayoutBuilder.cpp 31de5dab92 P0840R2: support for [[no_unique_address]] attribute 6 年之前
CGStmt.cpp 99b2bc4f95 [CodeGen]: fix error message for "=r" asm constraint 6 年之前
CGStmtOpenMP.cpp 38c1f7c254 Properly handle instantiation-dependent array bounds. 5 年之前
CGVTT.cpp 324f918438 Update the file headers across all of the LLVM projects in the monorepo 6 年之前
CGVTables.cpp 0a08067e20 CGVTables - silence static analyzer getAs<FunctionProtoType> null dereference warnings. NFCI. 5 年之前
CGVTables.h 324f918438 Update the file headers across all of the LLVM projects in the monorepo 6 年之前
CGValue.h 324f918438 Update the file headers across all of the LLVM projects in the monorepo 6 年之前
CMakeLists.txt 8942d642f0 Make CodeGen depend on ASTMatchers 6 年之前
CodeGenABITypes.cpp ce7674d7be Fix parameter name comments using clang-tidy. NFC. 6 年之前
CodeGenAction.cpp 211daf9ad4 Reland "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM" 6 年之前
CodeGenFunction.cpp 4eef7a8ad0 [Alignment][Clang][NFC] Add CharUnits::getAsAlign 5 年之前
CodeGenFunction.h 4eef7a8ad0 [Alignment][Clang][NFC] Add CharUnits::getAsAlign 5 年之前
CodeGenModule.cpp 38c1f7c254 Properly handle instantiation-dependent array bounds. 5 年之前
CodeGenModule.h a209544fdd C++ DR712 and others: handle non-odr-use resulting from an lvalue-to-rvalue conversion applied to a member access or similar not-quite-trivial lvalue expression. 6 年之前
CodeGenPGO.cpp 49a6b09101 [Clang] Migrate llvm::make_unique to std::make_unique 6 年之前
CodeGenPGO.h 6aa1f42be9 Fix uninitialized variable warning in CodeGenPGO constructor. NFCI. 5 年之前
CodeGenTBAA.cpp 168f519698 Fix TBAA representation for zero-sized fields and unnamed bit-fields. 6 年之前
CodeGenTBAA.h 324f918438 Update the file headers across all of the LLVM projects in the monorepo 6 年之前
CodeGenTypeCache.h 324f918438 Update the file headers across all of the LLVM projects in the monorepo 6 年之前
CodeGenTypes.cpp 84d475a5ed Silence static analyzer getAs<RecordType> null dereference warnings. NFCI. 5 年之前
CodeGenTypes.h 3a3e9339ec IRGen: Remove StructorType; thread GlobalDecl through more code. NFCI. 6 年之前
ConstantEmitter.h 324f918438 Update the file headers across all of the LLVM projects in the monorepo 6 年之前
ConstantInitBuilder.cpp 4eef7a8ad0 [Alignment][Clang][NFC] Add CharUnits::getAsAlign 5 年之前
CoverageMappingGen.cpp 4eef7a8ad0 [Alignment][Clang][NFC] Add CharUnits::getAsAlign 5 年之前
CoverageMappingGen.h 324f918438 Update the file headers across all of the LLVM projects in the monorepo 6 年之前
EHScopeStack.h f724ed4411 Replace llvm::integer_sequence and friends with the C++14 standard version 6 年之前
ItaniumCXXABI.cpp 4eef7a8ad0 [Alignment][Clang][NFC] Add CharUnits::getAsAlign 5 年之前
MacroPPCallbacks.cpp 324f918438 Update the file headers across all of the LLVM projects in the monorepo 6 年之前
MacroPPCallbacks.h 324f918438 Update the file headers across all of the LLVM projects in the monorepo 6 年之前
MicrosoftCXXABI.cpp 4eef7a8ad0 [Alignment][Clang][NFC] Add CharUnits::getAsAlign 5 年之前
ModuleBuilder.cpp 3da9ca444f [Clang] Use -main-file-name for source filename if not set 5 年之前
ObjectFilePCHContainerOperations.cpp 4eef7a8ad0 [Alignment][Clang][NFC] Add CharUnits::getAsAlign 5 年之前
PatternInit.cpp 378f8bc374 CodeGet: Init 32bit pointers with 0xFFFFFFFF 6 年之前
PatternInit.h eae000b425 Variable auto-init: also auto-init alloca 6 年之前
README.txt f1c8380d26 These IRgen improvements have been done. 16 年之前
SanitizerMetadata.cpp 647bdd3207 ARM MTE stack sanitizer. 6 年之前
SanitizerMetadata.h 324f918438 Update the file headers across all of the LLVM projects in the monorepo 6 年之前
SwiftCallingConv.cpp 324f918438 Update the file headers across all of the LLVM projects in the monorepo 6 年之前
TargetInfo.cpp 84d475a5ed Silence static analyzer getAs<RecordType> null dereference warnings. NFCI. 5 年之前
TargetInfo.h 5e43603aaa [OpenCL][PR41727] Prevent ICE on global dtors 6 年之前
VarBypassDetector.cpp 324f918438 Update the file headers across all of the LLVM projects in the monorepo 6 年之前
VarBypassDetector.h 324f918438 Update the file headers across all of the LLVM projects in the monorepo 6 年之前

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!

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