[PATCH] D66526: [utils] Add the llvm-locstats tool
Jordan Rupprecht via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 1 11:12:51 PDT 2019
rupprecht added a comment.
I see this is reverted again; a couple comments while trying to import this:
================
Comment at: llvm/trunk/test/tools/llvm-locstats/locstats.ll:1-2
+; RUN: llc %s -o %t0.o -filetype=obj \
+; RUN: | %llvm-locstats %t0.o | FileCheck %s --check-prefix=LOCSTATS
+;
----------------
The pipe should be deleted; `llc` is generating `%t0.o` as an intermediate object file and `llvm-locstats` is parsing that, not stdin. The stdout of llc is empty.
(If you want to support stdin, that should be a different test case)
================
Comment at: llvm/trunk/utils/llvm-locstats/llvm-locstats.py:107-109
+ # Get the directory of the LLVM tools.
+ llvm_dwarfdump_cmd = os.path.join(os.path.dirname(__file__), \
+ "llvm-dwarfdump")
----------------
This assumes that `llvm-dwarfdump` exists in the same directory as `llvm-locstats`, which may not be true, e.g. for build systems that build dwardump and locstats in separate build trees. Can this be configurable? Possibly a regular `$PATH` lookup makes sense here (with cwd as a preferred location), although allowing a flag pointing to the location of dwarfdump would be the most flexible.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66526/new/
https://reviews.llvm.org/D66526
More information about the llvm-commits
mailing list