Skip to content

Implement concat of extract AST simplifications#940

Merged
JonathanSalwan merged 1 commit intoJonathanSalwan:dev-v0.9from
SweetVishnya:concat-extract-simplification
Sep 15, 2020
Merged

Implement concat of extract AST simplifications#940
JonathanSalwan merged 1 commit intoJonathanSalwan:dev-v0.9from
SweetVishnya:concat-extract-simplification

Conversation

@SweetVishnya
Copy link
Contributor

Part of #930

}

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

}

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

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 SweetVishnya force-pushed the concat-extract-simplification branch from 4933d83 to 29b9ac0 Compare September 15, 2020 14:11
@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.

2 participants