llvm-project/llvm/test/Transforms/LoopInterchange
Florian Hahn 4284049dcc [LoopInterchange] Do not interchange loops with function calls.
Summary:
Without any information about the called function, we cannot be sure
that it is safe to interchange loops which contain function calls. For
example there could be dependences that prevent interchanging between
accesses in the called function and the loops. Even functions without any
parameters could cause problems, as they could access memory using
global pointers.

For now, I think it is only safe to interchange loops with calls marked
as readnone.

With this patch, the LLVM test suite passes with `-O3 -mllvm
-enable-loopinterchange` and LoopInterchangeProfitability::isProfitable
returning true for all loops. check-llvm and check-clang also pass when
bootstrapped in a similar fashion, although only 3 loops got
interchanged.

Reviewers: karthikthecool, blitz.opensource, hfinkel, mcrosier, mkuper

Reviewed By: mcrosier

Subscribers: mzolotukhin, llvm-commits

Differential Revision: https://reviews.llvm.org/D35489

llvm-svn: 309547
2017-07-31 09:00:52 +00:00
..
call-instructions.ll [LoopInterchange] Do not interchange loops with function calls. 2017-07-31 09:00:52 +00:00
current-limitations-lcssa.ll [LoopInterchange] Split up interchange.ll test case (NFC). 2017-07-18 09:47:06 +00:00
currentLimitation.ll
interchange-flow-dep-outer.ll [LoopInterchange] Do not interchange loops with function calls. 2017-07-31 09:00:52 +00:00
interchange-not-profitable.ll [LoopInterchange] Split up interchange.ll test case (NFC). 2017-07-18 09:47:06 +00:00
interchange-output-dependencies.ll [LoopInterchange] Split up interchange.ll test case (NFC). 2017-07-18 09:47:06 +00:00
interchange-simple-count-down.ll [LoopInterchange] Split up interchange.ll test case (NFC). 2017-07-18 09:47:06 +00:00
interchange-simple-count-up.ll [LoopInterchange] Split up interchange.ll test case (NFC). 2017-07-18 09:47:06 +00:00
loop-interchange-optimization-remarks.ll
not-interchanged-dependencies-1.ll [LoopInterchange] Split up interchange.ll test case (NFC). 2017-07-18 09:47:06 +00:00
not-interchanged-loop-nest-3.ll [LoopInterchange] Split up interchange.ll test case (NFC). 2017-07-18 09:47:06 +00:00
not-interchanged-tightly-nested.ll [LoopInterchange] Do not interchange loops with function calls. 2017-07-31 09:00:52 +00:00
profitability.ll
reductions.ll