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.

# yum install https://sxauroratsubasa.sakura.ne.jp/repos/TSUBASA-soft-release-2.8-1.noarch.rpm

Install devel packages of SDK and MPI.

# TSUBASA_GROUPS="nec-sdk-devel nec-mpi-devel"
# /opt/nec/ve/sbin/TSUBASA-groups-remark.sh $TSUBASA_GROUPS
# yum group install $TSUBASA_GROUPS

Install llvm-vec with following command.

# 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.

Component

Directory

Files

Command

/opt/nec/ve/llvm-vec/2.3.0/bin

llvm-vec

Libraries

/opt/nec/ve/llvm-vec/2.3.0/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 -traceback)

Uninstallation

Uninstall llvm-vec with following command.

# 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.

# TSUBASA_GROUPS="nec-sdk-devel nec-mpi-devel"
# /opt/nec/ve/sbin/TSUBASA-groups-remark.sh $TSUBASA_GROUPS
# yum group remove $TSUBASA_GROUPS

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 Requirements before installation.

You can download the patches used in the following commands from the following link.

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.

$ 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.

$ wget <patch url> # 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 <install directory>