Add -mdense-math option to control Dense Math Facility instructions.
New -mdense-math option allows control over Dense Math Facility (DMF) instruction emission on RS6000 targets.
A new compiler option, -mdense-math, has been introduced for RS6000 targets to explicitly enable or disable the use of the Dense Math Facility (DMF) instructions. When targeting the ‘future’ CPU, DMF is automatically enabled by default unless explicitly disabled. Attempting to use -mdense-math on a non-future target now results in a hard error, providing clearer control over the generation of these specialized instructions.
In Details
The compiler option -mdense-math is added, backed by OPTION_MASK_DMF and exposed via TARGET_DMF. This option controls the emission of Dense Math Facility instructions on RS6000 targets. By default, when -mcpu=future is specified, OPTION_MASK_DMF is enabled automatically. Explicitly requesting -mdense-math on unsupported targets correctly results in an error.
- Dense Math Facility (DMF)
- A set of specialized instructions on certain PowerPC processors (like the POWER10 'future' core) designed to accelerate floating-point arithmetic operations, particularly for dense matrix computations.
- RS6000
- IBM's family of RISC workstations and servers, commonly associated with the PowerPC architecture. GCC has specific backends for targeting these processors.
- -mcpu=future
- A GCC target option specifying the use of features available on the most recent ('future') generation of PowerPC processors, which may include advanced instruction sets like the Dense Math Facility.