[llvm] [BOLT][NFC] Simplify getOrCreate/analyze/populateJumpTables (PR #132108)
Maksim Panchenko via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 9 18:58:14 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))
----------------
maksfb wrote:
```suggestion
if (!llvm::all_of(JT->Parents, std::mem_fn(&BinaryFunction::isSimple)))
```
https://github.com/llvm/llvm-project/pull/132108
More information about the llvm-commits
mailing list