ldc icon indicating copy to clipboard operation
ldc copied to clipboard

Port passes to LLVM's new pass manager

Open MaskRay opened this issue 3 years ago • 3 comments

Using LLVM's legacy PM for optimization pipeline was deprecated in 13.0.0 and the relevant functionality was scheduled to be removed after 14.0.0 (got delayed). The legacy PM for code generation (assembly, object file generation; mainly addPassesToEmitFile) is still supported.

Clang dropped legacy PM support in D123609 (milestone: 15.0.0). I plan to remove instrumentation passes like gcov, PGO, and sanitizers (milestone: 15.0.0).

The removal of the following passes will cause/have caused ldc to not build with latest llvm-project

  • createPGOIndirectCallPromotionLegacyPass (removed by https://reviews.llvm.org/D123834)
  • createAddressSanitizerFunctionPass (pending removal soon)
  • createMemorySanitizerLegacyPassPass (pending removal soon)

LLVM's legacy PM for optimization pipeline may be completely removed in 16.0.0 (llvm::create*Pass, populateModulePassManager, etc). llvm-project clang/lib/CodeGen/BackendUtil.cpp can serve as an example using the new pass manager.

MaskRay avatar Apr 15 '22 04:04 MaskRay

Thanks for the heads up, we've just updated to LLVM14 for the latest release (~1 week ago).

thewilsonator avatar Apr 15 '22 04:04 thewilsonator

edited the first message.

MaskRay avatar Apr 15 '22 04:04 MaskRay

https://github.com/ldc-developers/ldc/pull/4105

thewilsonator avatar Sep 03 '22 07:09 thewilsonator