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

Better global handling and fix caching bug #30

Merged
merged 3 commits into from
Nov 12, 2019
Merged

Better global handling and fix caching bug #30

merged 3 commits into from
Nov 12, 2019

Conversation

wsmoses
Copy link
Member

@wsmoses wsmoses commented Nov 11, 2019

No description provided.

Copy link
Contributor

@timkaler timkaler left a 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)) {
Copy link
Contributor

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)
Copy link
Contributor

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.

Copy link
Member Author

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

Copy link
Contributor

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.

Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants