ACPO Infrastructure for ML integration into LLVM compiler

Sync https://gitee.com/openeuler/llvm-project/pulls/89
and build.sh in https://gitee.com/openeuler/llvm-project/pulls/92

(cherry picked from commit 8f5e9315bb0f90e7efa610731832780d27fe6037)
This commit is contained in:
eastb233 2024-11-20 15:20:02 +08:00 committed by openeuler-sync-bot
parent 791c03733c
commit 8883917445
3 changed files with 7934 additions and 1 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,7 @@
%bcond_with classic_flang
%bcond_with toolchain_clang
%bcond_without bisheng_autotuner
%bcond_without ACPO
%if %{with toolchain_clang}
%global toolchain clang
@ -44,7 +45,7 @@
Name: %{pkg_name}
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
Release: 25
Release: 26
Summary: The Low Level Virtual Machine
License: NCSA
@ -85,6 +86,8 @@ Patch27: 0027-AArch64-Delete-hip09-macro.patch
Patch28: 0028-backport-Clang-Fix-crash-with-fzero-call-used-regs.patch
Patch29: 0029-SimplifyLibCalls-Merge-sqrt-into-the-power-of-exp-79.patch
Patch30: 0030-LICM-Solve-runtime-error-caused-by-the-signal-functi.patch
Patch31: 0031-ACPO-ACPO-Infrastructure.patch
Patch32: 0032-ACPO-Introduce-MLInliner-using-ACPO-infrastructure.patch
BuildRequires: binutils-devel
BuildRequires: cmake
@ -203,6 +206,12 @@ pathfix.py -i %{__python3} -pn \
mkdir -p _build
cd _build
%if %{with ACPO}
echo "enable ACPO"
export CFLAGS="-Wp,-DENABLE_ACPO ${CFLAGS}"
export CXXFLAGS="-Wp,-DENABLE_ACPO ${CXXFLAGS}"
%endif
%cmake .. -G Ninja \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DLLVM_PARALLEL_LINK_JOBS=%{max_link_jobs} \
@ -381,6 +390,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} %{__ninja} check-all -C ./_build
%{install_includedir}/llvm-gmock
%changelog
* Wed Nov 20 2024 eastb233 <xiezhiheng@huawei.com> - 17.0.6-26
- ACPO Infrastructure for ML integration into LLVM compiler
* Wed Nov 20 2024 eastb233 <xiezhiheng@huawei.com> - 17.0.6-25
- [LICM] Solve runtime error caused by the signal function.