llvm-project/llvm/lib/Transforms
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
..
Coroutines Remove `inline` keyword from inline `classof` methods 2017-06-29 19:35:17 +00:00
Hello Add auto-exporting of symbols from tools so that plugins work on Windows 2016-05-26 11:16:43 +00:00
IPO Increase the ImportHotMultiplier to 10.0 2017-07-28 01:02:34 +00:00
InstCombine [InstCombine] Simplify pointer difference subtractions (GEP-GEP) where GEPs have other uses and one non-constant index 2017-07-27 18:27:11 +00:00
Instrumentation Migrate PGOMemOptSizeOpt to use new OptimizationRemarkEmitter Pass 2017-07-30 00:35:33 +00:00
ObjCARC Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
Scalar [LoopInterchange] Do not interchange loops with function calls. 2017-07-31 09:00:52 +00:00
Utils [SimplifyCFG] Make the no-jump-tables attribute also disable switch lookup tables 2017-07-28 22:25:40 +00:00
Vectorize [SLP] Allow vectorization of the instruction from the same basic blocks only, NFC. 2017-07-28 20:11:16 +00:00
CMakeLists.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00
LLVMBuild.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00