.. _Installation-label: Installation ============ NEC LLVM-IR Vectorizer ---------------------- You can install and uninstall NEC LLVM-IR Vectorizer by yum command. Installation ^^^^^^^^^^^^ Install SX-Aurora TSUBASA software repository setting files. .. code-block:: console # yum install https://sxauroratsubasa.sakura.ne.jp/repos/TSUBASA-soft-release-2.8-1.noarch.rpm Install devel packages of SDK and MPI. .. code-block:: console # TSUBASA_GROUPS="nec-sdk-devel nec-mpi-devel" # /opt/nec/ve/sbin/TSUBASA-groups-remark.sh $TSUBASA_GROUPS # yum group install $TSUBASA_GROUPS Install :program:`llvm-vec` with following command. .. code-block:: console # yum install https://sxauroratsubasa.sakura.ne.jp/repos/additional/llvm-vec/llvm-vec_el/2.3.0/nec-llvm-vec-2.3-2.3.0-1.x86_64.rpm The following components will be installed. .. list-table:: :widths: 10 20 30 :header-rows: 1 * - **Component** - **Directory** - **Files** * - Command - /opt/nec/ve/llvm-vec/|release|/bin - llvm-vec * - Libraries - /opt/nec/ve/llvm-vec/|release|/lib - | libncc.a (static library) | libncc.so, libncc.so.2, libncc.so.2.X.Y (shared library) | trbk_init.o, trbk_init_s.o (used by :option:`-traceback`) Uninstallation ^^^^^^^^^^^^^^ Uninstall :program:`llvm-vec` with following command. .. code-block:: console # yum remove nec-llvm-vec-2.3 Uninstall devel packages of SDK and MPI. .. note:: If you are using any SDK or MPI, do not the following procedure. .. code-block:: console # TSUBASA_GROUPS="nec-sdk-devel nec-mpi-devel" # /opt/nec/ve/sbin/TSUBASA-groups-remark.sh $TSUBASA_GROUPS # yum group remove $TSUBASA_GROUPS .. _Clang_LLVM-label: Clang and LLVM -------------- The Clang/LLVM using NEC LLVM-IR Vectorizer can be built and installed by the following commands. You can refer the patched source codes when you want to implement your own compiler front-end and driver using NEC LLVM-IR Vectorizer. .. note:: See :ref:`Requirements-label` before installation. You can download the patches used in the following commands from the following link. :download:`Download the patches from here ` .. note:: The patches are just for reference and NEC makes no warranty in any defects in them. First of all, activate `devtoolset-8` when your OS version is 7.X. Skip this when your OS version is 8.X. .. code-block:: console $ cat /etc/redhat-release # check wheather OS version is 7.x or not. CentOS Linux release 7.9.2009 (Core) $ scl enable devtoolset-8 bash # Use devtoolset-8 when OS version is 7.X. Then, execute the following commands. .. code-block:: console $ wget # Paste URL of the patches from the above link $ tar zxvf ./2.3.0_patch.tar.gz $ git clone https://github.com/llvm/llvm-project.git $ cd llvm-project $ git checkout llvmorg-12.0.0 # using llvm-12.0.0 $ git am -3 --ignore-whitespace --ignore-space-change ../2.3.0_patch/*.patch # apply patches $ cd ../ $ git clone https://github.com/sx-aurora-dev/llvm-dev $ cd llvm-dev $ git checkout github_release_20201026 $ cd ../ $ ./llvm-dev/build-and-install.sh