LTS-20.03分支llvm目前为7.0.0,为2018年版本,较为老旧,请进行差异分析,评估升级策略,建议升级到10.0.1.
Hey @syyhao, Welcome to openEuler Community.
All of the projects in openEuler Community are maintained by @openeuler-ci-bot.
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at https://gitee.com/openeuler/community/blob/master/en/sig-infrastructure/command.md to find the details.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
差异分类 | 差异项 | 影响评估 |
---|---|---|
特性变化 | AArch64:llvm8.0.0开始支持Tiny代码模型;添加了对Speculative Load Hardening的支持;添加了对arch_extension组件的支持; AArch64:llvm9.0.0增加了对Armv8.1-M架构的Assembly-level支持;为Cortex-M4增加了管道模型;支持M-profile低开销环的代码生成 AArch64:llvm10.0.0增加了对Cortex-A65,Cortex-A65AE, Neoverse E1和Neoverse N1的支持。增加了对-fpatchable-function-entry的支持。 X86:llvm8.0.0增加AMD bdver2 CPU的机器模型;新的AVX512F聚集和分散内部函数;ADCX指令将不在发送,因为该指令比传统ADC指令并无优势,还增加了代码大小。 X86:llvm8.0.0通过-X86-discriminate-memops启用支持使用内存操作数精确标识X86指令 X86:llvm10.0.0中低于128位的向量类型v2i32,v4i16,v2i16,v8i8,v4i8和v2i8现在存储在xmm寄存器的低位,而高位未定义; 在后续的skylake-avx512以及intel类cpu -mprefer-vector-width=256是默认选项;废弃intel MPX指令的mpx特性标记;移除fast-partial-ymm-or-zmm-write ORC(按请求编译) JIT API已更新维支持并发编译,lli工具已经更新为使用并发的ORC API,老的ORCv1 JIT API以及在llvm9.0.0被弃用 llvm9.0.0会将有问题代码移到常量内存,这一优化可能会对一些C/C++代码产生问题,比如希望移除掉const的属性,可能会产生未定义行为。 LLVM IR的修改: llvm8.0.0中,函数属性speculative_load_hardening被引入,用来表明Speculative Load Hardening必须使能 llvm9.0.0中,增加了immarg参数属性,表示参数必须为简单的常量,避免可能的错误编译;删除了两个全局变量@llvm.global_ctors和@llvm.global_dtors; atomicrmw xchg允许浮点数类型且支持fadd和fsub;byval数显目前可以增加一个类型参数:byval(),如果存在,就必须与参数的pointee类型相同。 llvm10.0.0中,未命名的函数参数将在定义中显示其自动生成的名称;新增freeze指令 其它修改: 对RISCV支持:llvm9.0.0默认开启对RISCV 架构相关支持,不需要再用LLVM_EXPERIMENTAL_TARGETS_TO_BUILD手动打开。后端对带有MAFDC标准扩展的RV32I和RV64I基本RISC-V指令集变体具有完整的代码生成支持。 对RISCV支持:在llvm10.0.0有较多新增特性以及bugfix ORC(按请求编译) JIT API已更新维支持并发编译,lli工具已经更新为使用并发的ORC API,老的ORCv1 JIT API以及在llvm9.0.0被弃用 llvm8.0.0中add_llvm_loadable_module CMake 宏移除 llvm10.0.0中ISD::FP_ROUND_INREG相关代码移除了;启用MemorySSA作为循环依赖项;BasicBlockPass, BBPassManager及其相关使用都被删除了;LLVM_BUILD_LLVM_DYLIB和LLVM_LINK_LLVM_DYLIB的CMake选项在Windows上不再有效 Callbacks被添加到命令行选项,可以用来选择性使能其它选项;no-frame-pointer-elim和no-frame-pointer-elim-non-leaf函数属性被frame-pointer提代了。新的matrix math被添加到了llvm里面。 C预约和Go语言debuginfo API接口LLVMDIBuilderCreateTypedef已更新为包括一个额外的参数AlignInBits |
部分cmake宏删除,以及ORCv1 JIT API弃用,如果使用到需要用户进行适配,总体影响较小 |
配置文件 | 无 | |
ABI差异 | 动态库删除: /usr/lib64/BugpointPasses.so /usr/lib64/LLVMHello.so /usr/lib64/TestPlugin.so 动态库新增: /usr/lib64/libRemarks.so /usr/lib64/libRemarks.so.10 动态库版本号变更: /usr/lib64/libLLVM-7.so -> /usr/lib64/libLLVM-10.so /usr/lib64/libLLVM-7.0.0.so -> /usr/lib64/libLLVM-10.0.1.so /usr/lib64/libLTO.so.7 -> /usr/lib64/libLTO.so.10 动态库接口变更: libLTO.so.7 -> libLTO.so.10 67 Removed functions: 'function void lto_api_version()' {lto_api_version@@LLVM_7} 'function void lto_codegen_add_module()' {lto_codegen_add_module@@LLVM_7} 'function void lto_codegen_add_must_preserve_symbol()' {lto_codegen_add_must_preserve_symbol@@LLVM_7} 'function void lto_codegen_compile()' {lto_codegen_compile@@LLVM_7} 'function void lto_codegen_compile_optimized()' {lto_codegen_compile_optimized@@LLVM_7} 'function void lto_codegen_compile_to_file()' {lto_codegen_compile_to_file@@LLVM_7} 'function void lto_codegen_create()' {lto_codegen_create@@LLVM_7} 'function void lto_codegen_create_in_local_context()' {lto_codegen_create_in_local_context@@LLVM_7} 'function void lto_codegen_debug_options()' {lto_codegen_debug_options@@LLVM_7} 'function void lto_codegen_dispose()' {lto_codegen_dispose@@LLVM_7} 'function void lto_codegen_optimize()' {lto_codegen_optimize@@LLVM_7} 'function void lto_codegen_set_assembler_args()' {lto_codegen_set_assembler_args@@LLVM_7} 'function void lto_codegen_set_assembler_path()' {lto_codegen_set_assembler_path@@LLVM_7} 'function void lto_codegen_set_cpu()' {lto_codegen_set_cpu@@LLVM_7} 'function void lto_codegen_set_debug_model()' {lto_codegen_set_debug_model@@LLVM_7} 'function void lto_codegen_set_diagnostic_handler()' {lto_codegen_set_diagnostic_handler@@LLVM_7} 'function void lto_codegen_set_module()' {lto_codegen_set_module@@LLVM_7} 'function void lto_codegen_set_pic_model()' {lto_codegen_set_pic_model@@LLVM_7} 'function void lto_codegen_set_should_embed_uselists()' {lto_codegen_set_should_embed_uselists@@LLVM_7} 'function void lto_codegen_set_should_internalize()' {lto_codegen_set_should_internalize@@LLVM_7} 'function void lto_codegen_write_merged_modules()' {lto_codegen_write_merged_modules@@LLVM_7} 'function void lto_get_error_message()' {lto_get_error_message@@LLVM_7} 'function void lto_get_version()' {lto_get_version@@LLVM_7} 'function void lto_initialize_disassembler()' {lto_initialize_disassembler@@LLVM_7} 'function void lto_module_create()' {lto_module_create@@LLVM_7} 'function void lto_module_create_from_fd()' {lto_module_create_from_fd@@LLVM_7} 'function void lto_module_create_from_fd_at_offset()' {lto_module_create_from_fd_at_offset@@LLVM_7} 'function void lto_module_create_from_memory()' {lto_module_create_from_memory@@LLVM_7} 'function void lto_module_create_from_memory_with_path()' {lto_module_create_from_memory_with_path@@LLVM_7} 'function void lto_module_create_in_codegen_context()' {lto_module_create_in_codegen_context@@LLVM_7} 'function void lto_module_create_in_local_context()' {lto_module_create_in_local_context@@LLVM_7} 'function void lto_module_dispose()' {lto_module_dispose@@LLVM_7} 'function void lto_module_get_linkeropts()' {lto_module_get_linkeropts@@LLVM_7} 'function void lto_module_get_num_symbols()' {lto_module_get_num_symbols@@LLVM_7} 'function void lto_module_get_symbol_attribute()' {lto_module_get_symbol_attribute@@LLVM_7} 'function void lto_module_get_symbol_name()' {lto_module_get_symbol_name@@LLVM_7} 'function void lto_module_get_target_triple()' {lto_module_get_target_triple@@LLVM_7} 'function void lto_module_has_objc_category()' {lto_module_has_objc_category@@LLVM_7} 'function void lto_module_is_object_file()' {lto_module_is_object_file@@LLVM_7} 'function void lto_module_is_object_file_for_target()' {lto_module_is_object_file_for_target@@LLVM_7} 'function void lto_module_is_object_file_in_memory()' {lto_module_is_object_file_in_memory@@LLVM_7} 'function void lto_module_is_object_file_in_memory_for_target()' {lto_module_is_object_file_in_memory_for_target@@LLVM_7} 'function void lto_module_is_thinlto()' {lto_module_is_thinlto@@LLVM_7} 'function void lto_module_set_target_triple()' {lto_module_set_target_triple@@LLVM_7} 'function void thinlto_codegen_add_cross_referenced_symbol()' {thinlto_codegen_add_cross_referenced_symbol@@LLVM_7} 'function void thinlto_codegen_add_module()' {thinlto_codegen_add_module@@LLVM_7} 'function void thinlto_codegen_add_must_preserve_symbol()' {thinlto_codegen_add_must_preserve_symbol@@LLVM_7} 'function void thinlto_codegen_disable_codegen()' {thinlto_codegen_disable_codegen@@LLVM_7} 'function void thinlto_codegen_dispose()' {thinlto_codegen_dispose@@LLVM_7} 'function void thinlto_codegen_process()' {thinlto_codegen_process@@LLVM_7} 'function void thinlto_codegen_set_cache_dir()' {thinlto_codegen_set_cache_dir@@LLVM_7} 'function void thinlto_codegen_set_cache_entry_expiration()' {thinlto_codegen_set_cache_entry_expiration@@LLVM_7} 'function void thinlto_codegen_set_cache_pruning_interval()' {thinlto_codegen_set_cache_pruning_interval@@LLVM_7} 'function void thinlto_codegen_set_cache_size_bytes()' {thinlto_codegen_set_cache_size_bytes@@LLVM_7} 'function void thinlto_codegen_set_cache_size_files()' {thinlto_codegen_set_cache_size_files@@LLVM_7} 'function void thinlto_codegen_set_codegen_only()' {thinlto_codegen_set_codegen_only@@LLVM_7} 'function void thinlto_codegen_set_cpu()' {thinlto_codegen_set_cpu@@LLVM_7} 'function void thinlto_codegen_set_final_cache_size_relative_to_available_space()' {thinlto_codegen_set_final_cache_size_relative_to_available_space@@LLVM_7} 'function void thinlto_codegen_set_pic_model()' {thinlto_codegen_set_pic_model@@LLVM_7} 'function void thinlto_codegen_set_savetemps_dir()' {thinlto_codegen_set_savetemps_dir@@LLVM_7} 'function void thinlto_create_codegen()' {thinlto_create_codegen@@LLVM_7} 'function void thinlto_debug_options()' {thinlto_debug_options@@LLVM_7} 'function void thinlto_module_get_num_object_files()' {thinlto_module_get_num_object_files@@LLVM_7} 'function void thinlto_module_get_num_objects()' {thinlto_module_get_num_objects@@LLVM_7} 'function void thinlto_module_get_object()' {thinlto_module_get_object@@LLVM_7} 'function void thinlto_module_get_object_file()' {thinlto_module_get_object_file@@LLVM_7} 'function void thinlto_set_generated_objects_dir()' {thinlto_set_generated_objects_dir@@LLVM_7} 7 Added functions: 'function void lto_codegen_debug_options_array()' {lto_codegen_debug_options_array@@LLVM_10} 'function void lto_input_create()' {lto_input_create@@LLVM_10} 'function void lto_input_dispose()' {lto_input_dispose@@LLVM_10} 'function void lto_input_get_dependent_library()' {lto_input_get_dependent_library@@LLVM_10} 'function void lto_input_get_num_dependent_libraries()' {lto_input_get_num_dependent_libraries@@LLVM_10} 'function void lto_runtime_lib_symbols_list()' {lto_runtime_lib_symbols_list@@LLVM_10} 'function void thinlto_codegen_set_cache_size_megabytes()' {thinlto_codegen_set_cache_size_megabytes@@LLVM_10} LLVMgold.so 1 Removed function: 'function void onload()' {onload@@LLVM_7} 静态库删除(默认路径/usr/lib64/): libLLVMAArch64AsmPrinter.a libLLVMAMDGPUAsmPrinter.a libLLVMBPFAsmPrinter.a 头文件删除(默认路径/usr/include/llvm/): ADT/VariadicFunction.h Analysis/IndirectCallSiteVisitor.h Bitcode/BitCodes.h CodeGen/GCs.h DebugInfo/PDB/Native/NativeBuiltinSymbol.h DebugInfo/PDB/Native/NativeEnumSymbol.h IR/DomTreeUpdater.h IR/TypeBuilder.h MC/MCAnalysis MC/MCCodePadder.h Object/RelocVisitor.h Support/JamCRC.h Support/MutexGuard.h Support/Options.h Support/UniqueLock.h Utils/OrderedInstructions.h 头文件变更: Analysis/IndirectCallVisitor.h -> Analysis/IndirectCallSiteVisitor.h Bitcode/BitCodes.h -> Bitstream/BitCodes.h Bitcode/BitstreamReader.h -> Bitstream/BitstreamReader.h Bitcode/BitstreamWriter.h -> Bitstream/BitstreamWriter.h Orc/RPCSerialization.h -> Orc/RPC/RPCSerialization.h Orc/RPCUtils.h -> Orc/RPC/RPCUtils.h Orc/RawByteChannel.h -> Orc/RPC/RawByteChannel.h 头文件内部函数变更: usr/include/llvm-c/Core.h:LLVM_FOR_EACH_VALUE_SUBCLASS(macro)宏删除macro(TerminatorInst),删除LLVMValueRef LLVMMDStringInContext(LLVMContextRef C, const char *Str,unsigned SLen);删除LLVMValueRef LLVMMDString(const char *Str, unsigned SLen); usr/include/llvm-c/Core.h:LLVMValueRef LLVMMDNodeInContext(LLVMContextRef C, LLVMValueRef *Vals,unsigned Count)变更为LLVMMetadataRef LLVMMDNodeInContext2(LLVMContextRef C, LLVMMetadataRef *MDs,size_t Count); usr/include/llvm-c/Core.h:删除void LLVMSetInstDebugLocation(LLVMBuilderRef Builder, LLVMValueRef Inst); usr/include/llvm-c/Core.h:Error runThinLTO(AddStreamFn AddStream, NativeObjectCache Cache)变更为Error runThinLTO(AddStreamFn AddStream, NativeObjectCache Cache,const DenseSetGlobalValue::GUID &GUIDPreservedSymbols); /usr/include/llvm-c/DebugInfo.h:LLVMDIBuilderCreateBasicType新增参数LLVMDIFlags Flags,LLVMDIBuilderCreateTypedef新增参数uint32_t AlignInBits /usr/include/llvm-c/Object.h:删除LLVMObjectFileRef LLVMCreateObjectFile(LLVMMemoryBufferRef MemBuf);删除void LLVMDisposeObjectFile(LLVMObjectFileRef ObjectFile);删除LLVMSectionIteratorRef LLVMGetSections(LLVMObjectFileRef ObjectFile); /usr/include/llvm-c/Object.h:删除void LLVMDisposeSectionIterator(LLVMSectionIteratorRef SI);删除LLVMBool LLVMIsSectionIteratorAtEnd(LLVMObjectFileRef ObjectFile,LLVMSectionIteratorRef SI); /usr/include/llvm-c/Object.h:删除LLVMSymbolIteratorRef LLVMGetSymbols(LLVMObjectFileRef ObjectFile);删除LLVMBool LLVMIsSymbolIteratorAtEnd(LLVMObjectFileRef ObjectFile,LLVMSymbolIteratorRef SI); 后面默认路径为/usr/include/llvm/ Analysis/AliasSetTracker.h:class AliasSet删除bool isVolatile();class AliasSetTracker 删除AliasSet &getAliasSetForPointer、AliasSet *getAliasSetForPointerIfExists、bool containsUnknown Analysis/AssumptionCache.h:copyAffectedValuesInCache变更为transferAffectedValuesInCache Analysis/BranchProbabilityInfo.h:删除updatePostDominatedByUnreachable、updatePostDominatedByColdCall Analysis/CmpInstAnalysis.h:删除Value *getICmpValue,PredicatesFoldable变更为predicatesFoldable Analysis/CodeMetrics.h:删除bool callIsSmall(ImmutableCallSite CS); Analysis/InstructionSimplify.h:SimplifyFPBinOp变更为SimplifyBinOp,SimplifyCall变更为SimplifyFreezeInst Analysis/LoopAccessAnalysis.h:删除StoreToLoopInvariantAddress Analysis/MustExecute.h:删除void computeLoopSafetyInfo isGuaranteedToExecute Analysis/Passes.h:createDivergenceAnalysisPass变更为createLegacyDivergenceAnalysisPass Analysis/ProfileSummaryInfo.h:isHotBB变更为isHotBlock isColdBB变更为isColdBlock Analysis/ScalarEvolutionAliasAnalysis.h:AliasResult alias增加形参AAQueryInfo &AAQI Analysis/ScalarEvolutionExpander.h:InsertBinop增加形参SCEV::NoWrapFlags Flags, bool IsSafeToHoist Analysis/ScopedNoAliasAA.h:getModRefInfo增加形参AAQueryInfo &AAQI Analysis/TargetTransformInfo.h:getIntImmCost变更为getIntImmCostInst,删除getNumberOfRegisters Analysis/TargetTransformInfoImpl.h:isLegalMaskedStore和isLegalMaskedLoad增加形参Alignment;删除isLegalMaskedScatter,isLegalMaskedGather,getJumpBufAlignment,getJumpBufSize GlobalISel/IRTranslator.h:删除packRegs unpackRegs translateFence函数 GlobalISel/MachineIRBuilder.h:删除class MachineIRBuilderBase MachineIRBuilder;删除recordInsertion recordInsertions stopRecordingInsertions buildGEP materializeGEP buildSExt DebugInfo/DWARF/DWARFAddressRange.h:struct DWARFAddressRange删除bool contains DebugInfo/DWARF/DWARFAttribute.h:struct DWARFAttribute删除clear() DWARFAttribute DebugInfo/DWARF/DWARFContext.h:class DWARFContext 删除parseCompileUnits parseTypeUnits parseDWOCompileUnits getDebugLocDWO函数 DebugInfo/DWARF/DWARFDataExtractor.h:getRelocatedValue 增加形参Error *Err = nullptr;删除size()函数 DebugInfo/DWARF/DWARFDebugLoc.h:删除class DWARFDebugLoc DWARFDebugLocDWO DebugInfo/DWARF/DWARFDebugPubTable.h:DWARFDebugPubTable函数删除形参StringRef Data,增加形参const DWARFObject &Obj, const DWARFSection &Sec DebugInfo/DWARF/DWARFUnit.h:删除class DWARFUnitSectionBase,struct BaseAddress, collectAddressRanges,getUnitSection;getAddrOffsetSectionItem和getStringOffsetSectionItem增加形参uint64_t &Result ExecutionEngine/Orc/Core.h:变更较大,基本完全不兼容 ExecutionEngine/Orc/ExecutionUtils.h:删除class JITTargetMachineBuilder, DynamicLibraryFallbackGenerator ExecutionEngine/Orc/Layer.h:删除class IRLayer ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h:删除mapSectionAddress;class RTDyldObjectLinkingLayer 变更为LegacyRTDyldObjectLinkingLayer ExecutionEngine/JITEventListener.h:删除struct JITEvent_EmittedFunctionDetails IR/AutoUpgrade.h:UpgradeRetainReleaseMarker变更为UpgradeARCRuntime IR/CallSite.h:删除class ImmutableCallSite IR/ConstantRange.h:删除getSetSize,addWithNoSignedWrap IR/Dominators.h:删除class DeferredDominance IR/Function.h:optForMinSize变更为hasMinSize,optForSize变更为hasOptSize IR/GlobalAlias.h:删除copyAttributesFrom IR/GlobalIFunc.h:删除copyAttributesFrom IR/InstrTypes.h:删除class TerminatorInst,class FuncletPadInst IR/Instruction.h:删除updateProfWeight IR/Instructions.h:删除class CallBase IR/IRPrintingPasses.h:删除createPrintBasicBlockPass IR/Module.h:删除global_object_begin,global_object_end global_value_begin global_value_end IR/Module.h:setProfileSummary以及getProfileSummary增加形参 IR/ValueMap.h:删除mayMapMetadata enableMapMetadata disableMapMetadata LTO/legacy/ThinLTOCodeGenerator.h:删除class ThinLTOBuffer MC/MCParser/AsmLexer.h:删除setParsingMSInlineAsm MC/MCParser/MCAsmLexer.h:删除IsaAltMacroMode以及SetAltMacroMode MC/MCParser/MCAsmParser.h:删除setEnablePrintSchedInfo与shouldPrintSchedInfo MC/MCAsmBackend.h:删除handleCodePaddingBasicBlockStart handleCodePaddingBasicBlockEnd handleCodePaddingInstructionBegin handleCodePaddingInstructionEnd relaxFragment MC/MCAssembler.h:删除relaxPaddingFragment MC/MCCodeView.h:删除class MCCVLineEntry setCurrentCVLoc MC/MCContext.h:删除hasMCLineSections MC/MCDwarf.h:删除resetRootFile MC/MCFragment.h:删除class MCPaddingFragment MC/MCObjectStreamer.h:删除EmitCodePaddingBasicBlockStart和EmitCodePaddingBasicBlockEnd MC/MCSection.h:删除rbegin与rend MC/MCStreamer.h:EmitVersionMin EmitBuildVersion EmitVersionForTarget EmitULEB128IntValue增加形参 MC/MCSymbol.h:删除getSectionPtr MC/MCSymbolWasm.h:删除getModuleName getReturns setReturns setParams MC/SubtargetFeature.h:删除struct SubtargetFeatureKV,ToggleFeature,ApplyFeatureFlag,getFeatureBits Support/GenericDomTreeConstruction.h:删除VisitInsertion、UpdateLevelsAfterInsertion、LegalizeUpdates Support/JSON.h:删除raw_ostream &operator<< Support/Mutex.h:删除namespace llvm::sys的MutexImpl文件 Support/Path.h:删除user_cache_directory Transforms/Scalar/JumpThreading.h:删除struct RecursionSetRemover Transforms/Utils/Cloning.h:删除InlineFunction Transforms/Utils/CodeExtractor.h:删除extractCodeRegion函数 Transforms/Utils/FunctionImportUtils.h:删除doImportAsDefinition Transforms/Utils/LoopUtils.h:删除class RecurrenceDescriptor,class InstDesc,class InductionDescriptor Transforms/Utils/ModuleUtils.h:删除checkSanitizerInterfaceFunction Transforms/Utils/UnrollLoop.h:删除foldBlockIntoPredecessor,gatherUnrollingPreferences增加形参 Transforms/Vectorize/LoopVectorizationLegality.h:删除createLVMissedAnalysis,createHintMetadata,matchesHintMetadataName,writeHintsToMetadata,createMissedAnalysis函数 Transforms/Coroutines.h:变更createCoroEarlyPass,createCoroSplitPass,createCoroElidePass,createCoroCleanupPass为createCoroEarlyLegacyPass,createCoroSplitLegacyPass,createCoroElideLegacyPass,createCoroCleanupLegacyPass Transforms/Instrumentation.h:删除createAddressSanitizerFunctionPass,createAddressSanitizerModulePass,createMemorySanitizerPass,createHWAddressSanitizerPass,createEfficiencySanitizerPass,createSanitizerCoverageModulePass函数以及struct EfficiencySanitizerOptions InitializePasses.h:删除initializeAddressSanitizerModulePass,initializeDivergenceAnalysisPass,initializeEfficiencySanitizerPass,initializeExpandISelPseudosPass,initializeHWAddressSanitizerPass,initializeLoadStoreVectorizerPass,initializeThreadSanitizerPass函数 InitializePasses.h:删除initializeMachineModuleInfoPass,initializeMemorySanitizerPass,initializeMergeFunctionsPass,initializeMergeICmpsPass,initializePrintBasicBlockPassPass,initializeSanitizerCoverageModulePass,initializeScalarizerPass函数 LinkAllPasses.h:删除llvm::createDivergenceAnalysisPass,llvm::createMergeICmpsPass,llvm::createPrintBasicBlockPass函数 Pass.h:删除class BasicBlockPass类,删除isFunctionInPrintList以及forcePrintModuleIR函数 |
涉及头文件变更较大,删除以及修改的头文件,如果有用户使用到,需要进行适配。 |
命令行/功能 | 新增命令行(默认路径/usr/bin/): llvm-addr2line llvm-cxxmap llvm-elfabi llvm-ifs llvm-install-name-tool llvm-jitlink llvm-lipo llvm-reduce 新增llvm-addr2line llvm-cxxmap llvm-elfabi llvm-ifs llvm-install-name-tool jitlink llvm-lipo llvm-reduce llvm-cov工具可以使用-format=lcov选项来跟踪执行命令时的文件 llvm-objcopy/llvm-strip得到了COFF目标文件的支持,支持最常见的复制/剥离选项 |
无 |
SPEC文件 | 新增编译依赖python3-recommonmark,需要打开-DLLVM_TARGETS_TO_BUILD=all编译选项来让rust编译通过 | 无 |
受影响需要重新编译的包 | clang,compiler-rt均需要对应升级到相关版本,mesa需要release+1,rust需要升级或者适配 |
背景
llvm项目是一个模块化的、可重用的编译器和工具链集合。其社区(https://github.com/llvm/llvm-project)版本发布节奏基本是6个月一个大版本,更新速度较快,而且对于老版本几乎没有支持。目前openEuler的llvm版本为7.0.0,为2018年9月19日发布的版本,相对于社区节奏来说已经是老旧不维护版本,所以openEuler的LTS版本需要确定此类包的维护策略,建议升级到最新版本10.0.1。
llvm升级对周边组件影响
llvm升级首先需要clang和compiler-rt升级到配套的版本,这些配套版本均可在llvm社区获取源码包。(bpftrace对llvm以及clang均有依赖,但是LTS目前并未集成,不做分析;而且从编译来看,bpftrace对llvm以及clang升级并不敏感)
clang升级后不影响openEuler其它软件包。
compiler-rt升级不影响openEuler其它软件包。
其次,部分mesa子包(mesa-omx-drivers,mesa-libxatracker,mesa-libOSMesa,mesa-vdpau-drivers,mesa-libd3d,mesa-dri-drivers,mesa-vulkan-drivers)以及rust会对llvm有安装依赖。
本地尝试llvm升级对于mesa的编译及安装无任何影响。mesa依赖子包是因为Gallium/Radeon 显卡驱动编译依赖llvm,mesa本身是不依赖llvm。且依赖llvm的mesa子包中,只有mesa-dri-drivers被clutter以及tigervnc-server-minimal依赖,mesa-vulkan-drivers被vulkan-loader依赖,剩下mesa子包均无识别到被其它软件包依赖。据目前分析,llvm对mesa的对外接口并无影响,且对mesa本身功能影响也甚微,所以llvm升级对于mesa的影响是可控的。
对于rust需要根据llvm版本同步进行升级。rust从安装依赖来看,只有rust-packaging会安装依赖rust,此包只是一些宏配置,对于os无影响。依赖rust编译的软件包主要需要关注firefox以及librsvg2,rust升级之后这两个包可能需要对应升级,或者以补丁形式保证编译通过。
简单关系如下图所示。
结论
综上,llvm升级对os周边组件影响较小,只是devel包提供的头文件有较多变更,建议征集大家意见,如无特殊需求,建议llvm升级到最新10.0.1版本。
登录 后才可以发表评论