Skip to content

Commit

Permalink
Add dataflowAPI/InstructionCache.h
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Dec 27, 2023
1 parent da42a5a commit 77ca743
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions docs/dataflowAPI/public/InstructionCache.h.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.. _`sec:InstructionCache.h`:

InstructionCache.h
##################

.. cpp:struct:: ReadWriteInfo

.. cpp:member:: bitArray read
.. cpp:member:: bitArray written
.. cpp:member:: int insnSize

.. cpp:class:: InstructionCache

.. cpp:function:; InstructionCache()
Creates an empty cache.

.. cpp:function:: bool getLivenessInfo(Address addr, ParseAPI::Function* func, ReadWriteInfo& rw)
Returns the liveness information.

.. danger:: ``rw`` is invalidated after calling :cpp:func:`clean`.

.. cpp:function:: void insertInstructionInfo(Address addr, ReadWriteInfo rw, ParseAPI::Function* func)
Store the liveness information in ``rw`` in the cache for the instruction in function ``func`` at address ``addr``.

.. Warning:: Implicitly calls :cpp:func:`clean`.

.. cpp:function:: void clean()
Clears the cache.

.. cpp:function:: ParseAPI::Function* getCurFunc()

Returns the current function.

0 comments on commit 77ca743

Please sign in to comment.