[Mlir-commits] [mlir] [mlir] Speed up FuncToLLVM: CallOpLowering using a hashtable (PR #68082)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Tue Oct 3 08:53:59 PDT 2023
================
@@ -765,6 +792,24 @@ struct ConvertFuncToLLVMPass
const auto &dataLayoutAnalysis = getAnalysis<DataLayoutAnalysis>();
+ std::unordered_map<std::string, bool> hasBarePtrAttribute;
+ for (Region ®ion : m->getRegions()) {
+ for (Block &block : region.getBlocks()) {
+ for (Operation &op : block.getOperations()) {
+ if (isa<func::FuncOp>(op)) {
+ auto funcOp = cast<func::FuncOp>(op);
----------------
ftynse wrote:
`if (auto funcOp = dyn_cast<func::FuncOp>(op))`
`isa` followed by `cast` is an anti-pattern.
https://github.com/llvm/llvm-project/pull/68082
More information about the Mlir-commits
mailing list