summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAllocLinearScan.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-08-29 23:21:29 +0000
committerChris Lattner <sabre@nondot.org>2005-08-29 23:21:29 +0000
commitf7e5ec84c666fa6cbec458acb6ad7962df835a7e (patch)
tree04e57caa10879d75b9c8642fb90b4ec372ac7d5b /llvm/lib/CodeGen/RegAllocLinearScan.cpp
parent0d45ee4a0613c33e98124287edb7c52587f8b7db (diff)
downloadbcm5719-llvm-f7e5ec84c666fa6cbec458acb6ad7962df835a7e.tar.gz
bcm5719-llvm-f7e5ec84c666fa6cbec458acb6ad7962df835a7e.zip
Add a hack to avoid some horrible code in some cases by always emitting
token chains first. For this C function: int test() { int i; for (i = 0; i < 100000; ++i) foo(); } Instead of emitting this (condition before call) .LBB_test_1: ; no_exit addi r30, r30, 1 lis r2, 1 ori r2, r2, 34464 cmpw cr2, r30, r2 bl L_foo$stub bne cr2, .LBB_test_1 ; no_exit Emit this: .LBB_test_1: ; no_exit bl L_foo$stub addi r30, r30, 1 lis r2, 1 ori r2, r2, 34464 cmpw cr0, r30, r2 bne cr0, .LBB_test_1 ; no_exit Which makes it so we don't have to save/restore cr2 in the prolog/epilog of the function. This also makes the code much more similar to what the pattern isel produces. llvm-svn: 23135
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocLinearScan.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud