Remove reserved_reg functionality. (#424)

* Remove reserved_reg functionality.

This wasn't implemented, and if we need it in the future, it seems like
it would be better to extend the concept of global values to cover this.

* Use GlobalValue::reserved_value() for sentinal values.
This commit is contained in:
Dan Gohman
2018-07-31 07:57:37 -07:00
committed by GitHub
parent d9d40e1cdf
commit 1b42105faa
7 changed files with 23 additions and 57 deletions

View File

@@ -52,11 +52,11 @@ ebb0:
; Declare static heaps.
function %sheap(i32, i64 vmctx) -> i64 {
heap1 = static reserved_reg, min 0x1_0000, bound 0x1_0000_0000, guard 0x8000_0000
heap1 = static gv5, min 0x1_0000, bound 0x1_0000_0000, guard 0x8000_0000
heap2 = static gv5, guard 0x1000, bound 0x1_0000
gv5 = vmctx+64
; check: heap1 = static reserved_reg, min 0x0001_0000, bound 0x0001_0000_0000, guard 0x8000_0000
; check: heap1 = static gv5, min 0x0001_0000, bound 0x0001_0000_0000, guard 0x8000_0000
; check: heap2 = static gv5, min 0, bound 0x0001_0000, guard 4096
ebb0(v1: i32, v2: i64):
v3 = heap_addr.i64 heap1, v1, 0
@@ -66,12 +66,12 @@ ebb0(v1: i32, v2: i64):
; Declare dynamic heaps.
function %dheap(i32, i64 vmctx) -> i64 {
heap1 = dynamic reserved_reg, min 0x1_0000, bound gv6, guard 0x8000_0000
heap1 = dynamic gv5, min 0x1_0000, bound gv6, guard 0x8000_0000
heap2 = dynamic gv5, bound gv6, guard 0x1000
gv5 = vmctx+64
gv6 = vmctx+72
; check: heap1 = dynamic reserved_reg, min 0x0001_0000, bound gv6, guard 0x8000_0000
; check: heap1 = dynamic gv5, min 0x0001_0000, bound gv6, guard 0x8000_0000
; check: heap2 = dynamic gv5, min 0, bound gv6, guard 4096
ebb0(v1: i32, v2: i64):
v3 = heap_addr.i64 heap2, v1, 0