mirror of
https://github.com/intel/llvm.git
synced 2026-01-15 12:25:46 +08:00
[BOLT] Allow jump tables with 2 entries
Summary: GCC 8 can generate jump tables with just 2 entries. Modify our heuristic to accept it. We still assert that there's more than one entry. (cherry picked from FBD8709416)
This commit is contained in:
@@ -867,8 +867,8 @@ IndirectBranchType BinaryFunction::processIndirectBranch(MCInst &Instruction,
|
||||
}
|
||||
if (Type == IndirectBranchType::POSSIBLE_JUMP_TABLE ||
|
||||
Type == IndirectBranchType::POSSIBLE_PIC_JUMP_TABLE) {
|
||||
assert(JTOffsetCandidates.size() > 2 &&
|
||||
"expected more than 2 jump table entries");
|
||||
assert(JTOffsetCandidates.size() > 1 &&
|
||||
"expected more than one jump table entry");
|
||||
|
||||
auto JumpTableName = generateJumpTableName(ArrayStart);
|
||||
auto JumpTableType =
|
||||
|
||||
Reference in New Issue
Block a user