From d768e74416e7c1369b4890d13a49132914fb3064 Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Thu, 12 Nov 2020 16:36:51 -0800 Subject: [PATCH] [sledge] Do not translate LLVM vector types Summary: While vector types can be translated, vector operations are not currently handled. Translating type can lead to later failures (such as bogus Convert expressions) that are not clearly identifiable as originating from vector types. So fail eagerly when a vector type is seen. Note that the only vectors that the frontend sees are due to incompleteness of the LLVM vectorizer pass. Reviewed By: jvillard Differential Revision: D24746224 fbshipit-source-id: 30c0715eb --- sledge/cli/frontend.ml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sledge/cli/frontend.ml b/sledge/cli/frontend.ml index e24bd89c6..3b8228c69 100644 --- a/sledge/cli/frontend.ml +++ b/sledge/cli/frontend.ml @@ -249,10 +249,6 @@ let rec xlate_type : x -> Llvm.lltype -> Typ.t = todo "non-integral pointer types: %a" pp_lltype llt () ; let elt = xlate_type x (Llvm.element_type llt) in Typ.pointer ~elt - | Vector -> - let elt = xlate_type x (Llvm.element_type llt) in - let len = Llvm.vector_size llt in - Typ.array ~elt ~len ~bits ~byts | Array -> let elt = xlate_type x (Llvm.element_type llt) in let len = Llvm.array_length llt in @@ -273,6 +269,7 @@ let rec xlate_type : x -> Llvm.lltype -> Typ.t = in Typ.struct_ ~name elts ~bits ~byts ~packed | Function -> fail "expected to be unsized: %a" pp_lltype llt () + | Vector -> todo "vector types: %a" pp_lltype llt () | Void | Label | Metadata | Token -> assert false else match Llvm.classify_type llt with