This diff adds replace_all_uses_with (replaceAllUsesWith) to the python api for PyValue, through the CAPI (mlirValueReplaceAllUsesOfWith). Plus house-keeping (dead code). Originally there was some discussion about whether the LiveOperationMap needs to be updated but I think we can skirt issue that by just "replacing" and then leaving elimination for a final dce pass (via the PassManager).
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/test/CAPI/ir.c | ||
---|---|---|
1867–1875 | The use-list ordering is supposed to be an opaque implementation detail that can't be relied on. |
mlir/test/CAPI/ir.c | ||
---|---|---|
1867–1875 | So then mlirValueGetFirstUse should be something like mlirValueGetLatestUse? |
Looks like this broke our ASAN bot: https://lab.llvm.org/buildbot/#/builders/168/builds/13141. Could you please revert or fix forward?
Thanks!
small factorization