[llvm] [llvm] Add NodeMetadata::optUnsafeEdges (NFC) (PR #137539)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 27 13:04:46 PDT 2025
kazutakahirata wrote:
> Can we replace the member with OwningArrayRef instead?
I don't think so. The array could be reallocated in the middle of lifetime:
```
void setup(const Vector& Costs) {
NumOpts = Costs.getLength() - 1;
OptUnsafeEdges = std::unique_ptr<unsigned[]>(new unsigned[NumOpts]());
}
```
https://github.com/llvm/llvm-project/pull/137539
More information about the llvm-commits
mailing list