1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00
Simon Atanasyan d52b14937d [mips] Reduce number of instructions used for loading a global symbol's value
Now `lw/sw $reg, sym+offset` pseudo instructions for global symbol `sym`
are lowering into the following three instructions.
```
lw     $reg, %got(symbol)($gp)
addiu  $reg, $reg, offset
lw/sw  $reg, 0($reg)
```

It's possible to reduce the number of instructions by taking the offset
in account in the final `lw/sw` command. This patch implements that
optimization.
```
lw     $reg, %got(symbol)($gp)
lw/sw  $reg, offset($reg)
```

Differential Revision: https://reviews.llvm.org/D66553

llvm-svn: 369756
2019-08-23 13:36:24 +00:00
..
2018-08-29 11:35:03 +00:00
2018-08-29 11:35:03 +00:00
2019-07-17 08:11:31 +00:00
2017-10-10 13:34:45 +00:00
2017-05-30 09:33:43 +00:00
2017-01-22 20:28:56 +00:00
2017-05-30 09:33:43 +00:00
2016-11-21 20:30:41 +00:00
2017-12-11 11:21:40 +00:00