From ebcadf8c7a25c4580166175550bdc21c495682fe Mon Sep 17 00:00:00 2001 From: Lukas Zaoral Date: Thu, 10 Sep 2020 17:33:36 +0200 Subject: llvm11: IPConstantPropagationPass has been removed See: https://reviews.llvm.org/D84447 --- lib/Module/Optimize.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Module/Optimize.cpp b/lib/Module/Optimize.cpp index 96577ade..153c9bb8 100644 --- a/lib/Module/Optimize.cpp +++ b/lib/Module/Optimize.cpp @@ -108,7 +108,11 @@ static void AddStandardCompilePasses(legacy::PassManager &PM) { addPass(PM, createPromoteMemoryToRegisterPass());// Kill useless allocas addPass(PM, createGlobalOptimizerPass()); // Optimize out global vars addPass(PM, createGlobalDCEPass()); // Remove unused fns and globs +#if LLVM_VERSION_CODE >= LLVM_VERSION(11, 0) + addPass(PM, createSCCPPass()); // Constant prop with SCCP +#else addPass(PM, createIPConstantPropagationPass());// IP Constant Propagation +#endif addPass(PM, createDeadArgEliminationPass()); // Dead argument elimination addPass(PM, createInstructionCombiningPass()); // Clean up after IPCP & DAE addPass(PM, createCFGSimplificationPass()); // Clean up after IPCP & DAE -- cgit 1.4.1