mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Supply full object to stack compressor and Optimizer Suite.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <libyul/Dialect.h>
|
||||
#include <libyul/AsmDataForward.h>
|
||||
#include <libyul/Object.h>
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
@@ -33,15 +34,18 @@ namespace yul
|
||||
* Component that checks whether all variables are reachable on the stack and
|
||||
* returns a mapping from function name to the largest stack difference found
|
||||
* in that function (no entry present if that function is compilable).
|
||||
*
|
||||
* This only works properly if the outermost block is compilable and
|
||||
* functions are not nested. Otherwise, it might miss reporting some functions.
|
||||
*
|
||||
* Only checks the code of the object itself, does not descend into sub-objects.
|
||||
*/
|
||||
class CompilabilityChecker
|
||||
{
|
||||
public:
|
||||
static std::map<YulString, int> run(
|
||||
Dialect const& _dialect,
|
||||
Block const& _ast,
|
||||
Object const& _object,
|
||||
bool _optimizeStackAllocation
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user