Skip to content

Commit

Permalink
Workaround for accessing blocks in program points
Browse files Browse the repository at this point in the history
  • Loading branch information
pengmai committed Sep 13, 2024
1 parent ff812e2 commit fcc3bb5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions enzyme/Enzyme/MLIR/Analysis/ActivityAnnotations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ bool enzyme::sortAttributes(Attribute a, Attribute b) {

void enzyme::DenseActivityAnnotationAnalysis::setToEntryState(
ForwardOriginsMap *lattice) {
auto *block = dyn_cast<Block *>(lattice->getAnchor());
auto *block = dyn_cast<Block *>(lattice->getAnchor().get<ProgramPoint>());
if (!block)
return;

Expand Down Expand Up @@ -687,7 +687,8 @@ void enzyme::DenseBackwardActivityAnnotationAnalysis::

void enzyme::DenseBackwardActivityAnnotationAnalysis::setToExitState(
BackwardOriginsMap *lattice) {
auto *block = dyn_cast<Block *>(lattice->getAnchor());
// FIXME: clean up how we access the (potential) block here
auto *block = dyn_cast<Block *>(lattice->getAnchor().get<ProgramPoint>());
if (!block)
return;

Expand Down

0 comments on commit fcc3bb5

Please sign in to comment.