[llvm-branch-commits] [mlir] [mlir][bufferization] Remove `finalizing-bufferize` pass (PR #114154)

2024-10-30 Thread Javed Absar via llvm-branch-commits

https://github.com/javedabsar1 commented:

Hi Matthias.
Will you delete references in docs in a different diff ? 
https://github.com/llvm/llvm-project/blob/main/mlir/docs/Bufferization.md?plain=1#L561

https://github.com/llvm/llvm-project/pull/114154
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [mlir] [mlir][func] Remove `func-bufferize` pass (PR #114152)

2024-10-30 Thread Javed Absar via llvm-branch-commits


@@ -111,9 +111,9 @@ module attributes {transform.with_named_sequence} {
   transform.named_sequence @__transform_main(%arg1: !transform.any_op) {
 %1 = transform.structured.match ops{["func.func"]} in %arg1 : 
(!transform.any_op) -> !transform.any_op
 
-// func-bufferize can be applied only to ModuleOps.
+// duplicate-function-elimination can be applied only to ModuleOps.
 // expected-error @below {{pass pipeline failed}}
-transform.apply_registered_pass "func-bufferize" to %1 : 
(!transform.any_op) -> !transform.any_op
+transform.apply_registered_pass "duplicate-function-elimination" to %1 : 
(!transform.any_op) -> !transform.any_op

javedabsar1 wrote:

AFAIU here 'func-bufferize' just happened to be used. It is not really playing 
any specific role. right? 

https://github.com/llvm/llvm-project/pull/114152
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [mlir] [mlir][bufferization] Remove remaining dialect conversion-based infra parts (PR #114155)

2024-11-13 Thread Javed Absar via llvm-branch-commits

https://github.com/javedabsar1 edited 
https://github.com/llvm/llvm-project/pull/114155
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [mlir] [mlir][bufferization] Remove remaining dialect conversion-based infra parts (PR #114155)

2024-11-13 Thread Javed Absar via llvm-branch-commits


@@ -86,18 +86,13 @@ getOrCreateFuncAnalysisState(OneShotAnalysisState &state) {
   return state.addExtension();
 }
 
-/// Return the unique ReturnOp that terminates `funcOp`.
-/// Return nullptr if there is no such unique ReturnOp.
-static func::ReturnOp getAssumedUniqueReturnOp(func::FuncOp funcOp) {
-  func::ReturnOp returnOp;
-  for (Block &b : funcOp.getBody()) {
-if (auto candidateOp = dyn_cast(b.getTerminator())) {
-  if (returnOp)
-return nullptr;
-  returnOp = candidateOp;
-}
-  }
-  return returnOp;
+/// Return all top-level func.return ops in the given function.

javedabsar1 wrote:

wasn't this `getReturnOps` part of another diff? Just confused and asking.

https://github.com/llvm/llvm-project/pull/114155
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [mlir] [mlir][bufferization] Remove remaining dialect conversion-based infra parts (PR #114155)

2024-11-19 Thread Javed Absar via llvm-branch-commits


@@ -138,8 +140,8 @@ bufferization::getGlobalFor(arith::ConstantOp constantOp, 
uint64_t alignment,
   alignment > 0 ? IntegerAttr::get(globalBuilder.getI64Type(), alignment)
 : IntegerAttr();
 
-  BufferizeTypeConverter typeConverter;

javedabsar1 wrote:

Maybe I dont understand this part of bufferizer. Could you please add a comment 
why 
s/`typeConverter.convertType(type)`/getMemRefTypeWithStaticIdentityLayout(type)/'
 is correct.

https://github.com/llvm/llvm-project/pull/114155
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [mlir] [mlir][bufferization] Remove remaining dialect conversion-based infra parts (PR #114155)

2024-11-19 Thread Javed Absar via llvm-branch-commits

https://github.com/javedabsar1 requested changes to this pull request.


https://github.com/llvm/llvm-project/pull/114155
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [mlir] [mlir][bufferization] Remove remaining dialect conversion-based infra parts (PR #114155)

2024-11-19 Thread Javed Absar via llvm-branch-commits


@@ -11,6 +11,8 @@
 
//===--===//
 
 #include "mlir/Dialect/Bufferization/Transforms/BufferUtils.h"
+

javedabsar1 wrote:

is the extra blank line preventing clang-format from sorting the headers.

https://github.com/llvm/llvm-project/pull/114155
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits