Skip to content

Commit

Permalink
Revert "[flang] Inline hlfir.dot_product. (llvm#123143)"
Browse files Browse the repository at this point in the history
This reverts commit 9a6433f.  ninja check-flang on x86 host fails to compile.
  • Loading branch information
preames committed Jan 17, 2025
1 parent ca95519 commit afc43a7
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 326 deletions.
6 changes: 0 additions & 6 deletions flang/include/flang/Optimizer/Builder/HLFIRTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -513,12 +513,6 @@ genTypeAndKindConvert(mlir::Location loc, fir::FirOpBuilder &builder,
Entity loadElementAt(mlir::Location loc, fir::FirOpBuilder &builder,
Entity entity, mlir::ValueRange oneBasedIndices);

/// Return a vector of extents for the given entity.
/// The function creates new operations, but tries to clean-up
/// after itself.
llvm::SmallVector<mlir::Value>
genExtentsVector(mlir::Location loc, fir::FirOpBuilder &builder, Entity entity);

} // namespace hlfir

#endif // FORTRAN_OPTIMIZER_BUILDER_HLFIRTOOLS_H
12 changes: 0 additions & 12 deletions flang/lib/Optimizer/Builder/HLFIRTools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1421,15 +1421,3 @@ hlfir::Entity hlfir::loadElementAt(mlir::Location loc,
return loadTrivialScalar(loc, builder,
getElementAt(loc, builder, entity, oneBasedIndices));
}

llvm::SmallVector<mlir::Value>
hlfir::genExtentsVector(mlir::Location loc, fir::FirOpBuilder &builder,
hlfir::Entity entity) {
entity = hlfir::derefPointersAndAllocatables(loc, builder, entity);
mlir::Value shape = hlfir::genShape(loc, builder, entity);
llvm::SmallVector<mlir::Value, Fortran::common::maxRank> extents =
hlfir::getExplicitExtentsFromShape(shape, builder);
if (shape.getUses().empty())
shape.getDefiningOp()->erase();
return extents;
}
Loading

0 comments on commit afc43a7

Please sign in to comment.