[PATCH] D117244: [llvm-dis] Add an option `dump-thinlto-index-only` in llvm-dis to read ThinLTO minimized code only.
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 18 17:56:22 PST 2022
tejohnson added inline comments.
================
Comment at: llvm/lib/Bitcode/Reader/BitcodeReader.cpp:3269
+ //
+ // FIXME: BitcodeReader should handle GLOBALVAR written by
+ // ThinLinkBitcodeWriter. (see
----------------
FYI looks like FUNCTION, ALIAS and IFUNC have the same issue. I'm not sure if there is a good common place to leave a comment about handling all of those?
================
Comment at: llvm/test/Bitcode/thinlto-index-disassembled-by-llvm-dis.ll:14
+; Tests that `llvm-dis` could disassemble minimized bitcode with `--dump-thinlto-index-only`, and verify its content.
+; RUN: llvm-dis --dump-thinlto-index-only %t.thinlink.bc -o - | FileCheck %s --check-prefix=DIS
+
----------------
Check that the option also works on %t.o
================
Comment at: llvm/tools/llvm-dis/llvm-dis.cpp:79
+ "dump-thinlto-index-only",
+ cl::desc("Only read thinlto index and dump the index as a bitcode file."),
+ cl::init(false), cl::Hidden, cl::cat(DisCategory));
----------------
"dump the index as a bitcode file" Do you mean dump/print the LLVM assembly? Suggest replacing "dump" with "print" in the option also.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117244/new/
https://reviews.llvm.org/D117244
More information about the llvm-commits
mailing list