Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve formatting in Asmgen #3667

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
348 changes: 67 additions & 281 deletions asmcomp/asmgen.ml

Large diffs are not rendered by default.

239 changes: 0 additions & 239 deletions backend/CSEgen.ml

This file was deleted.

33 changes: 0 additions & 33 deletions backend/CSEgen.mli

This file was deleted.

43 changes: 0 additions & 43 deletions backend/amd64/CSE.ml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ open! Int_replace_polymorphic_compare
(* CSE for the AMD64 *)

open Arch
open Mach
open CSE_utils

let of_simd_class (cl : Simd.operation_class) =
Expand All @@ -28,48 +27,6 @@ let of_simd_class (cl : Simd.operation_class) =
| Load { is_mutable = true } -> Op_load Mutable
| Load { is_mutable = false } -> Op_load Immutable

class cse = object

inherit CSEgen.cse_generic as super

method! class_of_operation op =
match op with
| Ispecific spec ->
begin match spec with
| Ilea _ | Isextend32 | Izextend32 -> Op_pure
| Istore_int(_, _, is_asg) -> Op_store is_asg
| Ioffset_loc(_, _) -> Op_store true
| Ifloatarithmem _ -> Op_load Mutable
| Ibswap _ -> super#class_of_operation op
| Irdtsc | Irdpmc
| Ilfence | Isfence | Imfence -> Op_other
| Isimd op ->
of_simd_class (Simd.class_of_operation op)
| Isimd_mem (op,_addr) ->
of_simd_class (Simd.Mem.class_of_operation op)
| Ipause
| Icldemote _
| Iprefetch _ -> Op_other
end
| Imove | Ispill | Ireload
| Ifloatop _
| Icsel _
| Ireinterpret_cast _ | Istatic_cast _
| Iconst_int _ | Iconst_float32 _ | Iconst_float _
| Iconst_symbol _ | Iconst_vec128 _
| Icall_ind | Icall_imm _ | Itailcall_ind | Itailcall_imm _ | Iextcall _
| Istackoffset _ | Iload _ | Istore _ | Ialloc _
| Iintop _ | Iintop_imm _ | Iintop_atomic _
| Iname_for_debugger _ | Iprobe _ | Iprobe_is_enabled _ | Iopaque
| Ibeginregion | Iendregion | Ipoll _ | Idls_get
-> super#class_of_operation op

end

let fundecl f =
(new cse)#fundecl f


class cfg_cse = object

inherit Cfg_cse.cse_generic as super
Expand Down
Loading