[llvm] [BOLT][NFC] Simplify getOrCreate/analyze/populateJumpTables (PR #132108)

Amir Ayupov via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 9 19:29:10 PDT 2025


================
@@ -702,10 +697,8 @@ void BinaryContext::populateJumpTables() {
        ++JTI) {
     JumpTable *JT = JTI->second;
 
-    bool NonSimpleParent = false;
-    for (BinaryFunction *BF : JT->Parents)
-      NonSimpleParent |= !BF->isSimple();
-    if (NonSimpleParent)
+    auto isSimple = std::bind(&BinaryFunction::isSimple, std::placeholders::_1);
+    if (!llvm::all_of(JT->Parents, isSimple))
----------------
aaupov wrote:

TIL

https://github.com/llvm/llvm-project/pull/132108


More information about the llvm-commits mailing list