[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 return = Llair.Jump.mk lbl in
Llair.Term.call ~func ~typ ~args ~areturn ~return ~throw:None
~ignore_result:false ~loc
~loc
in
continue (fun (insts, term) ->
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 throw, blocks = xlate_jump x instr unwind_blk loc blocks 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
(Llair.Term.call ~func ~typ ~args ~areturn ~return ~throw
~ignore_result ~loc)
(Llair.Term.call ~func ~typ ~args ~areturn ~return ~throw ~loc)
~blocks )
| Ret ->
let exp =

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

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

Loading…
Cancel
Save