getBlocksVector, mutable getBlocksSet, getSubLoopsVector, and getTopLevelLoopsVector expose LoopInfo's internal containers, so every caller open-codes loop-nest surgery, keeps the block vector and set in sync by hand, and freezes the representation. Replace them with two LoopInfoBase operations: * removeBlocksIf(LoopT &, Pred): drop matching blocks from a loop. * takeChildrenIf(LoopT *Parent, Pred): detach and return matching children, clearing their parent; a null Parent means the top level. Both preserve the relative order of what remains. Mutation inside LoopInfoBase also lets the analysis repair derived state once per edit and finish a multi-step edit before any query observes it, which an accessor returning a container cannot. For the same reason, move hasNoExitBlocks, getExitEdges, and getUniqueLatchExitBlock onto LoopInfoBase. Two behavior changes: SimpleLoopUnswitch's deleteDeadBlocksFromLoop runs its per-child deletion callbacks while the forest is still consistent, before detaching and destroying dead children; FixIrreducible's reconnectChildLoops keeps children in their original order rather than std::partition's. Aided by Claude Fable 5 |
||
|---|---|---|
| .. | ||
| ci | ||
| cmake | ||
| docs | ||
| include/polly | ||
| lib | ||
| test | ||
| unittests | ||
| utils | ||
| www | ||
| .arclint | ||
| .gitattributes | ||
| .gitignore | ||
| CMakeLists.txt | ||
| CREDITS.txt | ||
| LICENSE.TXT | ||
| Maintainers.md | ||
| README | ||
Polly - Polyhedral optimizations for LLVM ----------------------------------------- http://polly.llvm.org/ Polly uses a mathematical representation, the polyhedral model, to represent and transform loops and other control flow structures. Using an abstract representation it is possible to reason about transformations in a more general way and to use highly optimized linear programming libraries to figure out the optimal loop structure. These transformations can be used to do constant propagation through arrays, remove dead loop iterations, optimize loops for cache locality, optimize arrays, apply advanced automatic parallelization, drive vectorization, or they can be used to do software pipelining.