Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
home:Ledest:erlang:24
erlang
4653-Optimize-not-1.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 4653-Optimize-not-1.patch of Package erlang
From 1989f1328351ffd911c44837f2cb4e498a1e5459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org> Date: Sat, 29 Oct 2022 06:50:37 +0200 Subject: [PATCH 3/5] Optimize not/1 --- lib/compiler/src/beam_ssa_codegen.erl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/compiler/src/beam_ssa_codegen.erl b/lib/compiler/src/beam_ssa_codegen.erl index 48da69bda8..e4aa2e5568 100644 --- a/lib/compiler/src/beam_ssa_codegen.erl +++ b/lib/compiler/src/beam_ssa_codegen.erl @@ -27,6 +27,7 @@ -export_type([ssa_register/0]). -include("beam_ssa.hrl"). +-include("beam_types.hrl"). -import(lists, [foldl/3,keymember/3,keysort/2,map/2,mapfoldl/3, member/2,reverse/1,reverse/2,sort/1, @@ -1110,7 +1110,13 @@ cg_block([#cg_set{anno=Anno,op={bif,Name},dst=Dst0,args=Args0}=I|T], Is = Kill++Line++[{gc_bif,Name,{f,0},Live,Args,Dst}|Is0], {Is,St}; false -> - Is = [{bif,Name,{f,0},Args,Dst}|Is0], + Bif = case {Name,Args} of + {'not',[{tr,_,#t_atom{elements=[false,true]}}=Arg]} -> + {bif,'=:=',{f,0},[Arg,{atom,false}],Dst}; + {_,_} -> + {bif,Name,{f,0},Args,Dst} + end, + Is = [Bif|Is0], {Is,St} end; cg_block([#cg_set{op=bs_init,dst=Dst0,args=Args0,anno=Anno}=I, -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor