[all-commits] [llvm/llvm-project] 46c842: [mlir][transform] change RaggedArray internals
ftynse via All-commits
all-commits at lists.llvm.org
Thu Mar 16 16:14:08 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 46c8422d833ba69a157199c26955a5faaada2927
https://github.com/llvm/llvm-project/commit/46c8422d833ba69a157199c26955a5faaada2927
Author: Alex Zinenko <zinenko at google.com>
Date: 2023-03-16 (Thu, 16 Mar 2023)
Changed paths:
M mlir/include/mlir/Dialect/Transform/Utils/RaggedArray.h
Log Message:
-----------
[mlir][transform] change RaggedArray internals
Change the internal storage scheme from storing a MutableArrayRef to
storing an explicit offset+length pair. Storing an ArrayRef is dangerous
because it contains the pointer to the first element in the range, but
the entire storage vector may be reallocated, making the pointer
dangling. We don't know when the reallocation happends, so we can't
update the ArrayRefs. Store the explicit offset instead and construct
ArrayRefs on-the-fly.
Reviewed By: Peiming
Differential Revision: https://reviews.llvm.org/D146239
More information about the All-commits
mailing list