Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 715612 - dev-util/llvm-polly: Polly - Polyhedral optimizations for LLVM
Summary: dev-util/llvm-polly: Polly - Polyhedral optimizations for LLVM
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal with 13 votes (vote)
Assignee: Default Assignee for New Packages
URL:
Whiteboard:
Keywords: PullRequest
: 771138 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-03-31 12:28 UTC by Constantin Runge
Modified: 2024-04-08 00:08 UTC (History)
13 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
LLVM ebuild (llvm-11.1.0-r2.ebuild,12.56 KB, text/plain)
2021-04-04 09:11 UTC, David Carlos Manuelda
Details
Polly 12.0.0 (polly-12.0.0.ebuild,1.74 KB, text/plain)
2021-04-22 05:48 UTC, Leonardo Neumann
Details
Polly 13.0.0 (polly-13.0.0.ebuild,1.45 KB, text/plain)
2021-12-04 07:38 UTC, Leonardo Neumann
Details
Building LLVM Polly 15 without ebuild modification. Removed GPGPU codegen and installation of related libraries. (llvm:15,1.15 KB, text/plain)
2023-05-06 12:25 UTC, Seryoga Leshii
Details
Building LLVM Polly 16 without ebuild modification (llvm:16,1.06 KB, text/plain)
2023-05-06 12:26 UTC, Seryoga Leshii
Details
llvm modified ebuild (llvm-15.0.7-r3.ebuild,12.74 KB, application/vnd.gentoo.ebuild)
2023-06-15 08:11 UTC, David Carlos Manuelda
Details
llvm:15[polly?,lto?] (llvm-15.0.7-r3.ebuild,13.44 KB, application/vnd.gentoo.ebuild)
2023-06-15 08:34 UTC, David Carlos Manuelda
Details
llvm:16[polly?,lto?] (llvm-16.0.6.ebuild,13.67 KB, application/vnd.gentoo.ebuild)
2023-06-15 08:45 UTC, David Carlos Manuelda
Details
llvm-15.0.7-r3[polly?,lto?] (llvm-15.0.7-r3.ebuild,13.45 KB, application/vnd.gentoo.ebuild)
2023-06-15 10:27 UTC, David Carlos Manuelda
Details
llvm-16.0.6[polly?,lto?] (llvm-16.0.6.ebuild,13.51 KB, application/vnd.gentoo.ebuild)
2023-06-15 10:28 UTC, David Carlos Manuelda
Details
llvm-15.0.7-r3[polly?,lto?] (llvm-15.0.7-r3.ebuild,13.87 KB, application/vnd.gentoo.ebuild)
2023-06-17 13:04 UTC, David Carlos Manuelda
Details
llvm-16.0.6[polly?,lto?] (llvm-16.0.6.ebuild,13.93 KB, application/vnd.gentoo.ebuild)
2023-06-17 13:05 UTC, David Carlos Manuelda
Details
llvm-15.0.7-r3[polly?,lto?] (llvm-15.0.7-r3.ebuild,13.93 KB, application/vnd.gentoo.ebuild)
2023-06-17 19:32 UTC, David Carlos Manuelda
Details
llvm-16.0.6[polly?,lto?] (llvm-16.0.6.ebuild,14.01 KB, application/vnd.gentoo.ebuild)
2023-06-17 19:32 UTC, David Carlos Manuelda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Constantin Runge 2020-03-31 12:28:16 UTC
I'd like to request adding polly [1].

polly is a part of the llvm projects. It's their 'Framework for High-Level Loop and Data-Locality Optimizations'. As such, it is quite similar to gcc's Graphite.

As it is part of the llvm-project [2], I guess it should be buildable using the llvm.org eclass as well.

  [1] polly.llvm.org
  [2] https://github.com/llvm/llvm-project/tree/master/polly
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-02-17 20:03:23 UTC
*** Bug 771138 has been marked as a duplicate of this bug. ***
Comment 2 David Carlos Manuelda 2021-04-04 09:10:48 UTC
As a playground I modified the LLVM ebuild with an use flag to include polly support.

For now, due my limited knowledge about the LLVM build system, it is for the moment built statically.

Someone could take a look for building it as a library? I tried to modify distribution_components functions to add it, but somehow its libraries are not installed.

Anyway this static version works in my tests and can be a good place to start?
Comment 3 David Carlos Manuelda 2021-04-04 09:11:43 UTC
Created attachment 697146 [details]
LLVM ebuild

LLVM ebuild with static polly support via USE flag
Comment 4 David Carlos Manuelda 2021-04-04 12:40:02 UTC
Note that attached ebuild will make polly to work in currently installed Clang but will break every LLVM dependant install due to not installing Polly LLVMPolly and PollyISL libraries
Comment 5 Leonardo Neumann 2021-04-21 00:56:20 UTC
(In reply to David Carlos Manuelda from comment #4)
> Note that attached ebuild will make polly to work in currently installed
> Clang but will break every LLVM dependant install due to not installing
> Polly LLVMPolly and PollyISL libraries

Could you please describe the steps to reproduce the problem with your ebuild?
I ported your modifications to LLVM 12.0.0, but it seems to work both using Clang and rustc. I will use it for a few more days to see if something comes up.
Comment 6 David Carlos Manuelda 2021-04-21 17:14:53 UTC
(In reply to Leonardo Neumann from comment #5)
> (In reply to David Carlos Manuelda from comment #4)
> > Note that attached ebuild will make polly to work in currently installed
> > Clang but will break every LLVM dependant install due to not installing
> > Polly LLVMPolly and PollyISL libraries
> 
> Could you please describe the steps to reproduce the problem with your
> ebuild?
> I ported your modifications to LLVM 12.0.0, but it seems to work both using
> Clang and rustc. I will use it for a few more days to see if something comes
> up.

The ebuild I posted will work, however, once installed/merged, other LLVM dependant software will fail at configure stage due to missing files.

To reproduce, install LLVM with this changes and then try to emerge clang, at Cmake's configure stage it will complain about some .a files not installed by the ebuild.
Comment 7 Leonardo Neumann 2021-04-22 05:48:03 UTC
Created attachment 701571 [details]
Polly 12.0.0

Well, I managed to get polly as a standalone package and it seems to work fine and pass on all the supported tests. However, it has the drawback that you have to load it as an external optimization pass, which I think that can be solved by properly linking llvm against polly. To build a program using clang with standalone polly, you can do something like this:

clang -Xclang -load -Xclang libPolly.so -O2 -mllvm -polly test.c
Comment 8 David Carlos Manuelda 2021-04-22 10:58:06 UTC
(In reply to Leonardo Neumann from comment #7)
> Created attachment 701571 [details]
> Polly 12.0.0
> 
> Well, I managed to get polly as a standalone package and it seems to work
> fine and pass on all the supported tests. However, it has the drawback that
> you have to load it as an external optimization pass, which I think that can
> be solved by properly linking llvm against polly. To build a program using
> clang with standalone polly, you can do something like this:
> 
> clang -Xclang -load -Xclang libPolly.so -O2 -mllvm -polly test.c

I also saw that ebuild and tested that way.

Unfortunatelly using it this way breaks many packages, specially some autotools based.

The best would be to build LLVM with support for it but done in the proper way otherwise the build process would be a nightmare:

Build first LLVM+clang
Build polly
Rebuild LLVM (+clang?) to link against it
Comment 9 Perfect Gentleman 2021-04-22 11:53:45 UTC
I've implemented Polly several months ago without ebuilds modifications.
Comment 10 Leonardo Neumann 2021-04-22 12:19:22 UTC
(In reply to David Carlos Manuelda from comment #8)

> Unfortunatelly using it this way breaks many packages, specially some
> autotools based.

It shouldn't break anything, as long as the user can provide custom compiler flags. But I agree that linking against LLVM should be way more practical and we are not too far from achieving that.

(In reply to Perfect Gentleman from comment #9)
> I've implemented Polly several months ago without ebuilds modifications.

I stumbled upon your implementation, but unfortunately I didn't manage to get the tests running. Does it fix the linking problems with clang and other LLVM-dependent programs?
Comment 11 Perfect Gentleman 2021-06-17 17:57:02 UTC
(In reply to Leonardo Neumann from comment #10)
> I stumbled upon your implementation, but unfortunately I didn't manage to
> get the tests running. Does it fix the linking problems with clang and other
> LLVM-dependent programs?

Hmm... It's needed to add some extra LDFLAGS for LLVM staff.
Comment 12 unhappy-ending 2021-10-02 05:13:21 UTC
(In reply to Perfect Gentleman from comment #9)
> I've implemented Polly several months ago without ebuilds modifications.

Hi PG, how can I do this? I'd like to be able to test Polly. Thank you.
Comment 13 Leandro Hoshiko 2021-10-15 01:25:36 UTC
(In reply to unhappy-ending from comment #12)
> (In reply to Perfect Gentleman from comment #9)
> > I've implemented Polly several months ago without ebuilds modifications.
> 
> Hi PG, how can I do this? I'd like to be able to test Polly. Thank you.

I think you need to rebuild LLVM adding the Polly libraries -lPolly -lPollyISL in linker.

It works up to LLVM 12. In LLVM 13 I'm having linking error because lld is picking the 32-bit library instead of the 64-bit in the 64-bit compile phase, throwing an error of being incompatible with elf64-x86-64 (I've adapted the ebuild to be multilib).
Comment 14 Leonardo Neumann 2021-12-04 07:38:47 UTC
Created attachment 757373 [details]
Polly 13.0.0

The linker flags are the only missing thing to get Polly to work without the annoying plugin loading flags. I've been experimenting with Perfect Gentleman's ebuild for a while, and did some slight modifications, as both LLVM_POLLY_LINK_INTO_TOOLS and LLVM_CMAKE_PATH are not required for the ebuild to work. Also, the LDFLAGS are only required on the LLVM package, as both clang and rustc forwards polly optimizations to LLVM. Please test this ebuild and report whether it works for you.
Comment 15 Leonardo Neumann 2021-12-04 07:52:34 UTC
The only step that I think it would be important now is to add a polly useflag into LLVM ebuild so it pulls Polly as a dependency and also adds the required LDFLAGS for it to work.
Comment 16 Perfect Gentleman 2021-12-04 08:42:38 UTC
(In reply to Leonardo Neumann from comment #14)
> Created attachment 757373 [details]
> Polly 13.0.0

Tried your ebuild, built polly and tried to rebuild llvm
---
    ld.lld: error: unable to find library -lPolly
    ld.lld: error: unable to find library -lPollyISL
---
Comment 17 Leonardo Neumann 2021-12-04 08:57:36 UTC
(In reply to Perfect Gentleman from comment #16)
> (In reply to Leonardo Neumann from comment #14)
> > Created attachment 757373 [details]
> > Polly 13.0.0
> 
> Tried your ebuild, built polly and tried to rebuild llvm
> ---
>     ld.lld: error: unable to find library -lPolly
>     ld.lld: error: unable to find library -lPollyISL
> ---

Those libraries should be available under /usr/lib/llvm/13/lib/libPolly{ISL}.a, just like in your ebuild. I only removed LLVM_POLLY_LINK_INTO_TOOLS that should add the LDFLAGS in the LLVM tools if you build both LLVM and Polly together. Can you please check the installation image if these files are available?
Comment 18 Perfect Gentleman 2021-12-04 09:00:27 UTC
(In reply to Leonardo Neumann from comment #17)
> Those libraries should be available under
> /usr/lib/llvm/13/lib/libPolly{ISL}.a, just like in your ebuild. I only
> removed LLVM_POLLY_LINK_INTO_TOOLS that should add the LDFLAGS in the LLVM
> tools if you build both LLVM and Polly together. Can you please check the
> installation image if these files are available?

No, my ebuild installs them into /usr/lib64
-------
/usr/lib64/libPolly.a
/usr/lib64/libPollyISL.a
-------
Comment 19 Perfect Gentleman 2021-12-04 09:08:13 UTC
(In reply to Perfect Gentleman from comment #18)
> (In reply to Leonardo Neumann from comment #17)
> > Those libraries should be available under
> > /usr/lib/llvm/13/lib/libPolly{ISL}.a, just like in your ebuild. I only
> > removed LLVM_POLLY_LINK_INTO_TOOLS that should add the LDFLAGS in the LLVM
> > tools if you build both LLVM and Polly together. Can you please check the
> > installation image if these files are available?
> 
> No, my ebuild installs them into /usr/lib64
> -------
> /usr/lib64/libPolly.a
> /usr/lib64/libPollyISL.a
> -------

ebuild for polly-12.0 installed there
Comment 20 Seryoga Leshii 2023-05-06 12:25:55 UTC
Created attachment 861218 [details]
Building LLVM Polly 15 without ebuild modification. Removed GPGPU codegen and installation of related libraries.
Comment 21 Seryoga Leshii 2023-05-06 12:26:27 UTC
Created attachment 861219 [details]
Building LLVM Polly 16 without ebuild modification
Comment 22 Seryoga Leshii 2023-05-06 12:28:43 UTC
Just add the files I've included to /etc/portage/env/sys-devel/ and you'll be able to build Polly as part of LLVM without having to modify the ebulids.
Comment 23 Seryoga Leshii 2023-05-06 12:31:22 UTC
Why not add support for building Polly along with LLVM via a USE-flag, similar to GCC and Graphite?
Comment 24 Seryoga Leshii 2023-05-06 12:49:24 UTC
Comment on attachment 861219 [details]
Building LLVM Polly 16 without ebuild modification

>MYCMAKEARGS+='-DLLVM_ENABLE_PROJECTS="polly" '
>MYCMAKEARGS+='-DLLVM_DISTRIBUTION_COMPONENTS=$(printf "%s;%s" $(get_distribution_components) "Polly;LLVMCore;LLVMScalarOpts;LLVMInstCombine;LLVMTransformUtils;LLVMAnalysis;LLVMipo;LLVMMC;LLVMPasses;LLVMLinker;LLVMIRReader;LLVMBitReader;LLVMMCParser;LLVMObject;LLVMProfileData;LLVMTarget;LLVMTargetParser;LLVMVectorize;LLVMBinaryFormat;LLVMRemarks;LLVMAsmParser;LLVMBitstreamReader;LLVMAggressiveInstCombine;LLVMBitWriter;LLVMFrontendOpenMP;LLVMInstrumentation;LLVMBinaryFormat;LLVMDebugInfoCodeView;LLVMTextAPI;LLVMAsmPrinter;LLVMSymbolize;LLVMDebugInfoDWARF;LLVMCodeGen;LLVMCoroutines;LLVMIRPrinter;LLVMObjCARCOpts;LLVMDebugInfoMSF;LLVMDebugInfoPDB;LLVMSelectionDAG;LLVMExtensions;") '
>MYCMAKEARGS+='-DLLVM_TOOL_POLLY_BUILD=ON -DLLVM_POLLY_LINK_INTO_TOOLS=ON '
>LLVM_COMPONENTS=( llvm cmake polly )
>
>function post_src_install() {
>    function polly_install() {
>	DESTDIR=${D} cmake_build tools/polly/install/strip
>    }
>    
>    multilib_foreach_abi polly_install
>}
Comment 25 Seryoga Leshii 2023-05-06 12:52:09 UTC
Comment on attachment 861218 [details]
Building LLVM Polly 15 without ebuild modification. Removed GPGPU codegen and installation of related libraries.

>MYCMAKEARGS+='-DLLVM_ENABLE_PROJECTS="polly" '
>MYCMAKEARGS+='-DLLVM_DISTRIBUTION_COMPONENTS=$(printf "%s;%s" $(get_distribution_components) "Polly;LLVMCore;LLVMScalarOpts;LLVMInstCombine;LLVMTransformUtils;LLVMAnalysis;LLVMipo;LLVMMC;LLVMPasses;LLVMLinker;LLVMIRReader;LLVMBitReader;LLVMMCParser;LLVMObject;LLVMProfileData;LLVMTarget;LLVMVectorize;LLVMBinaryFormat;LLVMRemarks;LLVMAsmParser;LLVMBitstreamReader;LLVMAggressiveInstCombine;LLVMBitWriter;LLVMFrontendOpenMP;LLVMInstrumentation;LLVMBinaryFormat;LLVMDebugInfoCodeView;LLVMTextAPI;LLVMAsmPrinter;LLVMSymbolize;LLVMDebugInfoDWARF;LLVMCodeGen;LLVMCoroutines;LLVMObjCARCOpts;LLVMDebugInfoMSF;LLVMDebugInfoPDB;LLVMSelectionDAG;LLVMExtensions;") '
>MYCMAKEARGS+='-DLLVM_TOOL_POLLY_BUILD=ON -DLLVM_POLLY_LINK_INTO_TOOLS=ON '
>LLVM_COMPONENTS=( llvm cmake polly third-party )
>
>function pre_src_unpack() {
>    LLVM_COMPONENTS=( llvm cmake polly third-party)
>    llvm.org_src_unpack
>}
>
>function post_src_install() {
>    function polly_install() {
>	DESTDIR=${D} cmake_build tools/polly/install/strip
>    }
>    
>    multilib_foreach_abi polly_install
>}
Comment 26 David Carlos Manuelda 2023-06-15 08:11:33 UTC
Created attachment 863850 [details]
llvm modified ebuild

LLVM-15 ebuild modified to enable polly and lto as IUSE
Comment 27 David Carlos Manuelda 2023-06-15 08:11:59 UTC
(In reply to Seryoga Leshii from comment #25)
> Comment on attachment 861218 [details]
> Building LLVM Polly 15 without ebuild modification. Removed GPGPU codegen
> and installation of related libraries.
> 
> >MYCMAKEARGS+='-DLLVM_ENABLE_PROJECTS="polly" '
> >MYCMAKEARGS+='-DLLVM_DISTRIBUTION_COMPONENTS=$(printf "%s;%s" $(get_distribution_components) "Polly;LLVMCore;LLVMScalarOpts;LLVMInstCombine;LLVMTransformUtils;LLVMAnalysis;LLVMipo;LLVMMC;LLVMPasses;LLVMLinker;LLVMIRReader;LLVMBitReader;LLVMMCParser;LLVMObject;LLVMProfileData;LLVMTarget;LLVMVectorize;LLVMBinaryFormat;LLVMRemarks;LLVMAsmParser;LLVMBitstreamReader;LLVMAggressiveInstCombine;LLVMBitWriter;LLVMFrontendOpenMP;LLVMInstrumentation;LLVMBinaryFormat;LLVMDebugInfoCodeView;LLVMTextAPI;LLVMAsmPrinter;LLVMSymbolize;LLVMDebugInfoDWARF;LLVMCodeGen;LLVMCoroutines;LLVMObjCARCOpts;LLVMDebugInfoMSF;LLVMDebugInfoPDB;LLVMSelectionDAG;LLVMExtensions;") '
> >MYCMAKEARGS+='-DLLVM_TOOL_POLLY_BUILD=ON -DLLVM_POLLY_LINK_INTO_TOOLS=ON '
> >LLVM_COMPONENTS=( llvm cmake polly third-party )
> >
> >function pre_src_unpack() {
> >    LLVM_COMPONENTS=( llvm cmake polly third-party)
> >    llvm.org_src_unpack
> >}
> >
> >function post_src_install() {
> >    function polly_install() {
> >	DESTDIR=${D} cmake_build tools/polly/install/strip
> >    }
> >    
> >    multilib_foreach_abi polly_install
> >}

I am creating ebuilds based in your work
Comment 28 David Carlos Manuelda 2023-06-15 08:34:14 UTC
Created attachment 863851 [details]
llvm:15[polly?,lto?]

LLVM:15 ebuild with polly and lto available as IUSE (to mimic gcc with graphite and lto IUSE)
Comment 29 David Carlos Manuelda 2023-06-15 08:45:27 UTC
Created attachment 863852 [details]
llvm:16[polly?,lto?]

llvm:16 polly and lto available as IUSE
Comment 30 David Carlos Manuelda 2023-06-15 09:33:47 UTC
Now the problem with my ebuilds is that I can not compile clang with polly enabled. Will investigate further
Comment 31 David Carlos Manuelda 2023-06-15 10:26:40 UTC
(In reply to David Carlos Manuelda from comment #30)
> Now the problem with my ebuilds is that I can not compile clang with polly
> enabled. Will investigate further

Fixed as of missing LLVMExtensions in export, will fix the ebuilds now.

Instead of "maintainer wanted" can this be addressed by the @llvm herd so it is permanent? since only llvm ebuild needs to be changed.
Comment 32 David Carlos Manuelda 2023-06-15 10:27:37 UTC
Created attachment 863857 [details]
llvm-15.0.7-r3[polly?,lto?]
Comment 33 David Carlos Manuelda 2023-06-15 10:28:03 UTC
Created attachment 863858 [details]
llvm-16.0.6[polly?,lto?]
Comment 34 David Carlos Manuelda 2023-06-17 13:04:56 UTC
Created attachment 864049 [details]
llvm-15.0.7-r3[polly?,lto?]

Ebuild cleaned and now use distribution_components to be installed instead of a post_src_install
Comment 35 David Carlos Manuelda 2023-06-17 13:05:13 UTC
Created attachment 864050 [details]
llvm-16.0.6[polly?,lto?]

Ebuild cleaned and now use distribution_components to be installed instead of a post_src_install
Comment 36 David Carlos Manuelda 2023-06-17 13:26:32 UTC
There are some strip errors which are non fatal but annoying as they only happen in the newly added files for Polly.

Could someone look and try to fix that so the ebuild is as correct as possible? I don't have enough knowledge beyond this point.
Comment 37 David Carlos Manuelda 2023-06-17 19:32:31 UTC
Created attachment 864070 [details]
llvm-15.0.7-r3[polly?,lto?]

Correctly install Polly files
Comment 38 David Carlos Manuelda 2023-06-17 19:32:52 UTC
Created attachment 864071 [details]
llvm-16.0.6[polly?,lto?]

Correctly install Polly files
Comment 39 Oleksa 2024-02-08 18:21:07 UTC
Dear David!

Can You please fix ebuild for LLVM version 17.0.6?

I've renamed 16.0.6 but got errors while configured:


CMake Error: install(EXPORT "LLVMExports" ...) includes target "LLVMCodeGen" which requires target "LLVMCodeGenTypes" that is not in any export set.
CMake Error: install(EXPORT "LLVMExports" ...) includes target "LLVMSelectionDAG" which requires target "LLVMCodeGenTypes" that is not in any export set.
CMake Error: install(EXPORT "LLVMExports" ...) includes target "LLVMAsmPrinter" which requires target "LLVMCodeGenTypes" that is not in any export set.
CMake Error: install(EXPORT "LLVMExports" ...) includes target "LLVMSymbolize" which requires target "LLVMDebugInfoBTF" that is not in any export set.
CMake Error: install(EXPORT "LLVMExports" ...) includes target "LLVMNVPTXCodeGen" which requires target "LLVMCodeGenTypes" that is not in any export set.


Thanks!
Comment 40 Sandi (Sandy) Vujaković 2024-03-26 06:54:01 UTC
I might be more practical to switch to the version of LLVM from xarblu's overlay which then links to the Polly package from said overlay if the `polly` USE flag is enabled:
https://gpo.zugaina.org/Overlays/xarblu-overlay/sys-devel/polly
https://gpo.zugaina.org/Overlays/xarblu-overlay/sys-devel/llvm
https://github.com/xarblu/xarblu-overlay

Note: As far as I can tell, when Polly is built externally, `-Xclang -load -Xclang libPolly.so` is needed, but I've not needed that with the packages listed above for whatever reason.
Comment 41 David Carlos Manuelda 2024-04-05 13:07:29 UTC
(In reply to Sandi (Sandy) Vujaković from comment #40)
> I might be more practical to switch to the version of LLVM from xarblu's
> overlay which then links to the Polly package from said overlay if the
> `polly` USE flag is enabled:
> https://gpo.zugaina.org/Overlays/xarblu-overlay/sys-devel/polly
> https://gpo.zugaina.org/Overlays/xarblu-overlay/sys-devel/llvm
> https://github.com/xarblu/xarblu-overlay
> 
> Note: As far as I can tell, when Polly is built externally, `-Xclang -load
> -Xclang libPolly.so` is needed, but I've not needed that with the packages
> listed above for whatever reason.

This happens when polly and LLVM are compiled in separate stage(packages) then you need to indicate clang to load polly library.

In the ebuilds I made, polly is built along with LLVM and LLVM is linked against it so there is no need for extra clang indications (which IMHO is a more correct aproach).

I will prepare soon a PR with updated ebuilds (starting from 18+) so they are reviewed and accepted by Gentoo team.
Comment 42 David Carlos Manuelda 2024-04-05 14:50:31 UTC
Since I am not the original reported I kindly ask for 2 changes:

* Change title to: sys-devel/llvm: Add polyhedral optimizations support (polly IUSE)
* Add https://github.com/gentoo/gentoo/pull/36119 PR to "see also" section

Hope this can be reviewed and accepted by Gentoo devs.