15#ifndef LLVM_PASSES_OPTIMIZATIONLEVEL_H
16#define LLVM_PASSES_OPTIMIZATIONLEVEL_H
23class OptimizationLevel final {
24 unsigned SpeedLevel = 2;
28 "Optimization level for speed should be 0, 1, 2, or 3");
89 return SpeedLevel ==
Other.SpeedLevel;
92 return SpeedLevel !=
Other.SpeedLevel;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static LLVM_ABI const OptimizationLevel O3
Optimize for fast execution as much as possible.
bool operator==(const OptimizationLevel &Other) const
OptimizationLevel()=default
static LLVM_ABI const OptimizationLevel O0
Disable as many optimizations as possible.
bool operator!=(const OptimizationLevel &Other) const
unsigned getSpeedupLevel() const
static LLVM_ABI const OptimizationLevel O2
Optimize for fast execution as much as possible without triggering significant incremental compile ti...
bool isOptimizingForSpeed() const
static LLVM_ABI const OptimizationLevel O1
Optimize quickly without destroying debuggability.
This is an optimization pass for GlobalISel generic memory operations.