From d18507a8b91c9ac36cccb15ffc247c57c702c53c Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Fri, 10 Sep 2021 17:12:28 -0400 Subject: [PATCH] Support parsing `freeze` instructions This bumps the llvm-pretty submodule to include elliottt/llvm-pretty#85. Fixes #165. --- llvm-pretty | 2 +- src/Data/LLVM/BitCode/IR/Function.hs | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/llvm-pretty b/llvm-pretty index 226e7526..5a821ad5 160000 --- a/llvm-pretty +++ b/llvm-pretty @@ -1 +1 @@ -Subproject commit 226e75264c7f5b40539fa792c99dcc2214b81c32 +Subproject commit 5a821ad50edc33047c75311b7d7b31bd5fc52c21 diff --git a/src/Data/LLVM/BitCode/IR/Function.hs b/src/Data/LLVM/BitCode/IR/Function.hs index 12755893..779a8782 100644 --- a/src/Data/LLVM/BitCode/IR/Function.hs +++ b/src/Data/LLVM/BitCode/IR/Function.hs @@ -982,6 +982,16 @@ parseFunctionBlockEntry _ t d (fromEntry -> Just r) = case recordCode r of mkInstr <- field ix unop result (typedType v) (mkInstr v) d + -- [attr, cc, norm, transfs, + -- fnty, fnid, args...] + 57 -> label "FUNC_CODE_INST_CALLBR" $ do + notImplemented + + -- [opty, opval] + 58 -> label "FUNC_CODE_INST_FREEZE" $ do + (v,_) <- getValueTypePair t r 0 + result (typedType v) (Freeze v) d + -- [opty,opval,opval,pred] code