[BOLT] Skip instruction shortening (#93032)
Add the ability to disable the instruction shortening pass through --shorten-instructions=false
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user