diff options
| author | Mark Rowe <mark@vector35.com> | 2026-02-25 19:45:00 -0800 |
|---|---|---|
| committer | Mark Rowe <mark@vector35.com> | 2026-03-16 15:47:00 -0700 |
| commit | 25213a836b1423cbc1aeef1f23aebc2167154e56 (patch) | |
| tree | 84bf36f1ba46de9419cfbd1411712192c1d3fb12 /highlevelilinstruction.h | |
| parent | 8f6762f742ed48d7d8400f2d1b4bf4774d7b0fd1 (diff) | |
Represent operand lists and label maps more efficiently within IL instructions
Rather than using chains of `UNDEF` instructions, the contents of these
lists are in a vector alongside the instructions. The instruction itself
stores the entry count and offset into this second vector at which the
associated items can be found.
This improves analysis performance by around 2% and decreases memory
usage by around 5%.
Diffstat (limited to 'highlevelilinstruction.h')
| -rw-r--r-- | highlevelilinstruction.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/highlevelilinstruction.h b/highlevelilinstruction.h index 15f2ef8f..93152241 100644 --- a/highlevelilinstruction.h +++ b/highlevelilinstruction.h @@ -196,8 +196,8 @@ namespace BinaryNinja #else Ref<HighLevelILFunction> function; #endif - BNHighLevelILInstruction instr; - size_t operand, count; + const uint64_t* cur; + size_t count; bool operator==(const ListIterator& a) const; bool operator!=(const ListIterator& a) const; @@ -212,7 +212,7 @@ namespace BinaryNinja public: typedef ListIterator const_iterator; - HighLevelILIntegerList(HighLevelILFunction* func, const BNHighLevelILInstruction& instr, size_t count); + HighLevelILIntegerList(HighLevelILFunction* func, size_t offset, size_t count); const_iterator begin() const; const_iterator end() const; @@ -252,7 +252,7 @@ namespace BinaryNinja public: typedef ListIterator const_iterator; - HighLevelILIndexList(HighLevelILFunction* func, const BNHighLevelILInstruction& instr, size_t count); + HighLevelILIndexList(HighLevelILFunction* func, size_t offset, size_t count); const_iterator begin() const; const_iterator end() const; @@ -296,7 +296,7 @@ namespace BinaryNinja public: typedef ListIterator const_iterator; - HighLevelILInstructionList(HighLevelILFunction* func, const BNHighLevelILInstruction& instr, size_t count, + HighLevelILInstructionList(HighLevelILFunction* func, size_t offset, size_t count, bool asFullAst, size_t instructionIndex); const_iterator begin() const; @@ -338,7 +338,7 @@ namespace BinaryNinja public: typedef ListIterator const_iterator; - HighLevelILSSAVariableList(HighLevelILFunction* func, const BNHighLevelILInstruction& instr, size_t count); + HighLevelILSSAVariableList(HighLevelILFunction* func, size_t offset, size_t count); const_iterator begin() const; const_iterator end() const; |
