Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp | ||
---|---|---|
528 | Is this comment update intended here or is it outdated? |
mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp | ||
---|---|---|
46 | Actually I'm not sure about this pattern, this is a bit unusual to have to see something like std::move(driver).simplifyLocally(ops, changed); to be able to use the API. |
mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp | ||
---|---|---|
46 | I haven't seen this before either, but I found this pattern online when looking for C++ ways to indicate that an object is single use. The rvalue reference forces the caller to std::move(driver). That is an indicator for the C++ programmer that driver can no longer be used afterwards. It was already "moved" and is in an invalid state now. Or from another website (https://crascit.com/2015/11/29/member-function-overloading-choices-you-didnt-know-you-had/): This means the object can be modified [...] and the state of the object at the end of the call does not have to be well defined other than it must be safe to destroy the object. |
Actually I'm not sure about this pattern, this is a bit unusual to have to see something like std::move(driver).simplifyLocally(ops, changed); to be able to use the API.