HLIL Merge related switches/comparisons

Open
#1,723 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp

Research direction

Start by reproducing the compiler-generated split switch behavior described in the issue on Binary Ninja 2.0.2175-dev for Windows. Trace how HLIL currently represents the related switches and comparisons; done means the separate jump tables or comparisons are presented as one large switch without changing case behavior. No implementation files or tests are named, so locating the relevant HLIL code and adding coverage will require project familiarity.

Written by the indexing model from the issue text.

Description

Component: Core Core: HLIL Effort: High IL Optimization Impact: Medium

Binary Ninja Version: 2.0.2175-dev, 641c0e80
Platform: Windows 10 Version 1903

Compilers often have to split up large switch statements into multiple smaller jump tables/comparisons if the cases are too far apart. It would be great if these could all be merged back into 1 large switch. Example:
image

Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Vector35/binaryninja-api

All issues in Vector35/binaryninja-api

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.