[BOLT] TailDuplication: skip non-simple functions

Summary:
Replace erroneous check for function eligibility from `Function.isIgnored()`
to `shouldOptimize(Function)`. This prevents non-simple functions from being
processed.

(cherry picked from FBD32301958)
This commit is contained in:
Amir Ayupov 2021-11-09 17:13:00 -08:00 committed by Maksim Panchenko
parent 933df2a460
commit 9ab0662211

View File

@ -416,7 +416,7 @@ void TailDuplication::runOnFunction(BinaryFunction &Function) {
void TailDuplication::runOnFunctions(BinaryContext &BC) {
for (auto &It : BC.getBinaryFunctions()) {
BinaryFunction &Function = It.second;
if (Function.isIgnored())
if (!shouldOptimize(Function))
continue;
runOnFunction(Function);
}