Binary function names (#91)

* Function names should start with %

* Create FunctionName from string

* Implement displaying of FunctionName as %nnnn with fallback to #xxxx

* Run rustfmt and fix FunctionName::with_string in parser

* Implement FunctionName::new as a generic function

* Binary function names should start with #

* Implement NameRepr for function name

* Fix examples in docs to reflect that function names start with %

* Rebase and fix filecheck tests
This commit is contained in:
Aleksey Kuznetsov
2017-06-10 22:30:37 +05:00
committed by Jakob Stoklund Olesen
parent 731278aad8
commit 8b484b1c77
41 changed files with 306 additions and 208 deletions

View File

@@ -1,6 +1,6 @@
test domtree
function test(i32) {
function %test(i32) {
ebb0(v0: i32):
jump ebb1 ; dominates: ebb1
ebb1:

View File

@@ -1,6 +1,6 @@
test domtree
function test(i32) {
function %test(i32) {
ebb0(v0: i32):
brz v0, ebb1 ; dominates: ebb1 ebb3 ebb4 ebb5
jump ebb2 ; dominates: ebb2

View File

@@ -1,6 +1,6 @@
test domtree
function test(i32) {
function %test(i32) {
ebb0(v0: i32):
brz v0, ebb1 ; dominates: ebb1 ebb6
brnz v0, ebb2 ; dominates: ebb2 ebb9

View File

@@ -1,6 +1,6 @@
test domtree
function test(i32) {
function %test(i32) {
ebb0(v0: i32):
brz v0, ebb1 ; dominates: ebb1
brnz v0, ebb2 ; dominates: ebb2 ebb5

View File

@@ -1,6 +1,6 @@
test domtree
function test(i32) {
function %test(i32) {
ebb0(v0: i32):
brz v0, ebb13 ; dominates: ebb13
jump ebb1 ; dominates: ebb1