Skip to content

Commit

Permalink
Merge branch 'llvm-5.0' into llvm-4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
spakin committed Mar 9, 2018
2 parents 2dd6962 + aa508cd commit 6e88ea6
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 1,125 deletions.
8 changes: 4 additions & 4 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Byfl installation
=================

Byfl relies on [LLVM](http://www.llvm.org/) and [Clang](http://clang.llvm.org/) and can take advantage of [DragonEgg](http://dragonegg.llvm.org/). The `llvm-3.5` branch of Byfl is designed to work with LLVM/Clang/DragonEgg release 3.5.*x*. The `llvm-3.6` branch of Byfl is designed to work with LLVM/Clang release 3.6.*x*. The `llvm-3.7` branch of Byfl is designed to work with LLVM/Clang release 3.7.*x*. The `llvm-3.8` branch of Byfl is designed to work with LLVM/Clang release 3.8.*x*. The `master` branch of Byfl is designed to work with LLVM/Clang trunk (i.e., the post-3.8-release development code).
Byfl relies on [LLVM](http://www.llvm.org/) and [Clang](http://clang.llvm.org/) and can take advantage of [Flang](https://github.com/flang-compiler/flang). The `llvm-3.9` branch of Byfl is designed to work with LLVM/Clang release 3.9.*x*. The `llvm-4.0` branch of Byfl is designed to work with LLVM/Clang release 4.0.*x*. The `llvm-5.0` branch of Byfl is designed to work with LLVM/Clang release 5.0.*x*. The `master` branch of Byfl is designed to work with LLVM/Clang trunk (i.e., the post-5.0-release development code), but is often not kept up to date and is best avoided.

Basic installation
------------------

As long as LLVM's `llvm-config` program is in your path, the Free Software Foundation's canonical installation procedure for an out-of-source build should work:
As long as LLVM's `llvm-config` program is in your path, the [Free Software Foundation](https://www.fsf.org/)'s canonical installation procedure for an out-of-source build should work:
```bash
mkdir build
cd build
Expand All @@ -27,11 +27,11 @@ libtoolize

Run `../configure --help` for usage information. The [FSF's generic installation instructions](http://git.savannah.gnu.org/cgit/automake.git/tree/INSTALL) provide substantially more detail on customizing the configuration.

Note that DragonEgg requires [GCC](http://gcc.gnu.org/) versions 4.5-4.8 and LLVM/Clang 3.5.

Installation on Mac OS X
------------------------

> These instructions currently apply to a no-longer-supported version of Byfl. They will be updated eventually.
A few extra steps are needed to build Byfl on OS X:

1. Install [Xcode](https://developer.apple.com/xcode/), which provides various standard tools, header files, and libraries.
Expand Down
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SUBDIRS = include lib tools tests
EXTRA_DIST = README.md INSTALL.md LICENSE.md gen_opcode2name

# Sneaky trick: Output a sed command that will fully expand the prefix
# and exec_prefix variables in bf-gcc and bf-inst.
# and exec_prefix variables in bf-inst.
sed-command:
@echo $(SED) \
-e 's,$${exec_prefix},$(exec_prefix),g' \
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,14 @@ The name "Byfl" comes from "bytes/flops". The very first version of the code co
Installation
------------

There are eight "release" branches of Byfl on GitHub:
There are four "release" branches of Byfl on GitHub:

* [`master`](https://github.com/lanl/Byfl), corresponding to LLVM trunk (often not up to date; best to avoid)
* [`master`](https://github.com/lanl/Byfl), corresponding to LLVM trunk (usually not up to date; best to avoid)
* [`llvm-5.0`](https://github.com/lanl/Byfl/tree/llvm-5.0), corresponding to LLVM 5.0._x_ releases
* [`llvm-4.0`](https://github.com/lanl/Byfl/tree/llvm-4.0), corresponding to LLVM 4.0._x_ releases
* [`llvm-3.9`](https://github.com/lanl/Byfl/tree/llvm-3.9), corresponding to LLVM 3.9._x_ releases
* [`llvm-3.8`](https://github.com/lanl/Byfl/tree/llvm-3.8), corresponding to LLVM 3.8._x_ releases
* [`llvm-3.7`](https://github.com/lanl/Byfl/tree/llvm-3.7), corresponding to LLVM 3.7._x_ releases
* [`llvm-3.6`](https://github.com/lanl/Byfl/tree/llvm-3.6), corresponding to LLVM 3.6._x_ releases
* [`llvm-3.5`](https://github.com/lanl/Byfl/tree/llvm-3.5), corresponding to LLVM 3.5._x_ releases

Byfl previously supported LLVM versions 3.5–3.8. Because these Byfl versions are no longer maintained, the corresponding branches have been removed. However, they were first snapshotted as tags [`llvm-3.5`](https://github.com/lanl/Byfl/tree/llvm-3.5-final), [`llvm-3.6`](https://github.com/lanl/Byfl/tree/llvm-3.6-final), [`llvm-3.7`](https://github.com/lanl/Byfl/tree/llvm-3.7-final), and [`llvm-3.8`](https://github.com/lanl/Byfl/tree/llvm-3.8-final) in case Byfl is desperately needed for one of those outdated LLVM versions.

Be sure to download the Byfl branch that corresponds to your installed LLVM version. (Run `llvm-config --version` to check.) Then, the usual
```bash
Expand Down
43 changes: 0 additions & 43 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -239,39 +239,6 @@ if test "x$ac_cv_lib_sqlite3_sqlite3_errstr" != xno ; then
fi
AM_CONDITIONAL([SQLITE3_AVAILABLE], [test $BUILD_BFBIN2SQLITE3 = yes])

dnl The GCC DragonEgg plugin, while not strictly required by Byfl,
dnl precludes the use of most of the Byfl wrapper scripts.
AC_ARG_VAR([DRAGONEGG], [absolute filename of the GCC DragonEgg plugin])
if test "${DRAGONEGG:-no}" = no ; then
# The location of the DragonEgg plugin was not specified -- try to find it.
AC_CACHE_CHECK([for dragonegg.so],
[ax_cv_file_dragonegg_so],
[dnl
# Search for dragonegg.so in various likely places.
ax_cv_file_dragonegg_so=no
for dname in `$LLVM_CONFIG --libdir` `echo "$LD_LIBRARY_PATH" | $SED 's/:/\n/g'` /usr/local/lib* /usr/lib* ; do
if test -f "$dname/dragonegg.so" ; then
ax_cv_file_dragonegg_so="$dname/dragonegg.so"
break
fi
done
])
if test "x$ax_cv_file_dragonegg_so" = xno ; then
dnl Define where dragonegg.so *ought* to be but isn't.
DRAGONEGG="`$LLVM_CONFIG --libdir`/dragonegg.so"
else
DRAGONEGG="$ax_cv_file_dragonegg_so"
fi
else
ax_cv_file_dragonegg_so="$DRAGONEGG"
fi
AM_CONDITIONAL([HAVE_DRAGONEGG], [test "x$ax_cv_file_dragonegg_so" != xno])
if test "x$ax_cv_file_dragonegg_so" = xno ; then
AC_SUBST([use_dragonegg], [no])
else
AC_SUBST([use_dragonegg], [yes])
fi

dnl Generate all of the Byfl Makefiles and other files.
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([include/Makefile])
Expand All @@ -288,12 +255,6 @@ AC_CONFIG_FILES([tools/postproc/bfbin2py], [
[MAKE="$MAKE"
GREP="$GREP"])
AC_CONFIG_FILES([tools/wrappers/Makefile])
AC_CONFIG_FILES([tools/wrappers/bf-gcc], [
cat tools/wrappers/bf-gcc | `$MAKE -s sed-command | $GREP sed` > tools/wrappers/bf-gcc.tmp
mv tools/wrappers/bf-gcc.tmp tools/wrappers/bf-gcc
],
[MAKE="$MAKE"
GREP="$GREP"])
AC_CONFIG_FILES([tools/wrappers/bf-clang], [
cat tools/wrappers/bf-clang | `$MAKE -s sed-command | $GREP sed` > tools/wrappers/bf-clang.tmp
mv tools/wrappers/bf-clang.tmp tools/wrappers/bf-clang
Expand Down Expand Up @@ -322,7 +283,3 @@ fi
if test $BUILD_BFBIN2SQLITE3 = no ; then
AC_MSG_WARN([Not building the bfbin2sqlite3 postprocessor because it requires SQLite3 (v3.7.15+)])
fi
if test "x$ax_cv_file_dragonegg_so" != xno -a ! -e "$DRAGONEGG" ; then
# The location of the DragonEgg plugin was specified but does not exist.
AC_MSG_WARN([$DRAGONEGG does not exist; did you specify an incorrect file for the DRAGONEGG variable?])
fi
2 changes: 0 additions & 2 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ TESTS = \
bf-clang-no-opts.sh \
bf-clang++-no-opts.sh \
bf-flang-no-opts.sh \
bf-gcc-no-opts.sh \
bf-clang-many-opts.sh \
bfbin2cgrind.sh \
bfbin2csv.sh \
Expand Down Expand Up @@ -46,7 +45,6 @@ AM_TESTS_ENVIRONMENT = \
srcdir='$(srcdir)'; export srcdir; \
top_srcdir='$(top_srcdir)'; export top_srcdir; \
top_builddir='$(top_builddir)'; export top_builddir; \
use_dragonegg='$(use_dragonegg)'; export use_dragonegg; \
use_flang='$(use_flang)'; export use_flang;

# Older versions of Automake, such as what Travis CI is running at the time of
Expand Down
55 changes: 0 additions & 55 deletions tests/bf-gcc-no-opts.sh

This file was deleted.

5 changes: 2 additions & 3 deletions tools/postproc/bf_process_byfl_file.pod
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,8 @@ the F<.byfl> file.
=head1 SEE ALSO

bfbin2cgrind(1), bfbin2hdf5(1), bfbin2csv(1), bfbin2sqlite3(1),
bfbin2xmlss(1), bf-clang(1), bf-clang++(1), bf-gcc(1), bf-g++(1),
bf-gfortran(1), bf-gccgo(1), L<the Byfl home
page|https://github.com/lanl/Byfl>
bfbin2xmlss(1), bf-clang(1), bf-clang++(1), bf-flang(1),
L<the Byfl home page|https://github.com/lanl/Byfl>

=head1 AUTHOR

Expand Down
7 changes: 3 additions & 4 deletions tools/postproc/bfbin2cgrind.pod
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@ KCachegrind for interactive analysis.
=head1 SEE ALSO

bfbin2csv(1), bfbin2hdf5(1), bfbin2hpctk(1), bfbin2sqlite3(1),
bfbin2xmlss(1), bf-clang(1), bf-clang++(1), bf-gcc(1), bf-g++(1),
bf-gfortran(1), bf-gccgo(1), L<the Byfl home
page|https://github.com/lanl/Byfl>, L<the KCachegrind home
page|http://kcachegrind.sourceforge.net/>
bfbin2xmlss(1), bf-clang(1), bf-clang++(1), bf-flang(1),
L<the Byfl home page|https://github.com/lanl/Byfl>,
L<the KCachegrind home page|http://kcachegrind.sourceforge.net/>

=head1 AUTHOR

Expand Down
4 changes: 2 additions & 2 deletions tools/postproc/bfbin2csv.pod
Original file line number Diff line number Diff line change
Expand Up @@ -148,5 +148,5 @@ Scott Pakin, I<pakin@lanl.gov>

awk(1), perl(1), bfbin2cgrind(1), bfbin2hdf5(1), bfbin2hpctk(1),
bfbin2sqlite3(1), bfbin2xmlss(1), bf-clang(1), bf-clang++(1),
bf-gcc(1), bf-g++(1), bf-gfortran(1), bf-gccgo(1), L<the Byfl home
page|https://github.com/lanl/Byfl/>
bf-flang(1),
L<the Byfl home page|https://github.com/lanl/Byfl/>
7 changes: 3 additions & 4 deletions tools/postproc/bfbin2hdf5.pod
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ on that named pipe:
=head1 SEE ALSO

bfbin2cgrind(1), bfbin2csv(1), bfbin2hpctk(1), bfbin2sqlite3(1),
bfbin2xmlss(1), bf-clang(1), bf-clang++(1), bf-gcc(1), bf-g++(1),
bf-gfortran(1), bf-gccgo(1), L<the Byfl home
page|https://github.com/lanl/Byfl>, L<the HDF5 home
page|http://www.hdfgroup.org/HDF5/>
bfbin2xmlss(1), bf-clang(1), bf-clang++(1), bf-flang(1),
L<the Byfl home page|https://github.com/lanl/Byfl>,
L<the HDF5 home page|http://www.hdfgroup.org/HDF5/>

=head1 AUTHOR

Expand Down
7 changes: 3 additions & 4 deletions tools/postproc/bfbin2hpctk.pod
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ end of the directory name to make it unique.

L<hpcviewer|http://hpctoolkit.org/man/hpcviewer.html>(1),
bfbin2cgrind(1), bfbin2csv(1), bfbin2hdf5(1), bfbin2sqlite3(1),
bfbin2xmlss(1), bf-clang(1), bf-clang++(1), bf-gcc(1), bf-g++(1),
bf-gfortran(1), bf-gccgo(1), L<the Byfl home
page|https://github.com/lanl/Byfl>, L<the HPCToolkit home
page|http://hpctoolkit.org/>
bfbin2xmlss(1), bf-clang(1), bf-clang++(1), bf-flang(1),
L<the Byfl home page|https://github.com/lanl/Byfl>,
L<the HPCToolkit home page|http://hpctoolkit.org/>

=head1 AUTHOR

Expand Down
8 changes: 4 additions & 4 deletions tools/postproc/bfbin2sqlite3.pod
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ B<bfbin2sqlite3> on that named pipe:
=head1 SEE ALSO

sqlite3(1), bfbin2cgrind(1), bfbin2csv(1), bfbin2hdf5(1),
bfbin2hpctk(1), bfbin2xmlss(1), bf-clang(1), bf-clang++(1), bf-gcc(1),
bf-g++(1), bf-gfortran(1), bf-gccgo(1), L<the Byfl home
page|https://github.com/lanl/Byfl/>, L<the SQLite home
page|http://www.sqlite.org/>
bfbin2hpctk(1), bfbin2xmlss(1), bf-clang(1), bf-clang++(1),
bf-flang(1),
L<the Byfl home page|https://github.com/lanl/Byfl/>,
L<the SQLite home page|http://www.sqlite.org/>

=head1 AUTHOR

Expand Down
7 changes: 3 additions & 4 deletions tools/postproc/bfbin2xmlss.pod
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ on that named pipe:
=head1 SEE ALSO

bfbin2cgrind(1), bfbin2csv(1), bfbin2hdf5(1), bfbin2hpctk(1),
bfbin2sqlite3(1), bf-clang(1), bf-clang++(1), bf-gcc(1), bf-g++(1),
bf-gfortran(1), bf-gccgo(1), L<the Byfl home
page|https://github.com/lanl/Byfl>, L<the XML Spreadsheet
Reference|http://msdn.microsoft.com/en-us/library/aa140066%28office.10%29.aspx>
bfbin2sqlite3(1), bf-clang(1), bf-clang++(1), bf-flang(1),
L<the Byfl home page|https://github.com/lanl/Byfl>,
L<the XML Spreadsheet Reference|http://msdn.microsoft.com/en-us/library/aa140066%28office.10%29.aspx>

=head1 AUTHOR

Expand Down
41 changes: 3 additions & 38 deletions tools/wrappers/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@
# By Scott Pakin <pakin@lanl.gov> #
############################################

if HAVE_DRAGONEGG
BF_GCC_SCRIPT=bf-gcc
endif

nodist_bin_SCRIPTS = \
$(BF_GCC_SCRIPT) \
bf-clang \
bf-inst

EXTRA_DIST = \
bf-gcc.in \
bf-clang.in \
bf-inst.in \
ParseCompilerOpts.pm \
Expand All @@ -36,32 +31,19 @@ install-parser: $(srcdir)/ParseCompilerOpts.pm
$(INSTALL_DATA) -m 0755 -d "$(DESTDIR)$(perlsitelibdir)"
$(INSTALL_DATA) "$(srcdir)/ParseCompilerOpts.pm" "$(DESTDIR)$(perlsitelibdir)/ParseCompilerOpts.pm"

install-compiler-scripts: bf-gcc bf-clang
install-compiler-scripts: bf-clang
$(LN_S) -f bf-clang $(DESTDIR)$(bindir)/bf-clang++
$(LN_S) -f bf-clang $(DESTDIR)$(bindir)/bf-flang
if HAVE_DRAGONEGG
$(LN_S) -f bf-gcc $(DESTDIR)$(bindir)/bf-g++
$(LN_S) -f bf-gcc $(DESTDIR)$(bindir)/bf-gfortran
$(LN_S) -f bf-gcc $(DESTDIR)$(bindir)/bf-gccgo
endif

install-mpi-scripts: $(srcdir)/make-bf-mpi
if HAVE_DRAGONEGG
$(AM_V_GEN) $(PERL) $(srcdir)/make-bf-mpi mpicc bf-gcc OMPI_CC MPICH_CC $(bindir) > $(DESTDIR)$(bindir)/bf-mpicc
$(AM_V_GEN) $(PERL) $(srcdir)/make-bf-mpi mpicxx bf-g++ OMPI_CXX MPICH_CXX $(bindir) > $(DESTDIR)$(bindir)/bf-mpicxx
$(AM_V_GEN) $(PERL) $(srcdir)/make-bf-mpi mpifort bf-gfortran OMPI_FC MPICH_F90 $(bindir) > $(DESTDIR)$(bindir)/bf-mpifort
$(AM_V_GEN) $(PERL) $(srcdir)/make-bf-mpi mpif90 bf-gfortran OMPI_FC MPICH_F90 $(bindir) > $(DESTDIR)$(bindir)/bf-mpif90
$(AM_V_GEN) $(PERL) $(srcdir)/make-bf-mpi mpif77 bf-gfortran OMPI_F77 MPICH_F77 $(bindir) > $(DESTDIR)$(bindir)/bf-mpif77
else
$(AM_V_GEN) $(PERL) $(srcdir)/make-bf-mpi mpicc bf-clang OMPI_CC MPICH_CC $(bindir) > $(DESTDIR)$(bindir)/bf-mpicc
$(AM_V_GEN) $(PERL) $(srcdir)/make-bf-mpi mpicxx bf-clang++ OMPI_CXX MPICH_CXX $(bindir) > $(DESTDIR)$(bindir)/bf-mpicxx
$(AM_V_GEN) $(PERL) $(srcdir)/make-bf-mpi mpifort bf-flang OMPI_FC MPICH_F90 $(bindir) > $(DESTDIR)$(bindir)/bf-mpifort
$(AM_V_GEN) $(PERL) $(srcdir)/make-bf-mpi mpif90 bf-flang OMPI_FC MPICH_F90 $(bindir) > $(DESTDIR)$(bindir)/bf-mpif90
$(AM_V_GEN) $(PERL) $(srcdir)/make-bf-mpi mpif77 bf-flang OMPI_F77 MPICH_F77 $(bindir) > $(DESTDIR)$(bindir)/bf-mpif77
endif
chmod 0755 $(DESTDIR)$(bindir)/bf-mpi*

install-man1-pages: bf-gcc bf-clang bf-inst
install-man1-pages: bf-clang bf-inst
$(INSTALL) -d "$(DESTDIR)$(mandir)/man1"
$(RM) "$(DESTDIR)$(mandir)/man1/bf-clang.1" \
"$(DESTDIR)$(mandir)/man1/bf-clang++.1" \
Expand All @@ -76,23 +58,6 @@ install-man1-pages: bf-gcc bf-clang bf-inst
"$(DESTDIR)$(mandir)/man1/bf-flang.1"
$(AM_V_GEN) $(POD2MAN) --center="$(MAN_CATEGORY)" --release="$(MAN_RELEASE)" bf-inst > \
"$(DESTDIR)$(mandir)/man1/bf-inst.1"
if HAVE_DRAGONEGG
$(RM) "$(DESTDIR)$(mandir)/man1/bf-gcc.1" \
"$(DESTDIR)$(mandir)/man1/bf-g++.1" \
"$(DESTDIR)$(mandir)/man1/bf-gfortran.1" \
"$(DESTDIR)$(mandir)/man1/bf-gccgo.1"
$(AM_V_GEN) $(POD2MAN) --center="$(MAN_CATEGORY)" --release="$(MAN_RELEASE)" bf-gcc > \
"$(DESTDIR)$(mandir)/man1/bf-gcc.1"
$(AM_V_GEN) cat "$(DESTDIR)$(mandir)/man1/bf-gcc.1" | \
$(PERL) -ne 's/gcc/g++/g; s/\bC (compiler|code)/C++ $$1/g; s/myprog\.c/myprog.cpp/g; s/BF_GCC/BF_GXX/g; print' > \
"$(DESTDIR)$(mandir)/man1/bf-g++.1"
$(AM_V_GEN) cat "$(DESTDIR)$(mandir)/man1/bf-gcc.1" | \
$(PERL) -ne 's/gcc/gfortran/g; s/\bC (compiler|code)/Fortran $$1/g; s/myprog\.c/myprog.f90/g; s/BF_GCC/BF_GFORTRAN/g; print' > \
"$(DESTDIR)$(mandir)/man1/bf-gfortran.1"
$(AM_V_GEN) cat "$(DESTDIR)$(mandir)/man1/bf-gcc.1" | \
$(PERL) -ne 's/gcc/gccgo/g; s/\bC (compiler|code)/Go $$1/g; s/myprog\.c/myprog.go/g; s/BF_GCC/BF_GCCGO/g; print' > \
"$(DESTDIR)$(mandir)/man1/bf-gccgo.1"
endif

install-man3-pages: $(srcdir)/ParseCompilerOpts.pm
$(INSTALL) -d "$(DESTDIR)$(mandir)/man3"
Expand All @@ -102,7 +67,7 @@ install-man3-pages: $(srcdir)/ParseCompilerOpts.pm
install-exec-local: install-parser install-compiler-scripts install-mpi-scripts install-man1-pages install-man3-pages

uninstall-local:
for script in bf-clang bf-clang++ bf-flang bf-gcc bf-g++ bf-gfortran bf-gccgo bf-mpicc bf-mpicxx bf-mpifort bf-mpif90 bf-mpif77 bf-inst ; do \
for script in bf-clang bf-clang++ bf-flang bf-mpicc bf-mpicxx bf-mpifort bf-mpif90 bf-mpif77 bf-inst ; do \
$(RM) "$(DESTDIR)$(bindir)/$${script}" ; \
$(RM) "$(DESTDIR)$(mandir)/man1/$${script}.1" ; \
done
Expand Down
2 changes: 1 addition & 1 deletion tools/wrappers/ParseCompilerOpts.pm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ParseCompilerOpts - Parse GCC and Clang options into compiler and linker options
=head1 DESCRIPTION
This module is intended to be used internally by the Byfl wrapper
scripts (bf-gcc, bf-g++, bf-gfortran, and bf-gccgo).
scripts (bf-clang, bf-clang++, and bf-flang).
=head1 AUTHOR
Expand Down
Loading

0 comments on commit 6e88ea6

Please sign in to comment.