Move the function getFirstNonBoxedLoopFor which is used in ScopBuilder and in ScopInfo to Support/ScopHelpers to make it reusable
in other locations. No functionality change.
Details
Diff Detail
Event Timeline
Move the function getFirstNonBoxedLoopFor which is used in
ScopBuilder and in ScopInfo to Support/ScopHelpers to make it reusable
in other locations.
No functionality change.
Dear Sameer,
thank you for the patch. Cleanups are always welcome. Some minore nitpicks, but otherwise this patch is good to go. Feel free to commit!
include/polly/Support/ScopHelper.h | ||
---|---|---|
440 | What is this comment about? It seems to be leftover. | |
443 | Also not needed? | |
448 | The "Do not call ..." does not seem to make a lot of sense, no? It seems to be an outdated comment. Can you just drop it as part of this cleanup? | |
lib/Support/ScopHelper.cpp | ||
586 | Nice Cleanup. A minor nitpick. I would prefer 'Loop *L' over 'auto L*' (even though the original code said 'auto *L). This is more in line with the LLVM coding standards [1], which suggest to only use auto if it makes the code clearly more readable. [1] http://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable |
An overhaul of the boxed loop / surrounded loop mechanism could be useful. There's also BlockGenerator::getLoopForStmt with the same functionality. We don't even need to remember the boxed loops if we know the surrounding loop as everything inside will be boxed loops. The surrounding loop is either the top entry of LoopNest, or the loop the whole Scop is enclosed in, if any.
What is this comment about? It seems to be leftover.