Unified Parallel C (UPC) Options

Describes the UPC enhancements to standard Clang

These options have been added to CCE Clang to support UPC.

-hupc, -hdefault
-hupc configures the compiler driver to expect UPC source code. Source files with a .upc extension are automatically treated as UPC code, but this option permits a file with any other extension (typically .c) to be understood as UPC code. -hdefault cancels this behavior; if both -hupc and -hdefault appear in a command line, whichever appears last takes precedence and applies to all source files in the command line.
-fupc-auto-amo, -fno-upc-auto-amo
Automatically use network atomics for remote updates to reduce latency. For example, x += 1 can be performed as a remote atomic add. If an update is recognized as local to the current thread, then no atomic is used. These atomics are intended as a performance optimization only and shall not be relied upon to prevent race conditions. Enabled at -O1 and above.
-fupc-buffered-async, -fno-upc-buffered-async
Set aside memory in the UPC runtime library for aggregating random remote accesses designated with #pragma pgas buffered_async. Disabled by default.
-fupc-pattern, -fno-upc-pattern
Identify simple communication loops and aggregate the remote accesses into a single function call which replaces the loop. Enabled at -O1 and above.
-fupc-threads=N
Set the number of threads for a static THREADS translation. This option causes __UPC_STATIC_THREADS__ to be defined instead of __UPC_DYNAMIC_THREADS__ and replaces all uses of the UPC keyword THREADS with the value N.