Mass rename Ebb and relatives to Block (#1365)

* Manually rename BasicBlock to BlockPredecessor

BasicBlock is a pair of (Ebb, Inst) that is used to represent the
basic block subcomponent of an Ebb that is a predecessor to an Ebb.

Eventually we will be able to remove this struct, but for now it
makes sense to give it a non-conflicting name so that we can start
to transition Ebb to represent a basic block.

I have not updated any comments that refer to BasicBlock, as
eventually we will remove BlockPredecessor and replace with Block,
which is a basic block, so the comments will become correct.

* Manually rename SSABuilder block types to avoid conflict

SSABuilder has its own Block and BlockData types. These along with
associated identifier will cause conflicts in a later commit, so
they are renamed to be more verbose here.

* Automatically rename 'Ebb' to 'Block' in *.rs

* Automatically rename 'EBB' to 'block' in *.rs

* Automatically rename 'ebb' to 'block' in *.rs

* Automatically rename 'extended basic block' to 'basic block' in *.rs

* Automatically rename 'an basic block' to 'a basic block' in *.rs

* Manually update comment for `Block`

`Block`'s wikipedia article required an update.

* Automatically rename 'an `Block`' to 'a `Block`' in *.rs

* Automatically rename 'extended_basic_block' to 'basic_block' in *.rs

* Automatically rename 'ebb' to 'block' in *.clif

* Manually rename clif constant that contains 'ebb' as substring to avoid conflict

* Automatically rename filecheck uses of 'EBB' to 'BB'

'regex: EBB' -> 'regex: BB'
'$EBB' -> '$BB'

* Automatically rename 'EBB' 'Ebb' to 'block' in *.clif

* Automatically rename 'an block' to 'a block' in *.clif

* Fix broken testcase when function name length increases

Test function names are limited to 16 characters. This causes
the new longer name to be truncated and fail a filecheck test. An
outdated comment was also fixed.
This commit is contained in:
Ryan Hunt
2020-02-07 10:46:47 -06:00
committed by GitHub
parent a136d1cb00
commit 832666c45e
370 changed files with 8090 additions and 7988 deletions

View File

@@ -2,12 +2,12 @@ test legalizer
target x86_64
function %reverse_bits(i128) -> i128 {
ebb0(v0: i128):
block0(v0: i128):
v1 = bitrev.i128 v0
return v1
}
; check: ebb0(v2: i64, v3: i64):
; check: block0(v2: i64, v3: i64):
; check: v0 = iconcat v2, v3
; check: v33 = iconst.i64 0xaaaa_aaaa_aaaa_aaaa
; check: v6 = band v2, v33

View File

@@ -2,7 +2,7 @@ test legalizer
target x86_64
function %reverse_bits_8(i8) -> i8 {
ebb0(v0: i8):
block0(v0: i8):
v1 = bitrev.i8 v0
return v1
}
@@ -57,7 +57,7 @@ ebb0(v0: i8):
; check: return v1
function %reverse_bits_16(i16) -> i16 {
ebb0(v0: i16):
block0(v0: i16):
v1 = bitrev.i16 v0
return v1
}
@@ -128,7 +128,7 @@ ebb0(v0: i16):
; check: return v1
function %reverse_bits_32(i32) -> i32 {
ebb0(v0: i32):
block0(v0: i32):
v1 = bitrev.i32 v0
return v1
}
@@ -162,7 +162,7 @@ ebb0(v0: i32):
function %reverse_bits_64(i64) -> i64 {
ebb0(v0: i64):
block0(v0: i64):
v1 = bitrev.i64 v0
return v1
}

View File

@@ -5,60 +5,60 @@ target x86_64
; Test that when jump_tables_enables is false, all jump tables are eliminated.
; regex: V=v\d+
; regex: EBB=ebb\d+
; regex: BB=block\d+
function u0:0(i64 vmctx) baldrdash_system_v {
gv0 = vmctx
gv1 = iadd_imm.i64 gv0, 48
jt0 = jump_table [ebb2, ebb2, ebb7]
jt1 = jump_table [ebb8, ebb8]
jt0 = jump_table [block2, block2, block7]
jt1 = jump_table [block8, block8]
ebb0(v0: i64):
jump ebb5
block0(v0: i64):
jump block5
ebb5:
block5:
v1 = global_value.i64 gv1
v2 = load.i64 v1
trapnz v2, interrupt
v3 = iconst.i32 0
br_table v3, ebb3, jt0
; check: ebb5:
br_table v3, block3, jt0
; check: block5:
; check: $(val0=$V) = iconst.i32 0
; nextln: $(cmp0=$V) = icmp_imm eq $val0, 0
; nextln: brnz $cmp0, ebb2
; nextln: jump $(fail0=$EBB)
; nextln: brnz $cmp0, block2
; nextln: jump $(fail0=$BB)
; check: $fail0:
; nextln: $(cmp1=$V) = icmp_imm.i32 eq $val0, 1
; nextln: brnz $cmp1, ebb2
; nextln: jump $(fail1=$EBB)
; nextln: brnz $cmp1, block2
; nextln: jump $(fail1=$BB)
; check: $fail1:
; nextln: $(cmp2=$V) = icmp_imm.i32 eq $val0, 2
; nextln: brnz $cmp2, ebb7
; nextln: jump ebb3
; nextln: brnz $cmp2, block7
; nextln: jump block3
ebb7:
block7:
v4 = iconst.i32 0
br_table v4, ebb3, jt1
; check: ebb7:
br_table v4, block3, jt1
; check: block7:
; check: $(val1=$V) = iconst.i32 0
; nextln: $(cmp3=$V) = icmp_imm eq $val1, 0
; nextln: brnz $cmp3, ebb8
; nextln: jump $(fail3=$EBB)
; nextln: brnz $cmp3, block8
; nextln: jump $(fail3=$BB)
; check: $fail3:
; nextln: $(cmp4=$V) = icmp_imm.i32 eq $val1, 1
; nextln: brnz $cmp4, ebb8
; nextln: jump ebb3
; nextln: brnz $cmp4, block8
; nextln: jump block3
ebb8:
jump ebb5
block8:
jump block5
ebb3:
jump ebb2
block3:
jump block2
ebb2:
jump ebb1
block2:
jump block1
ebb1:
block1:
fallthrough_return
}
; not: jump_table

View File

@@ -2,7 +2,7 @@ test legalizer
target x86_64
function %foo(i64, i64) -> i64 {
ebb0(v0: i64, v1: i64):
block0(v0: i64, v1: i64):
v2 = bxor_imm.i64 v0, 0x100000000
return v2
}

View File

@@ -6,12 +6,12 @@ target x86_64
function u0:0(i64) {
jt0 = jump_table []
ebb0(v0: i64):
br_table v0, ebb1, jt0
; check: ebb0(v0: i64):
; nextln: jump ebb1
block0(v0: i64):
br_table v0, block1, jt0
; check: block0(v0: i64):
; nextln: jump block1
ebb1:
block1:
return
}
; not: jump_table

View File

@@ -2,7 +2,7 @@ test legalizer
target i686
function %foo() -> i64 {
ebb0:
block0:
v1 = iconst.i64 0x6400000042
return v1
}

View File

@@ -2,23 +2,23 @@ test legalizer
target x86_64
function u0:0(i128, i128, i64) -> i128 system_v {
ebb0(v0: i128, v1: i128, v2: i64):
jump ebb1
block0(v0: i128, v1: i128, v2: i64):
jump block1
ebb1:
block1:
v17 = iadd v0, v1
v20 = iadd v1, v17
jump ebb79
jump block79
ebb79:
block79:
v425 = iconst.i64 0
v426 = icmp_imm eq v425, 1
brnz v426, ebb80
jump ebb85(v20, v17)
brnz v426, block80
jump block85(v20, v17)
ebb80:
block80:
trap user0
ebb85(v462: i128, v874: i128):
block85(v462: i128, v874: i128):
trap user0
}

View File

@@ -2,7 +2,7 @@ test legalizer
target i686
function %foo() -> i128 {
ebb0:
block0:
v1 = iconst.i64 0x6400000042
v2 = iconst.i64 0x7F10100042
v3 = iconcat v1, v2