[sledge] fix bug spuriously marking a register as global variable

Summary:
Fixes a bug in Llair.Frontend.xlate_value where the l-val register
of LLVM instruction calls was being marked as global.

Reviewed By: jberdine

Differential Revision: D17570458

fbshipit-source-id: e1b5924e2
master
Benno Stein 6 years ago committed by Facebook Github Bot
parent 58efca6328
commit 1ab8359bc0

@ -357,7 +357,7 @@ and xlate_value ?(inline = false) : x -> Llvm.llvalue -> Exp.t =
let fname = Llvm.value_name func in let fname = Llvm.value_name func in
match xlate_intrinsic_exp fname with match xlate_intrinsic_exp fname with
| Some intrinsic when inline || should_inline llv -> intrinsic x llv | Some intrinsic when inline || should_inline llv -> intrinsic x llv
| _ -> Exp.var (xlate_name ~global:() llv) ) | _ -> Exp.var (xlate_name llv) )
| Instruction (Invoke | Alloca | Load | PHI | LandingPad | VAArg) | Instruction (Invoke | Alloca | Load | PHI | LandingPad | VAArg)
|Argument -> |Argument ->
Exp.var (xlate_name llv) Exp.var (xlate_name llv)

Loading…
Cancel
Save