aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/ModuleSummaryIndex.cpp
diff options
context:
space:
mode:
authorWhitney Tsang <whitneyt@ca.ibm.com>2020-01-30 03:57:50 +0000
committerWhitney Tsang <whitneyt@ca.ibm.com>2020-01-30 18:02:22 +0000
commite44f4a8a54141d5f527ed8ee05362cc98031d723 (patch)
tree4a7fd343d9355ecf95cff81017df53a2bd992344 /llvm/lib/IR/ModuleSummaryIndex.cpp
parent70d345e687caba4ac1f95655c6924dfa91e0083f (diff)
downloadllvm-e44f4a8a54141d5f527ed8ee05362cc98031d723.zip
llvm-e44f4a8a54141d5f527ed8ee05362cc98031d723.tar.gz
llvm-e44f4a8a54141d5f527ed8ee05362cc98031d723.tar.bz2
[LoopFusion] Move instructions from FC1.GuardBlock to FC0.GuardBlock and
from FC0.ExitBlock to FC1.ExitBlock when proven safe. Summary: Currently LoopFusion give up when the second loop nest guard block or the first loop nest exit block is not empty. For example: if (0 < N) { for (int i = 0; i < N; ++i) {} x+=1; } y+=1; if (0 < N) { for (int i = 0; i < N; ++i) {} } The above example should be safe to fuse. This PR moves instructions in FC1 guard block (e.g. y+=1;) to FC0 guard block, or instructions in FC0 exit block (e.g. x+=1;) to FC1 exit block, which then LoopFusion is able to fuse them. Reviewer: kbarton, jdoerfert, Meinersbur, dmgreen, fhahn, hfinkel, bmahjour, etiotto Reviewed By: jdoerfert Subscribers: hiraditya, llvm-commits Tag: LLVM Differential Revision: https://reviews.llvm.org/D73641
Diffstat (limited to 'llvm/lib/IR/ModuleSummaryIndex.cpp')
0 files changed, 0 insertions, 0 deletions