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
This commit is contained in:
eastb233 2024-11-20 18:42:38 +08:00
parent 77c83823aa
commit 7e2834bd03
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

@ -5,6 +5,7 @@
%bcond_with classic_flang
%bcond_with toolchain_clang
%bcond_without bisheng_autotuner
%bcond_without ACPO
%if %{with toolchain_clang}
%global toolchain clang
@ -46,7 +47,7 @@
Name: %{pkg_name}
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
Release: 26
Release: 27
Summary: The Low Level Virtual Machine
License: NCSA
@ -87,6 +88,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
@ -202,6 +205,12 @@ pathfix.py -i %{__python3} -pn \
utils/update_cc_test_checks.py
%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} \
@ -380,6 +389,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} %{__ninja} check-all -C %{__cmake
%{install_includedir}/llvm-gmock
%changelog
* Wed Nov 20 2024 eastb233 <xiezhiheng@huawei.com> - 17.0.6-27
- ACPO Infrastructure for ML integration into LLVM compiler
* Wed Nov 20 2024 eastb233 <xiezhiheng@huawei.com> - 17.0.6-26
- [LICM] Solve runtime error caused by the signal function.