update enzyme submodule and users
This commit is contained in:
parent
f4e2218b13
commit
161a4bf6ff
3 changed files with 9 additions and 9 deletions
|
@ -692,9 +692,12 @@ struct LLVMRustSanitizerOptions {
|
||||||
bool SanitizeKernelAddressRecover;
|
bool SanitizeKernelAddressRecover;
|
||||||
};
|
};
|
||||||
|
|
||||||
// This symbol won't be available or used when Enzyme is not enabled
|
// This symbol won't be available or used when Enzyme is not enabled.
|
||||||
|
// Always set AugmentPassBuilder to true, since it registers optimizations which
|
||||||
|
// will improve the performance for Enzyme.
|
||||||
#ifdef ENZYME
|
#ifdef ENZYME
|
||||||
extern "C" void registerEnzyme(llvm::PassBuilder &PB);
|
extern "C" void registerEnzymeAndPassPipeline(llvm::PassBuilder &PB,
|
||||||
|
/* augmentPassBuilder */ bool);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern "C" LLVMRustResult LLVMRustOptimize(
|
extern "C" LLVMRustResult LLVMRustOptimize(
|
||||||
|
@ -1023,7 +1026,7 @@ extern "C" LLVMRustResult LLVMRustOptimize(
|
||||||
// now load "-enzyme" pass:
|
// now load "-enzyme" pass:
|
||||||
#ifdef ENZYME
|
#ifdef ENZYME
|
||||||
if (RunEnzyme) {
|
if (RunEnzyme) {
|
||||||
registerEnzyme(PB);
|
registerEnzymeAndPassPipeline(PB, true);
|
||||||
if (auto Err = PB.parsePassPipeline(MPM, "enzyme")) {
|
if (auto Err = PB.parsePassPipeline(MPM, "enzyme")) {
|
||||||
std::string ErrMsg = toString(std::move(Err));
|
std::string ErrMsg = toString(std::move(Err));
|
||||||
LLVMRustSetLastError(ErrMsg.c_str());
|
LLVMRustSetLastError(ErrMsg.c_str());
|
||||||
|
|
|
@ -996,13 +996,11 @@ impl Step for Enzyme {
|
||||||
.config
|
.config
|
||||||
.update_submodule(Path::new("src").join("tools").join("enzyme").to_str().unwrap());
|
.update_submodule(Path::new("src").join("tools").join("enzyme").to_str().unwrap());
|
||||||
let mut cfg = cmake::Config::new(builder.src.join("src/tools/enzyme/enzyme/"));
|
let mut cfg = cmake::Config::new(builder.src.join("src/tools/enzyme/enzyme/"));
|
||||||
// FIXME(ZuseZ4): Find a nicer way to use Enzyme Debug builds
|
|
||||||
//cfg.profile("Debug");
|
|
||||||
//cfg.define("CMAKE_BUILD_TYPE", "Debug");
|
|
||||||
configure_cmake(builder, target, &mut cfg, true, LdFlags::default(), &[]);
|
configure_cmake(builder, target, &mut cfg, true, LdFlags::default(), &[]);
|
||||||
|
|
||||||
// Re-use the same flags as llvm to control the level of debug information
|
// Re-use the same flags as llvm to control the level of debug information
|
||||||
// generated for lld.
|
// generated by Enzyme.
|
||||||
|
// FIXME(ZuseZ4): Find a nicer way to use Enzyme Debug builds.
|
||||||
let profile = match (builder.config.llvm_optimize, builder.config.llvm_release_debuginfo) {
|
let profile = match (builder.config.llvm_optimize, builder.config.llvm_release_debuginfo) {
|
||||||
(false, _) => "Debug",
|
(false, _) => "Debug",
|
||||||
(true, false) => "Release",
|
(true, false) => "Release",
|
||||||
|
@ -1015,7 +1013,6 @@ impl Step for Enzyme {
|
||||||
.env("LLVM_CONFIG_REAL", &llvm_config)
|
.env("LLVM_CONFIG_REAL", &llvm_config)
|
||||||
.define("LLVM_ENABLE_ASSERTIONS", "ON")
|
.define("LLVM_ENABLE_ASSERTIONS", "ON")
|
||||||
.define("ENZYME_EXTERNAL_SHARED_LIB", "ON")
|
.define("ENZYME_EXTERNAL_SHARED_LIB", "ON")
|
||||||
.define("ENZYME_RUNPASS", "ON")
|
|
||||||
.define("LLVM_DIR", builder.llvm_out(target));
|
.define("LLVM_DIR", builder.llvm_out(target));
|
||||||
|
|
||||||
cfg.build();
|
cfg.build();
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 7f3b207c4413c9d715fd54b36b8a8fd3179e0b67
|
Subproject commit 5004a8f6f5d8468b64fae457afb7d96e1784c783
|
Loading…
Add table
Add a link
Reference in a new issue