Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Feb 26, 2024
1 parent 62756e3 commit 7c20bc1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions enzyme/Enzyme/Enzyme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3197,6 +3197,7 @@ AnalysisKey EnzymeNewPM::Key;
#include "PreserveNVVM.h"
#include "TypeAnalysis/TypeAnalysisPrinter.h"
#include "llvm/Passes/PassBuilder.h"
#include "llvm/Transforms/IPO/AlwaysInliner.h"
#if LLVM_VERSION_MAJOR >= 15
#include "llvm/Transforms/AggressiveInstCombine/AggressiveInstCombine.h"
#include "llvm/Transforms/IPO/CalledValuePropagation.h"
Expand Down Expand Up @@ -3427,6 +3428,7 @@ void augmentPassBuilder(llvm::PassBuilder &PB) {
#else
prePass(MPM);
#endif
MPM.addPass(llvm::AlwaysInlinerPass());
FunctionPassManager OptimizerPM;
FunctionPassManager OptimizerPM2;
#if LLVM_VERSION_MAJOR >= 16
Expand Down
6 changes: 6 additions & 0 deletions enzyme/Enzyme/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2421,6 +2421,12 @@ SmallVector<Value *, 1> getAllLoadedValuesFrom(AllocaInst *ptr0, size_t offset,
}
}

if (auto II = dyn_cast<IntrinsicInst>(U)) {
if (II->getIntrinsicID() == Intrinsic::lifetime_start ||
II->getIntrinsicID() == Intrinsic::lifetime_end)
continue;
}

// If we copy into the ptr at a location that includes the offset, consider
// all sub uses
if (auto MTI = dyn_cast<MemTransferInst>(U)) {
Expand Down

0 comments on commit 7c20bc1

Please sign in to comment.