-
Notifications
You must be signed in to change notification settings - Fork 113
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
Better global handling and fix caching bug #30
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.
There is a diff in CreatePrimalAndGradient with respect to plugin that doesn't have "+" signs next to the changed lines. Did you apply some changes while rebasing an older branch or something?
} | ||
} | ||
|
||
if (auto ce = dyn_cast<ConstantExpr>(val)) { |
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.
Comments needed, especially before conditionals that involve recursive calls.
@@ -589,6 +628,8 @@ bool isconstantValueM(Value* val, SmallPtrSetImpl<Value*> &constants, SmallPtrSe | |||
continue; | |||
if (fnp->getIntrinsicID() == Intrinsic::memcpy && call->getArgOperand(0) != val && call->getArgOperand(1) != val) |
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.
For skipped intrinsics, a comment should be present describing the property the intrinsic has that lets us skip it. This lets people understand when they can add a "missing" intrinsic.
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.
Not skipping intrinsic, but rather special casing memcpy/memmove to say that the size variable is not made active even if other arguments are active
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.
My point was: if you are handling a bunch of things similarly (e.g. intrinsics) and its too cumbersome to give an explicit comment for each one, then an explanation for the group is good enough --- and should exist anyways so that folks understand what determines membership in the group of similar cases.
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.
Agreed re adding a comment, just wanted to clarify what code was doing
No description provided.