[PATCH] D111778: [WIP][X86] Update CPU_SPECIFIC list.

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 14 16:50:04 PDT 2021


craig.topper added a comment.

In D111778#3064555 <https://reviews.llvm.org/D111778#3064555>, @erichkeane wrote:

> In D111778#3064439 <https://reviews.llvm.org/D111778#3064439>, @craig.topper wrote:
>
>> In D111778#3064287 <https://reviews.llvm.org/D111778#3064287>, @FreddyYe wrote:
>>
>>> In D111778#3063891 <https://reviews.llvm.org/D111778#3063891>, @erichkeane wrote:
>>>
>>>> Supporting these types requires changes to the library so that we can check these, right?  Do you have the library changes for these as well?  The constants used to check for these features/etc needs to be present in the glibc library.
>>>
>>> Yes. It's highly related to the `ProcessorFeatures` I mentioned above. Does the `library changes` refer to the compiler-rt/cpu_model.c? I think that change depends on libgcc. For now libgcc has no strong will to update that table.
>>
>> Every feature gcc knows about should be in libgcc. The unfortunate problem now is that cpu_features2 in libgcc is an array thats size may be different with every version of gcc. Clang can’t know how big that array is without reading the libgcc.a symbol table at compile time. Without knowing the size we can’t access any bits past the first 32 bits of cpu_features2.
>
> libgcc entries are the ones I was concerned about.  We need to make sure this list matches that one (and we don't generate checks that it does not have).  @craig.topper can better clarify what needs to happen with the library lookup, but I THINK we keep a version of this in compiler-rt instead of using libgcc?

I don't know what needs to be done for the library lookup. I'm not sure if the compiler knows whether we are linking with compiler-rt or libgcc. That information is on the linker command line not necessarily the compiler command line.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111778/new/

https://reviews.llvm.org/D111778



More information about the cfe-commits mailing list