Skip to content

Commit e2d4823

Browse files
authored
[BOLT][NFC] Make RepRet X86-specific (#88286)
Bolt's RepRet pass is x86-specific, no need to add it for non-x86 targets.
1 parent 364963a commit e2d4823

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bolt/lib/Rewrite/BinaryPassManager.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,9 @@ Error BinaryFunctionPassManager::runAllPasses(BinaryContext &BC) {
377377

378378
Manager.registerPass(std::make_unique<NormalizeCFG>(PrintNormalized));
379379

380-
Manager.registerPass(std::make_unique<StripRepRet>(NeverPrint),
381-
opts::StripRepRet);
380+
if (BC.isX86())
381+
Manager.registerPass(std::make_unique<StripRepRet>(NeverPrint),
382+
opts::StripRepRet);
382383

383384
Manager.registerPass(std::make_unique<IdenticalCodeFolding>(PrintICF),
384385
opts::ICF);

0 commit comments

Comments
 (0)