Add a "colocated" flag to symbol references. (#298)

This adds a "colocated" flag to function and symbolic global variables which
indicates that they are defined along with the current function, so they can
use PC-relative addressing.

This also changes the function decl syntax; the name now always precedes the
signature, and the "function" keyword is no longer included.
This commit is contained in:
Dan Gohman
2018-04-13 15:00:09 -07:00
committed by GitHub
parent 645fa3e858
commit 0e57f3d0ea
46 changed files with 312 additions and 164 deletions

View File

@@ -133,7 +133,7 @@ impl SubTest for TestBinEmit {
// constraints.
if let Some(enc) = {
let mut legal_encodings = isa.legal_encodings(
&func.dfg,
&func,
&func.dfg[inst],
func.dfg.ctrl_typevar(inst),
).filter(|e| {
@@ -251,7 +251,7 @@ impl SubTest for TestBinEmit {
// Do any encodings exist?
let encodings = isa.legal_encodings(
&func.dfg,
&func,
&func.dfg[inst],
func.dfg.ctrl_typevar(inst),
).map(|e| encinfo.display(e))