-
Notifications
You must be signed in to change notification settings - Fork 122
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
Simplify derivative statements in VisitBinaryOperator #690
Conversation
clang-tidy review says "All clean, LGTM! 👍" |
7b57f7c
to
362a814
Compare
clang-tidy review says "All clean, LGTM! 👍" |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #690 +/- ##
==========================================
+ Coverage 94.37% 94.46% +0.08%
==========================================
Files 48 48
Lines 7062 7066 +4
==========================================
+ Hits 6665 6675 +10
+ Misses 397 391 -6
|
362a814
to
d519797
Compare
clang-tidy review says "All clean, LGTM! 👍" |
d519797
to
19db17d
Compare
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
Ldiff = Visit(L, dl); | ||
StmtDiff LStored = Ldiff; | ||
if (utils::ContainsFunctionCalls(LStored.getExpr()) || LStored.getExpr()->HasSideEffects(m_Context)) |
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 we move these checks into UsefulToStore? I believe there is even a fixme there.
879a019
to
2f6bfa8
Compare
clang-tidy review says "All clean, LGTM! 👍" |
2f6bfa8
to
86e57c8
Compare
clang-tidy review says "All clean, LGTM! 👍" |
86e57c8
to
63d9290
Compare
clang-tidy review says "All clean, LGTM! 👍" |
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.
LGTM! Great work!
Every time we visit multiplication or division in the reverse mode, we store expressions for the derivatives of the LHS and the RHS.
This makes the derivative code less readable and often produces unused variables. For instance, this code
will be differentiated as
while could be just