Readme For

Open Research Compiler Release 2.0

 

January 23, 2003

 

Contents

 

Overview

How to download and prepare for the installation

How to install the pre-built cross compiler

How to install the pre-built native compiler

How to build compilers from source

Known problems and limitations

Appendix A Problems and work arounds

Acknowledgements


Overview

This ORC 2.0 release is the second major release of the compiler, first released on Jan 25, 2002. Major focuses of this release are performance enhancements, especially C++ and memory optimization, and Itanium-2 awareness. With this release, we are pleased to report that code quality of this compiler for Itanium-1 is very competitive compared with other IA64 compilers. The optimization levels we have compared include -O2, -O3, -IPA, combinations of the above and also with feedback information. Several research infrastructure features have also been added to demonstrate the effectiveness of this compiler to do advanced research studies. We will describe the major performance enhancements and infrastructure features below.

 

Major performance enhancements and features:

 

Other performance tuning efforts:

 

Numerous performance items are also put in during this release. In the IPA area, better inlining heuristics, more aggressive dead function elimination, assigned once globals, and function layout reordering. In the global optimizer area, mostly structure and field access handling and aggressive dead store elimination. In the code generator area, more aggressive global instruction scheduling and speculation, aggressive use of predicate database and multi-way branch synthesis.

While we don't have a full repertoire of test suites at our disposal, we have done extensive testing to the best of timing and resources at our disposal. We also permute options when testing the test suites to increase our coverage. All critical bugs and issues have been fixed. Other less critical known problems and limitations are listed at the end of this note.

Since there has been a lot of requests to use a natively built ORC compiler, we have made a natively built compiler based on source of this 2.0 release. This compiler is built at -O2 (except wopt.so and be.so) and also with all internal consistency checks turned off, unlike that of 1.1 release. You should see large compile time improvement compared to the native 1.1 ORC compiler binaries. Due to limitations in machine resources, we have not used the native built compiler as much as the cross built compiler, let us know if you find problems with the native compiler.

The latest information and update for the ORC compilers can be found in http://sourceforge.net/projects/ipf-orc. The packages included in this distribution represent a work in progress.

 

Please send problem reports to http://sourceforge.net/projects/ipf-orc web site.



How to download and prepare for the installation

This release consists of two tar balls as listed bellow. You can download them from this URL:

http://sourceforge.net/projects/ipf-orc


Package
Description
orc-2.0-bin.tar.gz
This tar ball contains both cross and native binary components.

The cross compiler works on IA-32 RedHat 7.2 and  7.3

The native compiler  works  on IA-64 Redhat 7.2

orc-2.0-src.tar.gz
Source tree diff. from pro64-0.01.0-13.


You may also need to download the following software:

Condition
Action
o. If you install cross ORC, or
o. if you want to build cross ORC from source code
You need to install NUE first (NUE can be downloaded from http://www.software.hp.com/ia64linux)
ORC suite relies on the native header file and C pre-processor distributed with NUE
o. if you install native ORC from orc-2.0-bin.tar.gz
NONE


After installing NUE (in case you need to use the cross built ORC), make sure that the following 2 directories are linked properly (so that cross ORC also works outside NUE).

Condition
Action
if /nue/usr/include/asm is a symbolic link
change this link to /nue/usr/src/linux/include/asm, by:
cd /nue/usr/include
rm /nue/usr/include/asm
ln -sf /nue/usr/src/linux/include/asm as
m
if /nue/usr/include/linux is a symbolic link
change this link to /nue/usr/src/linux/include/linux, by:
cd /nue/usr/include
rm /nue/usr/include/asm
ln -sf /nue/usr/src/linux/include/linux linux


Before installing the compiler, you should make sure that the following 3 environment variables are set properly, so that ORC v.2.0 is used by default:

Variable Name Purpose
TOOLROOT
Specify the root for ORC binaries hierarchy, e.g., $HOME/orc-2.0
COMP_TARGET_ROOT
For cross compiler:
Specify the root for native archive hierarchy, so that cross ORC binaries will pick up native archives from $COMP_TARGET_ROOT/usr/ia64-orc-linux/lib,

For native compiler:
Native ORC binaries will pick up archives from $COMP_TARGET_ROOT/usr/lib. Normally, you need *NOT* set this variables for native ORC, so that ORC will use the archives in /usr/lib.
PATH
For native compiler:
Add $TOOLROOT/usr/bin to $PATH.

For cross compiler: 
You should add $TOOLROOT/usr/ia64-orc-linux/bin to $PATH,
and make sure your $PATH satisfy the following 2 conditions (outside NUE)
1. Each time when you invoke orcc, $TOOLROOT/usr/ia64-orc-linux/bin/orcc is picked up
2. Each time you invoke as (or ld) from console, your original as (or ld) rather than $TOOLROOT/usr/ia64-orc-linux/bin/as(or ld) is used



How to install the pre-built cross compiler on IA32 machine


To install the cross ORC compiler (This binary release is prepared for RedHat 7.2 or higher version):


Here is an installation example:

 

Assume the account name is joesmith and the IA-32 RedHat 7.2 host name is rose, the login shell of joesmith is GNU BASH.
Pay attention to the HIGHLIGHTED part that should not be set for native compiler

[joesmith@rose joesmith]$vi $HOME/.bashrc # set $TOOLROOT $COMP_TARGET_ROOT and $PATH
[joesmith@rose joesmith]$cat $HOME/.bashrc | grep "TOOLROOT\|PATH"
export TOOLROOT=$HOME/music
export COMP_TARGET_ROOT=$HOME/photo
export PATH=$PATH:$TOOLROOT/usr/ia64-orc-linux/bin

[joesmith@rose joesmith]$source $HOME/.bashrc
[joesmith@rose joesmith]$tar zxvf orc-2.0-bin.tar.gz
[joesmith@rose joesmith]$cd orc-2.0-bin; ./install.sh -c



Note that the nue command will put you under your home directory inside NUE, which may not be your regular home directory. If you want to do cross compile inside NUE, you need to make sure that the ORC binaries are under a directory that is accessible under NUE.

 

ORC 2.0 release allows the users to produce IA64 binary on IA32 machines directly. Simply follow the install instructions to set the environment variables and install the pre-built native archives properly.


How to install the pre-built native compiler on IA64 machine


On an IA64 machine (This binary release is prepared for RedHat 7.2):


Here is an installation example:

 

Assume the account name is joesmith and the IA-64 Redhat 7.2 host name is uranus, the login shell of joesmith is GNU BASH.

[joesmith@uranus joesmith]$vi $HOME/.bashrc # set $TOOLROOT and $PATH
[joesmith@uranus joesmith]$cat $HOME/.bashrc | grep "TOOLROOT\|PATH"
export TOOLROOT=$HOME/music
export PATH=$PATH:$TOOLROOT/usr/bin

[joesmith@uranus joesmith]$source $HOME/.bashrc
[joesmith@uranus joesmith]$tar zxvf orc-2.0-bin.tar.gz
[joesmith@uranus joesmith]$cd orc-2.0-bin; ./install.sh -n


You can verify your installation by doing a simple "hello world"

 

$cat hello.c

#include <stdio.h>

main()

{

printf("hello world\n");

}
 

How to build the compiler from source


1. First you need to download the following software:

orc-2.0-src.tar.gz
Source tree diff. from pro64-0.01.0-13, download from http://prdownloads.sourceforge.net/ipf-orc/orc-2.0-src.tar.gz
NUE suite (either 1.0 or 1.1)
NOTE: Only needed if you want to build the cross compiler.
Can be downloaded from http://www.software.hp.com/ia64linux
pro64-0.01.0-13-sources.tar.gz
Pro64 source tar ball which can be downloaded from
http://prdownloads.sourceforge.net/ipf-orc/pro64-0.01.0-13-sources.tar.gz



2. If you want to build the cross compiler, download and install NUE. You may need to reset the two symbolic links as described above

3. Expand the orc-2.0-src.tar.gz, by "tar zxvf orc-2.0-src.tar.gz"
4. Do "cd orc-2.0-src; ./install.sh"
5. Follow the instructions.
6. Suppose you choose /home/somebody/somewhere as the root of the source tree hierarchy .

    To build the compiler, do "make -C /home/somebody/somewhere -f Make.cross (or Make.native for native compiler)".

    ORC is -O2 built by default.

    To build a debuggable version, do "make BUILD_OPTIMIZE=DEBUG -C /home/somebody/somewhere -f Make.cross (or Make.native)"
7. Normally, you need NOT to build the native archives, since pre-built native archives are shipped with ORC v2.0 suite.
    However, if you want to build those native archives, you can do the following either inside NUE or IA-64 native environment:
    make -C /home/somebody/somewhere -f Make.NUE.lib

    Some known problems are described in details below.

8. Invoke home/somebody/somewhere/INSTALL.cross(.native) to install cross(native) ORC



Known Problems and limitations

 

We have tested the compilers to the best of our efforts. The following are known problems or areas that we have not done extensive testing:

 

1.   ORC:=off option: This option is designed to turn off ORC-related phases and optimizations. Therefore it can be used as a facility to isolate ORC-specific problems. Unfortunately this feature is not fully functional at this point, and will cause several compilation failures. We will fix this problem in the next release.

 

2.   Building native archives: If you want to rebuild the native archives, pay attention to the compatibility problem of libgcc.a and libstdc++.a. We recommend the users do the following if there is problem in using the version built from ORC source by default:

    -- For cross ORC, use a working Gcc version on your IA32 machine to cross build the two libraries for IA64 target architecture.

    -- For native ORC, use the version installed on your IA64 machine (normally in /usr/lib/gcc-lib/ia64-redhat-linux/<version_num>/").

If you have problems building other archives, you may try to modify the macro BUILD_COMPILER defined in the Makefile to GNU to see if it works on your system.

 

3.   Building native compilers: With native O2-built wopt.so and be.so, some FP benchmarks may have compilation failures. Therefore, in native environment, the two .so are built with "-O0 -UIs_True_On" by default. While in cross environment, they are built in the same way as that of other components.

 

4.   The "bfd assertion" warning: When compiling some programs with IPA turned on, the compiler may generate the following warning message: "bfd assertion fail ../../cygnus_20000828/bfd/elflink.h:1786". This is caused by the linkage to some libraries with incompatible format. Nevertheless, it will not affect the correctness of the compiled program.

 

A full description of other known compilation problem is listed in Appendix A.

 

For issues with installation and usage of the compiler, we request that users first go through the mail alias ipf-orc-support@lists.sourceforge.net. This will help us respond to the issues in a more timely fashion without dropping anyone. We also strongly suggest you to sign onto the ipf-orc-support@lists.sourceforge. For issues related to the Pro64 compiler, please go to mailing list open64-devel@lists.sourceforge.net.



Appendix A  Problems and work arounds

1. Description of problem: Compilation failure, Segmentation fault in global instruction scheduling

    Name of program: vortex, ammp

    Option that cause failure:

     - ammp: O2/O3 + CG profiling instrumentation (i.e. [-O2|-O3] -fb_create fb.mid -fb_type=2 -fb_phase=4)

     - vortex: O2 + CG profiling instrumentation (i.e. -O2 -fb_create fb.mid -fb_type=2 -fb_phase=4)

 

2. Description of problem: Runtime failure, Segmentation fault

    Name of program: apsi, wupwise

    Option that cause failure: O3 + CG profiling, both instrumentation and annotation.

 

3. Description of problem: Compilation failure, Out of memory in the phase of predicate analysis

    Name of program: vortex

    Option that cause failure: O2 + WHIRL profiling annotation (i.e. -O2 -fb_opt fb.mid)

 

4. Description of problem: Compilation failure, Out of memory in the phase of IPA-link

    Name of program: gcc, eon

    Option that cause failure: O2 + ipa + WHIRL profiling annotation (i.e. -O2 -fb_opt fb.mid)

 

5. Description of problem: Compilation failure, Segmentation fault in global instruction scheduling

    Name of program: twolf

    Option that cause failure: O3 + ipa + WHIRL profiling annotation + CG profiling instrumentation + stride profiling instrumentation

                                         (i.e. -O3 -fb_opt fb.mid -fb_create fb.mid -fb_type=10 -fb_phase=4 -ipa)

 

 

Acknowledgements

We have benefited from postings, advices and fixes by many individuals. They have contributed to the success of this release. There are many to list and we are sure to have missed some. The friends of ORC list is an attempt to list those who have helped and is by no means exhaustive. We will continue to update this list, let us know if we missed you.

Copyright and Legal Information

Intel and Itanium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

 

[GOTO TOP OF DOCUMENT]