[sledge] Remove unused Llair.ignore_result

Summary: No longer needed due to blocks not taking parameters.

Reviewed By: jvillard

Differential Revision: D16914858

fbshipit-source-id: 24b1106ac
master
Josh Berdine 5 years ago committed by Facebook Github Bot
parent 3f8d5ace6e
commit 0667edf418

@ -927,7 +927,7 @@ let xlate_instr :
let areturn = xlate_name_opt instr in let areturn = xlate_name_opt instr in
let return = Llair.Jump.mk lbl in let return = Llair.Jump.mk lbl in
Llair.Term.call ~func ~typ ~args ~areturn ~return ~throw:None Llair.Term.call ~func ~typ ~args ~areturn ~return ~throw:None
~ignore_result:false ~loc ~loc
in in
continue (fun (insts, term) -> continue (fun (insts, term) ->
let cmnd = Vector.of_list insts in let cmnd = Vector.of_list insts in
@ -988,15 +988,8 @@ let xlate_instr :
let return, blocks = xlate_jump x instr return_blk loc [] in let return, blocks = xlate_jump x instr return_blk loc [] in
let throw, blocks = xlate_jump x instr unwind_blk loc blocks in let throw, blocks = xlate_jump x instr unwind_blk loc blocks in
let throw = Some throw in let throw = Some throw in
let ignore_result =
match typ with
| Pointer {elt= Function {return= Some _}} ->
Option.is_none (Llvm.use_begin instr)
| _ -> false
in
emit_term emit_term
(Llair.Term.call ~func ~typ ~args ~areturn ~return ~throw (Llair.Term.call ~func ~typ ~args ~areturn ~return ~throw ~loc)
~ignore_result ~loc)
~blocks ) ~blocks )
| Ret -> | Ret ->
let exp = let exp =

@ -34,7 +34,6 @@ and 'a call =
; areturn: Var.t option ; areturn: Var.t option
; return: jump ; return: jump
; throw: jump option ; throw: jump option
; ignore_result: bool
; mutable recursive: bool ; mutable recursive: bool
; loc: Loc.t } ; loc: Loc.t }
@ -82,16 +81,7 @@ let sexp_of_term = function
{key: Exp.t; tbl: (Exp.t * jump) vector; els: jump; loc: Loc.t}] {key: Exp.t; tbl: (Exp.t * jump) vector; els: jump; loc: Loc.t}]
| Iswitch {ptr; tbl; loc} -> | Iswitch {ptr; tbl; loc} ->
sexp_ctor "Iswitch" [%sexp {ptr: Exp.t; tbl: jump vector; loc: Loc.t}] sexp_ctor "Iswitch" [%sexp {ptr: Exp.t; tbl: jump vector; loc: Loc.t}]
| Call | Call {callee; typ; args; areturn; return; throw; recursive; loc} ->
{ callee
; typ
; args
; areturn
; return
; throw
; ignore_result
; recursive
; loc } ->
sexp_ctor "Call" sexp_ctor "Call"
[%sexp [%sexp
{ callee: Exp.t { callee: Exp.t
@ -100,7 +90,6 @@ let sexp_of_term = function
; areturn: Var.t option ; areturn: Var.t option
; return: jump ; return: jump
; throw: jump option ; throw: jump option
; ignore_result: bool
; recursive: bool ; recursive: bool
; loc: Loc.t }] ; loc: Loc.t }]
| Return {exp; loc} -> | Return {exp; loc} ->
@ -334,7 +323,7 @@ module Term = struct
let iswitch ~ptr ~tbl ~loc = Iswitch {ptr; tbl; loc} |> check invariant let iswitch ~ptr ~tbl ~loc = Iswitch {ptr; tbl; loc} |> check invariant
let call ~func ~typ ~args ~areturn ~return ~throw ~ignore_result ~loc = let call ~func ~typ ~args ~areturn ~return ~throw ~loc =
Call Call
{ callee= func { callee= func
; typ ; typ
@ -342,7 +331,6 @@ module Term = struct
; areturn ; areturn
; return ; return
; throw ; throw
; ignore_result
; recursive= false ; recursive= false
; loc } ; loc }
|> check invariant |> check invariant

@ -52,7 +52,6 @@ and 'a call =
; areturn: Var.t option (** Register to receive return value. *) ; areturn: Var.t option (** Register to receive return value. *)
; return: jump (** Return destination. *) ; return: jump (** Return destination. *)
; throw: jump option (** Handler destination. *) ; throw: jump option (** Handler destination. *)
; ignore_result: bool (** Drop return value when invoking return. *)
; mutable recursive: bool ; mutable recursive: bool
(** Holds unless [callee] is definitely not recursive. *) (** Holds unless [callee] is definitely not recursive. *)
; loc: Loc.t } ; loc: Loc.t }
@ -157,7 +156,6 @@ module Term : sig
-> areturn:Var.t option -> areturn:Var.t option
-> return:jump -> return:jump
-> throw:jump option -> throw:jump option
-> ignore_result:bool
-> loc:Loc.t -> loc:Loc.t
-> term -> term

Loading…
Cancel
Save