-
Notifications
You must be signed in to change notification settings - Fork 123
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
Differentiate global variables in the reverse mode #1153
base: master
Are you sure you want to change the base?
Conversation
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.
clang-tidy made some suggestions
@@ -286,6 +294,10 @@ class CladTimerGroup { | |||
return P.ProcessDiffRequest(request); | |||
} | |||
|
|||
void ProcessTopLevelDecl(CladPlugin& P, clang::Decl* D) { |
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.
warning: function 'ProcessTopLevelDecl' defined in a header file; function definitions in header files can lead to ODR violations [misc-definitions-in-headers]
void ProcessTopLevelDecl(CladPlugin& P, clang::Decl* D) {
^
Additional context
tools/ClangPlugin.h:296: make as 'inline'
void ProcessTopLevelDecl(CladPlugin& P, clang::Decl* D) {
^
cc0f843
to
de08917
Compare
de08917
to
7372dd0
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1153 +/- ##
==========================================
+ Coverage 94.56% 94.57% +0.01%
==========================================
Files 51 51
Lines 8944 8979 +35
==========================================
+ Hits 8458 8492 +34
- Misses 486 487 +1
... and 1 file with indirect coverage changes
|
return StmtDiff(clonedDRE); | ||
if (VD->isFileVarDecl() && | ||
!m_DiffReq->hasAttr<clang::CUDAGlobalAttr>()) { | ||
Expr* DREDiff = DifferentiateGlobalVarDecl(VD); |
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.
I think we can detect if a needed variable is global in the DiffPlanner and schedule it as part of the diff graph. This would enable us to remove the ProcessTopLevelDecl
which is a layering violation.
No description provided.