From e99129778baae09174d08ba434816da57dcba0ce Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Tue, 30 Jan 2024 12:53:35 -0500 Subject: [PATCH 1/4] Add CHANGELOG.md file --- CHANGELOG.md | 20 ++++++++++++++++++++ llvm-pretty-bc-parser.cabal | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..3461eb79 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,20 @@ +# Revision history for llvm-pretty-bc-parser + +## next (TBA) + +* Add preliminary support for LLVM versions up through 16. +* Require building with `llvm-pretty-0.12.*`. +* Add preliminary support for parsing opaque pointers. For now, + `llvm-pretty-bc-parser` will still fill in the types of certain instructions + with non-opaque pointer types (e.g., the type of memory to store in a `store` + instruction), so be wary of this if you are parsing a bitcode file that + contains opaque pointers. See also the discussion in + https://github.com/GaloisInc/llvm-pretty-bc-parser/issues/262. +* Improve the runtime performance of the parser. +* A variety of bugfixes. Some notable fixes include: + * Fix a bug in which the parser would fail to parse `DIDerivedType` nodes + produced by Apple Clang on macOS. + * Fix a bug in which the DWARF address space field of a `DIDerivedType` node + was parsed incorrectly. + * Fix a bug in which constant `fcmp`/`icmp` expressions would parse their + operands incorrectly. diff --git a/llvm-pretty-bc-parser.cabal b/llvm-pretty-bc-parser.cabal index 58ba2ddb..4da2e823 100644 --- a/llvm-pretty-bc-parser.cabal +++ b/llvm-pretty-bc-parser.cabal @@ -18,7 +18,7 @@ Description: Extra-source-files: disasm-test/tests/*.ll -extra-doc-files: README.md +extra-doc-files: CHANGELOG.md, README.md Flag fuzz Description: Enable fuzzing harness From de078cb1013a87a8973109324182c63df199d0b9 Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Tue, 30 Jan 2024 12:54:47 -0500 Subject: [PATCH 2/4] Bump llvm-pretty submodule to 0.12.0.0 (release version) This bumps the `llvm-pretty` submodule to bring in the changes from https://github.com/elliottt/llvm-pretty/pull/134. --- flake.lock | 6 +++--- llvm-pretty | 2 +- llvm-pretty-bc-parser.cabal | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index d134645a..252dd904 100644 --- a/flake.lock +++ b/flake.lock @@ -110,11 +110,11 @@ "llvm-pretty-src": { "flake": false, "locked": { - "lastModified": 1695743075, - "narHash": "sha256-RRh26tuRDksdWrPDGyoaBnsoPARWL8qa2PTMFtu7900=", + "lastModified": 1706635035, + "narHash": "sha256-Ho/3OKJgPWkkiF/OYKU3ObdCFUewNmA/EwAYRZLdIh8=", "owner": "elliottt", "repo": "llvm-pretty", - "rev": "8124fc0265b6ca5fde5812c789f40b2ea54af678", + "rev": "780e7c01cbd0b85172f11ea8edf0d7bbe6a84967", "type": "github" }, "original": { diff --git a/llvm-pretty b/llvm-pretty index 8124fc02..780e7c01 160000 --- a/llvm-pretty +++ b/llvm-pretty @@ -1 +1 @@ -Subproject commit 8124fc0265b6ca5fde5812c789f40b2ea54af678 +Subproject commit 780e7c01cbd0b85172f11ea8edf0d7bbe6a84967 diff --git a/llvm-pretty-bc-parser.cabal b/llvm-pretty-bc-parser.cabal index 4da2e823..c339087a 100644 --- a/llvm-pretty-bc-parser.cabal +++ b/llvm-pretty-bc-parser.cabal @@ -75,7 +75,7 @@ Library bytestring >= 0.10, containers >= 0.4, fgl >= 5.5, - llvm-pretty >= 0.11.0.0.101 && < 0.12, + llvm-pretty >= 0.12 && < 0.13, mtl >= 2.2.2, pretty >= 1.0.1, uniplate >= 1.6, From 395754789b2f1b1f3ffae22383f9522a3e44d68e Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Tue, 30 Jan 2024 12:57:24 -0500 Subject: [PATCH 3/4] Bump release version to 0.4.1.0 --- CHANGELOG.md | 2 +- llvm-pretty-bc-parser.cabal | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3461eb79..c12874f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Revision history for llvm-pretty-bc-parser -## next (TBA) +## 0.4.1.0 (January 2024) * Add preliminary support for LLVM versions up through 16. * Require building with `llvm-pretty-0.12.*`. diff --git a/llvm-pretty-bc-parser.cabal b/llvm-pretty-bc-parser.cabal index c339087a..dd3cb813 100644 --- a/llvm-pretty-bc-parser.cabal +++ b/llvm-pretty-bc-parser.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 Name: llvm-pretty-bc-parser -Version: 0.4.0.0.99 +Version: 0.4.1.0 License: BSD-3-Clause License-file: LICENSE Author: Trevor Elliott From a87b645aaed12df857d6e76e798b658dd1c7b324 Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Tue, 30 Jan 2024 12:58:24 -0500 Subject: [PATCH 4/4] Bump development version to 0.4.1.0.99 Also bump the `llvm-pretty` submodule to its development version, `0.12.0.0.99`. --- flake.lock | 4 ++-- llvm-pretty | 2 +- llvm-pretty-bc-parser.cabal | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index 252dd904..1bc3a044 100644 --- a/flake.lock +++ b/flake.lock @@ -111,10 +111,10 @@ "flake": false, "locked": { "lastModified": 1706635035, - "narHash": "sha256-Ho/3OKJgPWkkiF/OYKU3ObdCFUewNmA/EwAYRZLdIh8=", + "narHash": "sha256-d6roSOu6FMa/z/Rlio1TO+kJ09vx34gOz0NDhfMrF0o=", "owner": "elliottt", "repo": "llvm-pretty", - "rev": "780e7c01cbd0b85172f11ea8edf0d7bbe6a84967", + "rev": "e7b2bf1371e51bbc9e7a35070ae311b5a4b2c387", "type": "github" }, "original": { diff --git a/llvm-pretty b/llvm-pretty index 780e7c01..e7b2bf13 160000 --- a/llvm-pretty +++ b/llvm-pretty @@ -1 +1 @@ -Subproject commit 780e7c01cbd0b85172f11ea8edf0d7bbe6a84967 +Subproject commit e7b2bf1371e51bbc9e7a35070ae311b5a4b2c387 diff --git a/llvm-pretty-bc-parser.cabal b/llvm-pretty-bc-parser.cabal index dd3cb813..22cbf1f3 100644 --- a/llvm-pretty-bc-parser.cabal +++ b/llvm-pretty-bc-parser.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 Name: llvm-pretty-bc-parser -Version: 0.4.1.0 +Version: 0.4.1.0.99 License: BSD-3-Clause License-file: LICENSE Author: Trevor Elliott @@ -75,7 +75,7 @@ Library bytestring >= 0.10, containers >= 0.4, fgl >= 5.5, - llvm-pretty >= 0.12 && < 0.13, + llvm-pretty >= 0.12.0.0.99 && < 0.13, mtl >= 2.2.2, pretty >= 1.0.1, uniplate >= 1.6,