[Mlir-commits] [mlir] [mlir] Speed up FuncToLLVM: CallOpLowering using a hashtable (PR #68082)
Mehdi Amini
llvmlistbot at llvm.org
Tue Oct 3 14:42:57 PDT 2023
================
@@ -765,6 +792,23 @@ struct ConvertFuncToLLVMPass
const auto &dataLayoutAnalysis = getAnalysis<DataLayoutAnalysis>();
+ StringSet<> functionsHavingBarePtrAttribute;
+ for (Region ®ion : m->getRegions()) {
+ for (Block &block : region.getBlocks()) {
+ for (Operation &op : block.getOperations()) {
+ if (auto funcOp = dyn_cast<func::FuncOp>(op);
+ funcOp != nullptr && funcOp->hasAttr(barePtrAttrName)) {
+ bool inserted =
+ functionsHavingBarePtrAttribute.insert(funcOp.getSymName())
+ .second;
+ (void)inserted;
+ assert(inserted &&
+ "expected module to contain uniquely named funcOps");
----------------
joker-eph wrote:
I assume there is a verifier for this already?
https://github.com/llvm/llvm-project/pull/68082
More information about the Mlir-commits
mailing list