diff options
Diffstat (limited to 'bolt/lib/Rewrite/BinaryPassManager.cpp')
-rw-r--r-- | bolt/lib/Rewrite/BinaryPassManager.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bolt/lib/Rewrite/BinaryPassManager.cpp b/bolt/lib/Rewrite/BinaryPassManager.cpp index aaa0e1f..5dfef0b 100644 --- a/bolt/lib/Rewrite/BinaryPassManager.cpp +++ b/bolt/lib/Rewrite/BinaryPassManager.cpp @@ -263,6 +263,10 @@ static cl::opt<bool> CMOVConversionFlag("cmov-conversion", cl::ReallyHidden, cl::cat(BoltOptCategory)); +static cl::opt<bool> ShortenInstructions("shorten-instructions", + cl::desc("shorten instructions"), + cl::init(true), + cl::cat(BoltOptCategory)); } // namespace opts namespace llvm { @@ -378,7 +382,8 @@ Error BinaryFunctionPassManager::runAllPasses(BinaryContext &BC) { else if (opts::Hugify) Manager.registerPass(std::make_unique<HugePage>(NeverPrint)); - Manager.registerPass(std::make_unique<ShortenInstructions>(NeverPrint)); + Manager.registerPass(std::make_unique<ShortenInstructions>(NeverPrint), + opts::ShortenInstructions); Manager.registerPass(std::make_unique<RemoveNops>(NeverPrint), !opts::KeepNops); |