A text file may be comprised of many different "chunks", when
the input file contains the // ----- split markers. We don't
need to use a unique MLIRContext per chunk, as having
separate contexts is intended to allow for easy unloading of
unused data and all chunks have the same lifetime (tied to the
input file). This commit uses one context for the entire file,
greatly reducing memory consumption in certain situations (up
to 70%).
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
And this doesn't affect the error cases? E.g., split is often used when testing for errors reported, so using 1 context doesn't affect that
Comment Actions
Yeah, having one context doesn't affect diagnostics or anything related to split really (if it does, that's probably a bug somewhere). The context only really holds immutable state, so everything should still work the same before.