Skip to content
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

Conversation

SweetVishnya
Copy link
Contributor

Part of #930

@@ -741,6 +741,15 @@ namespace triton {
}
}

if (this->modes->isModeEnabled(triton::modes::AST_OPTIMIZATIONS) &&
node->getBitvectorSize() <= 512) {
Copy link
Owner

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?

Copy link
Contributor Author

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) {
Copy link
Owner

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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) {
Copy link
Owner

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 :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@JonathanSalwan
Copy link
Owner

JonathanSalwan commented Sep 15, 2020

erf, goddamnit conflict.

@SweetVishnya
Copy link
Contributor Author

Should I rebase?

@JonathanSalwan
Copy link
Owner

if you can, it will be cool yep

@SweetVishnya
Copy link
Contributor Author

Rebased

@JonathanSalwan JonathanSalwan merged commit f6ff5f6 into JonathanSalwan:dev-v0.9 Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants