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

ORE and better phi unwrapping #139

Merged
merged 6 commits into from
Feb 15, 2021
Merged

ORE and better phi unwrapping #139

merged 6 commits into from
Feb 15, 2021

Conversation

wsmoses
Copy link
Member

@wsmoses wsmoses commented Feb 11, 2021

No description provided.

enzyme/Enzyme/CacheUtility.cpp Outdated Show resolved Hide resolved
@@ -116,19 +130,30 @@ Value *GradientUtils::unwrapM(Value *const val, IRBuilder<> &BuilderM,
}
}

// llvm::errs() << "uwval: " << *val << "\n";
#define getOp(v) \
#define getOpFullest(vtmp, frominst, check) \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to turn this into an inlined function instead of a macro?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function was apparently a major performance bottleneck, thus why it became a macro. For release builds it doesn't matter, but I presume marking as inline won't actually inline in debug builds?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right I forget that GCC/Clang ignores force inlining in debug mode.

enzyme/Enzyme/GradientUtils.cpp Show resolved Hide resolved
enzyme/Enzyme/GradientUtils.cpp Outdated Show resolved Hide resolved
enzyme/Enzyme/GradientUtils.cpp Outdated Show resolved Hide resolved
enzyme/Enzyme/GradientUtils.cpp Show resolved Hide resolved
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