LoopNest Analysis expansion to return instructions that prevent a Loop
authorMark Danial <Mark.Danial@ibm.com>
Tue, 17 Aug 2021 22:23:43 +0000 (22:23 +0000)
committerWhitney Tsang <whitneyt@ca.ibm.com>
Tue, 17 Aug 2021 22:25:49 +0000 (22:25 +0000)
commit4018d25da8ab7d2392ef444e1134fe262d47dad8
tree73cc9a3cd031f4e3460152471bfaff6ca7bb593c
parentb8ecdcdd817cfe8ef187503726400971357c6854
LoopNest Analysis expansion to return instructions that prevent a Loop
Nest from being perfect

Expand LoopNestAnalysis to return the full list of instructions that
cause a loop nest to be imperfect. This is useful for other passes to
know if they should continue for in the inner loops.
Added New function getInterveningInstructions
that returns a small vector with the instructions that prevent a loop
for being perfect. Also added a couple of helper functions to reduce
code duplication.

Reviewed By: Whitney

Differential Revision: https://reviews.llvm.org/D107773
llvm/include/llvm/Analysis/LoopNestAnalysis.h
llvm/lib/Analysis/LoopNestAnalysis.cpp
llvm/unittests/Analysis/LoopNestTest.cpp