Change a type name

Summary:
Change loc_var (for local variable) to reg (for register) because
loc_var looks too much like a location tagged variable.

Reviewed By: jberdine

Differential Revision: D16827920

fbshipit-source-id: 5b11f1065
master
Scott Owens 6 years ago committed by Facebook Github Bot
parent a635aff1bc
commit 742ab9089d

@ -33,7 +33,7 @@ Datatype `
label = Lab string`; label = Lab string`;
Datatype ` Datatype `
loc_var = Loc string`; reg = Reg string`;
Datatype ` Datatype `
glob_var = GlobName string`; glob_var = GlobName string`;
@ -51,7 +51,7 @@ Datatype `
| UndefC`; | UndefC`;
Datatype ` Datatype `
arg = Constant const | Variable loc_var`; arg = Constant const | Variable reg`;
type_abbrev ("targ", ``:ty # arg``); type_abbrev ("targ", ``:ty # arg``);
@ -63,29 +63,29 @@ Datatype `
(* Terminators *) (* Terminators *)
| Ret targ | Ret targ
| Br arg label label | Br arg label label
| Invoke loc_var ty arg (targ list) label label | Invoke reg ty arg (targ list) label label
| Unreachable | Unreachable
(* Non-terminators *) (* Non-terminators *)
| Sub loc_var bool bool ty arg arg | Sub reg bool bool ty arg arg
| Extractvalue loc_var targ (const list) | Extractvalue reg targ (const list)
| Insertvalue loc_var targ targ (const list) | Insertvalue reg targ targ (const list)
| Alloca loc_var ty targ | Alloca reg ty targ
| Load loc_var ty targ | Load reg ty targ
| Store targ targ | Store targ targ
| Gep loc_var targ (targ list) | Gep reg targ (targ list)
| Ptrtoint loc_var targ ty | Ptrtoint reg targ ty
| Inttoptr loc_var targ ty | Inttoptr reg targ ty
| Icmp cond ty arg arg | Icmp cond ty arg arg
| Call loc_var ty fun_name (targ list) | Call reg ty fun_name (targ list)
(* C++ runtime functions *) (* C++ runtime functions *)
| Cxa_allocate_exn loc_var arg | Cxa_allocate_exn reg arg
| Cxa_throw arg arg arg | Cxa_throw arg arg arg
| Cxa_begin_catch loc_var arg | Cxa_begin_catch reg arg
| Cxa_end_catch | Cxa_end_catch
| Cxa_get_exception_ptr loc_var arg`; | Cxa_get_exception_ptr reg arg`;
Datatype ` Datatype `
phi = Phi loc_var ty (label option |-> arg)`; phi = Phi reg ty (label option |-> arg)`;
Datatype ` Datatype `
clause = Catch targ`; clause = Catch targ`;
@ -104,7 +104,7 @@ Datatype `
Datatype ` Datatype `
def = def =
<| r : ty; <| r : ty;
params : loc_var list; params : reg list;
(* None -> entry block, and Some name -> non-entry block *) (* None -> entry block, and Some name -> non-entry block *)
blocks : label option |-> block |>`; blocks : label option |-> block |>`;
@ -140,14 +140,14 @@ Datatype `
pc = <| f : fun_name; b : label option; i : num |>`; pc = <| f : fun_name; b : label option; i : num |>`;
Datatype ` Datatype `
frame = <| ret : pc; saved_locals : loc_var |-> pv; result_var : loc_var; stack_allocs : addr list |>`; frame = <| ret : pc; saved_locals : reg |-> pv; result_var : reg; stack_allocs : addr list |>`;
Datatype ` Datatype `
state = state =
<| ip : pc; <| ip : pc;
(* Keep the size of the global with its memory address *) (* Keep the size of the global with its memory address *)
globals : glob_var |-> (num # word64); globals : glob_var |-> (num # word64);
locals : loc_var |-> pv; locals : reg |-> pv;
stack : frame list; stack : frame list;
(* The set of allocated ranges. The bool indicates whether the range is (* The set of allocated ranges. The bool indicates whether the range is
* free-able or not *) * free-able or not *)

Loading…
Cancel
Save