[llvm-dev] How to find out the default CPU / Features String for a given triple?
David Spickett via llvm-dev
llvm-dev at lists.llvm.org
Thu Jan 23 02:04:29 PST 2020
What tools are you passing this triple to, and where did you get the list of features you showed? (looks like an MC level list to me)
Depending on the tool you'll get different levels of expansion of the features, "clang -###" is the most minimal then some things are expanded later in llvm-mc. (where is somewhat inconsistent)
From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Andrew Kelley via llvm-dev <llvm-dev at lists.llvm.org>
Sent: 23 January 2020 06:49
To: LLVM Dev <llvm-dev at lists.llvm.org>
Subject: [llvm-dev] How to find out the default CPU / Features String for a given triple?
When I pass an empty string for cpu and features to createTargetMachine,
and then use LLVMGetTargetMachineCPU() and
LLVMGetTargetMachineFeatureString() to get the strings back, they are
still empty. Is there a way to have llvm compute the effective
cpu/features string, and provide it so that I can inspect it?
I'm trying to figure out how the cpu/features string that I am
explicitly passing, which I am expecting to be equivalent to passing
empty string, is different.
As an example, I have a test passing in the CI using the triple
"aarch64v8.1a-unknown-linux-unknown", and "" for both CPU name and
target features string. However when I pass the following target
specific features string, I get qemu crashing in the CI:
Now, I understand that qemu crashing can be fixed by using a newer qemu
version. And, indeed, on my laptop with a newer qemu, the test passes.
However, this test was previously passing on the CI, which means that
with this explicit string of target specific features, *something is
different*. I am trying to determine what that different thing is.
Thanks in advance for the help,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev