[llvm-dev] Question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[llvm-dev] Question

Gerolf Hoflehner via llvm-dev
Hello,

Could someone please answer the following question:

Does LLVM support code generation for Intel Processors? Which Intel processors are supported? I am interested especially in Intel Xeon Processor, but you can give me information about the others as well.

Thank you,
Iulia

_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Question

Gerolf Hoflehner via llvm-dev
Hi Lulia,

On 4 June 2017 at 08:39, Iulia Stirb via llvm-dev
<[hidden email]> wrote:
> Does LLVM support code generation for Intel Processors? Which Intel
> processors are supported? I am interested especially in Intel Xeon
> Processor, but you can give me information about the others as well.

Yes, x86 output is supported. "Xeon" is just a brand name for Intel's
server chips though, and covers lots of very different CPUs going back
many years.

LLVM distinguishes them by which instructions the CPU supports, which
is mostly determined by which generation the chip is. You may have
heard names like "Haswell", "Skylake", "Canonlake" mentioned; and
those are what LLVM uses to choose what you're compiling for. For
example if you know your Xeon is a Skylake one you'd specify
"-mcpu=skylake" (or an equivalent via the C++ API if you're writing
your own compiler).

LLVM is capable of generating code for all of them, though some may
have had more tuning work for performance.

Cheers.

Tim.
_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Question

Gerolf Hoflehner via llvm-dev
Hello,

1. Can you please tell me how can I find the type of my Intel Xeon?
I see in LLVM code that Intel Xeon processors can be of type "core2", "penryn", "westmere", "skylake".

2. I also see that "skylake" can be a type and a subtype as well.
How can I find out the subtype of my architecture?

Looking forward for you answer. Thank you.
Iulia


On Sunday, June 4, 2017 7:11 PM, Tim Northover <[hidden email]> wrote:


Hi Lulia,

On 4 June 2017 at 08:39, Iulia Stirb via llvm-dev
<[hidden email]> wrote:
> Does LLVM support code generation for Intel Processors? Which Intel
> processors are supported? I am interested especially in Intel Xeon
> Processor, but you can give me information about the others as well.


Yes, x86 output is supported. "Xeon" is just a brand name for Intel's
server chips though, and covers lots of very different CPUs going back
many years.

LLVM distinguishes them by which instructions the CPU supports, which
is mostly determined by which generation the chip is. You may have
heard names like "Haswell", "Skylake", "Canonlake" mentioned; and
those are what LLVM uses to choose what you're compiling for. For
example if you know your Xeon is a Skylake one you'd specify
"-mcpu=skylake" (or an equivalent via the C++ API if you're writing
your own compiler).

LLVM is capable of generating code for all of them, though some may
have had more tuning work for performance.

Cheers.

Tim.




_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Question

Gerolf Hoflehner via llvm-dev
grep name /proc/cpuinfo

Then look up the model number in


On Mon, Jun 5, 2017 at 8:41 PM, Iulia Stirb via llvm-dev <[hidden email]> wrote:
Hello,

1. Can you please tell me how can I find the type of my Intel Xeon?
I see in LLVM code that Intel Xeon processors can be of type "core2", "penryn", "westmere", "skylake".

2. I also see that "skylake" can be a type and a subtype as well.
How can I find out the subtype of my architecture?

Looking forward for you answer. Thank you.
Iulia


On Sunday, June 4, 2017 7:11 PM, Tim Northover <[hidden email]> wrote:


Hi Lulia,

On 4 June 2017 at 08:39, Iulia Stirb via llvm-dev
<[hidden email]> wrote:
> Does LLVM support code generation for Intel Processors? Which Intel
> processors are supported? I am interested especially in Intel Xeon
> Processor, but you can give me information about the others as well.


Yes, x86 output is supported. "Xeon" is just a brand name for Intel's
server chips though, and covers lots of very different CPUs going back
many years.

LLVM distinguishes them by which instructions the CPU supports, which
is mostly determined by which generation the chip is. You may have
heard names like "Haswell", "Skylake", "Canonlake" mentioned; and
those are what LLVM uses to choose what you're compiling for. For
example if you know your Xeon is a Skylake one you'd specify
"-mcpu=skylake" (or an equivalent via the C++ API if you're writing
your own compiler).

LLVM is capable of generating code for all of them, though some may
have had more tuning work for performance.

Cheers.

Tim.




_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev



_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Question

Gerolf Hoflehner via llvm-dev
Can you also please tell me how can I find out the ABI (application binary interface)?

Thanks,
Iulia



On Monday, June 5, 2017 8:58 PM, Bruce Hoult <[hidden email]> wrote:


grep name /proc/cpuinfo

Then look up the model number in


On Mon, Jun 5, 2017 at 8:41 PM, Iulia Stirb via llvm-dev <[hidden email]> wrote:
Hello,

1. Can you please tell me how can I find the type of my Intel Xeon?
I see in LLVM code that Intel Xeon processors can be of type "core2", "penryn", "westmere", "skylake".

2. I also see that "skylake" can be a type and a subtype as well.
How can I find out the subtype of my architecture?

Looking forward for you answer. Thank you.
Iulia


On Sunday, June 4, 2017 7:11 PM, Tim Northover <[hidden email]> wrote:


Hi Lulia,

On 4 June 2017 at 08:39, Iulia Stirb via llvm-dev
<[hidden email]> wrote:
> Does LLVM support code generation for Intel Processors? Which Intel
> processors are supported? I am interested especially in Intel Xeon
> Processor, but you can give me information about the others as well.


Yes, x86 output is supported. "Xeon" is just a brand name for Intel's
server chips though, and covers lots of very different CPUs going back
many years.

LLVM distinguishes them by which instructions the CPU supports, which
is mostly determined by which generation the chip is. You may have
heard names like "Haswell", "Skylake", "Canonlake" mentioned; and
those are what LLVM uses to choose what you're compiling for. For
example if you know your Xeon is a Skylake one you'd specify
"-mcpu=skylake" (or an equivalent via the C++ API if you're writing
your own compiler).

LLVM is capable of generating code for all of them, though some may
have had more tuning work for performance.

Cheers.

Tim.




______________________________ _________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/ mailman/listinfo/llvm-dev





_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Question

Gerolf Hoflehner via llvm-dev
On 5 June 2017 at 11:54, Iulia Stirb <[hidden email]> wrote:
> Can you also please tell me how can I find out the ABI (application binary
> interface)?

Could you send your messages with a smaller font, or better still in
plain text? It's very distracting and quite difficult to read
(particularly your message about the errors MSVC was giving).

Anyway, your ABI will be determined by which OS you're compiling for
in almost all cases. And if you're building Clang on the same platform
you're running the binaries on that should be correctly detected when
you run CMake.

Otherwise you'll have to set the LLVM_DEFAULT_TARGET_TRIPLE CMake
variable. Typical values are "x86_64-linux-gnu",
"x86_64-apple-macosx10.12" or "x86_64-windows-msvc". That will also
set the corresponding ABI.

Cheers.

Tim.
_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Question

Gerolf Hoflehner via llvm-dev
Thank you. So the ABI in llvm will be "gnu" for all Linux distributions?


On Monday, June 5, 2017 11:39 PM, Tim Northover <[hidden email]> wrote:


On 5 June 2017 at 11:54, Iulia Stirb <[hidden email]> wrote:
> Can you also please tell me how can I find out the ABI (application binary
> interface)?

Could you send your messages with a smaller font, or better still in
plain text? It's very distracting and quite difficult to read
(particularly your message about the errors MSVC was giving).

Anyway, your ABI will be determined by which OS you're compiling for
in almost all cases. And if you're building Clang on the same platform
you're running the binaries on that should be correctly detected when
you run CMake.

Otherwise you'll have to set the LLVM_DEFAULT_TARGET_TRIPLE CMake
variable. Typical values are "x86_64-linux-gnu",
"x86_64-apple-macosx10.12" or "x86_64-windows-msvc". That will also
set the corresponding ABI.


Cheers.

Tim.



_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Question

Gerolf Hoflehner via llvm-dev
On 6 June 2017 at 10:46, Iulia Stirb <[hidden email]> wrote:
> Thank you. So the ABI in llvm will be "gnu" for all Linux distributions?

The last part of the triple will always be "gnu" for x86, yes. The ABI
itself I might call GNU, or SysV depending on exactly what I'm talking
about.

Cheers.

Tim.
_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Question

Gerolf Hoflehner via llvm-dev
I want to cross-compile using clang and I have to specify the following triple: 
<arch><sub>-<vendor>-<sys>-<abi>
I know that sub-architectures ("sub" in the triple) for x86_64 Intel Xeon processors could be v2 for ivy bridge or v3 for haswell or v4 etc. Could you please answer: which version of sub-architecture is considered sandy bridge for Intel® Xeon® processor E5-4600/2600/1600 product family (I am thinking it could be v1 or v0 in llvm)? Thank you.


On Wednesday, June 7, 2017 1:05 AM, Tim Northover <[hidden email]> wrote:


On 6 June 2017 at 10:46, Iulia Stirb <[hidden email]> wrote:
> Thank you. So the ABI in llvm will be "gnu" for all Linux distributions?

The last part of the triple will always be "gnu" for x86, yes. The ABI
itself I might call GNU, or SysV depending on exactly what I'm talking

about.

Cheers.

Tim.



_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Question

Gerolf Hoflehner via llvm-dev
On 8 June 2017 at 07:28, Iulia Stirb <[hidden email]> wrote:
> I know that sub-architectures ("sub" in the triple) for x86_64 Intel Xeon
> processors could be v2 for ivy bridge or v3 for haswell or v4 etc.

I don't think I've ever seen that notation. In fact I don't think
x86_64 uses sub-architectures at all. All Linux triples I've seen have
just been "x86_64-linux-gnu" with the CPU specified via a separate
-march=sandybridge option.

Cheers.

Tim.
_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Question

Gerolf Hoflehner via llvm-dev
On 6/8/2017 9:39 AM, Tim Northover via llvm-dev wrote:>
> I don't think I've ever seen that notation. In fact I don't think
> x86_64 uses sub-architectures at all. All Linux triples I've seen have
> just been "x86_64-linux-gnu" with the CPU specified via a separate
> -march=sandybridge option.

Wouldn't it be nice if the available values of the triple's components
were displayed under some option?  :)

-Krzysztof

--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev