[mlir][bufferization] Drop equivalent buffer results - modify public functions option (#177589)

Adds an option to allow modification of public functions to the drop
equivalent buffer results API and the respective pass.
A new standalone test for the pass is also added.

https://github.com/llvm/llvm-project/pull/163001 modified the default
behavior by disallowing rewriting public function. This PR preserves the
new behavior and only adds an opt-in flag to reenable changing public
function.

The extra flag aligns dropping equivalent function results with another
bufferization API `promoteBufferResultsToOutParams` which also allows
opt-in public function rewriting.

GitOrigin-RevId: 9a767dce95aeba9ad10253d86a67d7e504db5d58
4 files changed
tree: 9c7267bc0cf3453ab0befcdf12f43d13366a85a9
  1. benchmark/
  2. cmake/
  3. docs/
  4. examples/
  5. include/
  6. lib/
  7. python/
  8. test/
  9. tools/
  10. unittests/
  11. utils/
  12. .clang-format
  13. .clang-tidy
  14. CMakeLists.txt
  15. LICENSE.TXT
  16. Maintainers.md
  17. README.md
README.md

Multi-Level Intermediate Representation

See https://mlir.llvm.org/ for more information.