New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement concat of extract AST simplifications #940
Implement concat of extract AST simplifications #940
Conversation
353fa49
to
f079d9a
Compare
src/libtriton/ast/astContext.cpp
Outdated
@@ -741,6 +741,15 @@ namespace triton { | |||
} | |||
} | |||
|
|||
if (this->modes->isModeEnabled(triton::modes::AST_OPTIMIZATIONS) && | |||
node->getBitvectorSize() <= 512) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
&& node->getBitvectorSize() <= 512
is always true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -210,6 +210,15 @@ namespace triton { | |||
} | |||
} | |||
|
|||
if (this->modes->isModeEnabled(triton::modes::AST_OPTIMIZATIONS) && | |||
node->getBitvectorSize() <= 512) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
&& node->getBitvectorSize() <= 512 is always true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer need this check. I will remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -1043,5 +1052,58 @@ namespace triton { | |||
return this->astRepresentation.print(stream, node); | |||
} | |||
|
|||
SharedAbstractNode AstContext::simplify_concat(std::vector<SharedAbstractNode> exprs) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some comments at each steps to help me (and others) to understand the algorithm. What you are looking for, what/how you do it. etc. If you can also avoid to name variables like : r
, e
, n
. If they can have a better name to quickly identify their role, it will be nice :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
erf, goddamnit conflict. |
Should I rebase? |
if you can, it will be cool yep |
4933d83
to
29b9ac0
Compare
Rebased |
Part of #930