Intel SPMD Program Compiler  1.3.0
Public Member Functions | Public Attributes
Opt Struct Reference

Structure that collects optimization options. More...

#include <ispc.h>

Collaboration diagram for Opt:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Opt ()

Public Attributes

int level
bool fastMath
bool fastMaskedVload
bool unrollLoops
bool force32BitAddressing
bool disableAsserts
bool disableMaskAllOnOptimizations
bool disableHandlePseudoMemoryOps
bool disableBlendedMaskedStores
bool disableCoherentControlFlow
bool disableUniformControlFlow
bool disableGatherScatterOptimizations
bool disableMaskedStoreToStore
bool disableGatherScatterFlattening
bool disableUniformMemoryOptimizations
bool disableCoalescing

Detailed Description

Structure that collects optimization options.

This structure collects all of the options related to optimization of generated code.

Definition at line 269 of file ispc.h.


Constructor & Destructor Documentation

Opt::Opt ( )

Member Data Documentation

Indicates whether Assert() statements should be ignored (for performance in the generated code).

Definition at line 299 of file ispc.h.

Referenced by main(), and Opt().

On targets that don't have a masked store instruction but do have a blending instruction, by default, we simulate masked stores by loading the old value, blending, and storing the result. This can potentially be unsafe in multi-threaded code, in that it writes to locations that aren't supposed to be written to. Setting this value to true disables this work-around, and instead implements masked stores by 'scalarizing' them, so that we iterate over the ISIMD lanes and do a scalar write for the ones that are running.

Definition at line 320 of file ispc.h.

Referenced by lReplacePseudoMaskedStore(), main(), and Opt().

Disables optimizations that coalesce incoherent scalar memory access from gathers into wider vector operations, when possible.

Definition at line 360 of file ispc.h.

Referenced by main(), Opt(), and Optimize().

Disables the 'coherent control flow' constructs in the language. (e.g. this causes "cif" statements to be demoted to "if" statements.) This is likely only useful for measuring the impact of coherent control flow.

Definition at line 326 of file ispc.h.

Referenced by IfStmt::emitMaskAllOn(), IfStmt::emitVaryingIf(), main(), and Opt().

Disables the optimization that detects when the execution mask is all on and emits code for gathers and scatters that doesn't loop over the SIMD lanes but just does the scalar loads and stores directly.

Definition at line 350 of file ispc.h.

Referenced by main(), Opt(), and IsCompileTimeConstantPass::runOnBasicBlock().

Disables the backend optimizations related to gather/scatter (e.g. transforming gather from sequential locations to an unaligned load, etc.) This is likely only useful for measuring the impact of these optimizations.

Definition at line 338 of file ispc.h.

Referenced by main(), Opt(), and Optimize().

If enabled, the various __pseudo* memory ops (gather/scatter, masked load/store) are left in their __pseudo* form, for better understanding of the structure of generated code when reading it.

Definition at line 310 of file ispc.h.

Referenced by main(), Opt(), and Optimize().

If enabled, disables the various optimizations that kick in when the execution mask can be determined to be "all on" at compile time.

Definition at line 304 of file ispc.h.

Referenced by DoStmt::EmitCode(), ForStmt::EmitCode(), IfStmt::emitMaskAllOn(), FunctionEmitContext::FunctionEmitContext(), lStoreAssignResult(), main(), Opt(), Optimize(), IsCompileTimeConstantPass::runOnBasicBlock(), and FunctionEmitContext::StoreInst().

Disables the optimization that demotes masked stores to regular stores when the store is happening at the same control flow level where the variable was declared. This is likely only useful for measuring the impact of this optimization.

Definition at line 344 of file ispc.h.

Referenced by lStoreAssignResult(), main(), and Opt().

Disables uniform control flow optimizations (e.g. this changes an "if" statement with a uniform condition to have a varying condition). This is likely only useful for measuring the impact of uniform control flow.

Definition at line 332 of file ispc.h.

Referenced by ForStmt::EmitCode(), DoStmt::EstimateCost(), ForStmt::EstimateCost(), main(), Opt(), IfStmt::TypeCheck(), DoStmt::TypeCheck(), and ForStmt::TypeCheck().

Disables the optimizations that detect when arrays are being indexed with 'uniform' values and issue scalar loads/stores rather than gathers/scatters. This is likely only useful for measuring the impact of this optimization.

Definition at line 356 of file ispc.h.

Referenced by main(), Opt(), and IndexExpr::TypeCheck().

Indicates whether an vector load should be issued for masked loads on platforms that don't have a native masked vector load. (This may lead to accessing memory up to programCount-1 elements past the end of arrays, so is unsafe in general.)

Definition at line 285 of file ispc.h.

Referenced by DefineStdlib(), main(), and Opt().

Indicates whether "fast and loose" numerically unsafe optimizations should be performed. This is false by default.

Definition at line 279 of file ispc.h.

Referenced by main(), Opt(), and BinaryExpr::Optimize().

Indicates if addressing math will be done with 32-bit math, even on 64-bit systems. (This is generally noticably more efficient, though at the cost of addressing >2GB).

Definition at line 295 of file ispc.h.

Referenced by FunctionEmitContext::AddElementOffset(), FunctionEmitContext::addVaryingOffsetsIfNeeded(), FunctionEmitContext::applyVaryingGEP(), BinaryExpr::GetType(), SizeOfExpr::GetType(), NewExpr::GetValue(), lDeclareSizeAndPtrIntTypes(), lEmitBinaryPointerArith(), lGSToGSBaseOffsets(), main(), Opt(), Target::SizeOf(), Target::StructOffset(), IndexExpr::TypeCheck(), and NewExpr::TypeCheck().

Optimization level. Currently, the only valid values are 0, indicating essentially no optimization, and 1, indicating as much optimization as possible.

Definition at line 275 of file ispc.h.

Referenced by Module::CompileFile(), FunctionEmitContext::FunctionEmitContext(), main(), Module::Module(), Opt(), and Module::writeObjectFileOrAssembly().

Indicates when loops should be unrolled (when doing so seems like it will make sense.

Definition at line 289 of file ispc.h.

Referenced by main(), Opt(), and Optimize().


The documentation for this struct was generated from the following files: