Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment out passes that are slow with LLVM 14 #299

Merged
merged 1 commit into from
Jun 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions lib/Optimize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,15 @@ void OptimizeModule(const EntityLifter &lifter, llvm::Module &module) {
llvm::FunctionPassManager fpm;

fpm.addPass(llvm::DCEPass());
fpm.addPass(llvm::SinkingPass());
// NOTE(alex): This pass is extremely slow with LLVM 14.
// fpm.addPass(llvm::SinkingPass());

// NewGVN has bugs with `____strtold_l_internal` from chal5, amd64.
// fpm.addPass(llvm::NewGVNPass());

fpm.addPass(llvm::SCCPPass());
fpm.addPass(llvm::DSEPass());
// NOTE(alex): This pass is extremely slow with LLVM 14.
// fpm.addPass(llvm::DSEPass());
#if LLVM_VERSION_NUMBER < LLVM_VERSION(14, 0)
fpm.addPass(llvm::SROA());
#else
Expand All @@ -179,7 +181,8 @@ void OptimizeModule(const EntityLifter &lifter, llvm::Module &module) {
fpm.addPass(llvm::EarlyCSEPass(true));
fpm.addPass(llvm::BDCEPass());
fpm.addPass(llvm::SimplifyCFGPass());
fpm.addPass(llvm::SinkingPass());
// NOTE(alex): This pass is extremely slow with LLVM 14.
// fpm.addPass(llvm::SinkingPass());
fpm.addPass(llvm::SimplifyCFGPass());
fpm.addPass(llvm::InstCombinePass());

Expand Down