summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2013-09-28 00:12:32 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2013-09-28 00:12:32 +0000
commitaf4211ad940025c2a1eb8b25d20196c1c1362d88 (patch)
treecbe47d337f4e356f0062dd0291424b1aee61c2db /llvm/lib/Bitcode
parentd6ffae91d535402b240128467bbcc5b09bd948aa (diff)
downloadbcm5719-llvm-af4211ad940025c2a1eb8b25d20196c1c1362d88.tar.gz
bcm5719-llvm-af4211ad940025c2a1eb8b25d20196c1c1362d88.zip
[mips] Make sure loads from lazy-binding entries do not get CSE'd or hoisted out
of loops. Previously, two consecutive calls to function "func" would result in the following sequence of instructions: 1. load $16, %got(func)($gp) // load address of lazy-binding stub. 2. move $25, $16 3. jalr $25 // jump to lazy-binding stub. 4. nop 5. move $25, $16 6. jalr $25 // jump to lazy-binding stub again. With this patch, the second call directly jumps to func's address, bypassing the lazy-binding resolution routine: 1. load $25, %got(func)($gp) // load address of lazy-binding stub. 2. jalr $25 // jump to lazy-binding stub. 3. nop 4. load $25, %got(func)($gp) // load resolved address of func. 5. jalr $25 // directly jump to func. llvm-svn: 191591
Diffstat (limited to 'llvm/lib/Bitcode')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud