Re-apply r84295, with fixes to how the loop "top" and "bottom" blocks are
authorDan Gohman <gohman@apple.com>
Tue, 20 Oct 2009 04:50:37 +0000 (04:50 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 20 Oct 2009 04:50:37 +0000 (04:50 +0000)
commit07adb85cb7f97968b3b9a102e5fa504a5f6ac682
treeecae03084922aee489ff1e5bdcdb3bd43e326337
parent5f4fb86d5853a433815501739584624d296b57a3
Re-apply r84295, with fixes to how the loop "top" and "bottom" blocks are
tracked. Instead of trying to manually keep track of these locations
while doing complex modifications, just recompute them when they're needed.
This fixes a bug in which the TopMBB and BotMBB were not correctly updated,
leading to invalid transformations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84598 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodePlacementOpt.cpp
test/CodeGen/X86/2009-04-20-LinearScanOpt.ll
test/CodeGen/X86/discontiguous-loops.ll [new file with mode: 0644]
test/CodeGen/X86/loop-blocks.ll [new file with mode: 0644]