LLVM 20.0.0git
Macros | Functions | Variables
InstCombineNegator.cpp File Reference
#include "InstCombineInternal.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Analysis/TargetFolder.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Use.h"
#include "llvm/IR/User.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/DebugCounter.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/InstCombine/InstCombiner.h"
#include <cassert>
#include <cstdint>
#include <functional>
#include <utility>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "instcombine"
 

Functions

 STATISTIC (NegatorTotalNegationsAttempted, "Negator: Number of negations attempted to be sinked")
 
 STATISTIC (NegatorNumTreesNegated, "Negator: Number of negations successfully sinked")
 
 STATISTIC (NegatorMaxDepthVisited, "Negator: Maximal traversal depth ever " "reached while attempting to sink negation")
 
 STATISTIC (NegatorTimesDepthLimitReached, "Negator: How many times did the traversal depth limit was reached " "during sinking")
 
 STATISTIC (NegatorNumValuesVisited, "Negator: Total number of values visited during attempts to sink negation")
 
 STATISTIC (NegatorNumNegationsFoundInCache, "Negator: How many negations did we retrieve/reuse from cache")
 
 STATISTIC (NegatorMaxTotalValuesVisited, "Negator: Maximal number of values ever visited while attempting to " "sink negation")
 
 STATISTIC (NegatorNumInstructionsCreatedTotal, "Negator: Number of new negated instructions created, total")
 
 STATISTIC (NegatorMaxInstructionsCreated, "Negator: Maximal number of new instructions created during negation " "attempt")
 
 STATISTIC (NegatorNumInstructionsNegatedSuccess, "Negator: Number of new negated instructions created in successful " "negation sinking attempts")
 
 DEBUG_COUNTER (NegatorCounter, "instcombine-negator", "Controls Negator transformations in InstCombine pass")
 

Variables

static cl::opt< boolNegatorEnabled ("instcombine-negator-enabled", cl::init(true), cl::desc("Should we attempt to sink negations?"))
 
static cl::opt< unsignedNegatorMaxDepth ("instcombine-negator-max-depth", cl::init(NegatorDefaultMaxDepth), cl::desc("What is the maximal lookup depth when trying to " "check for viability of negation sinking."))
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "instcombine"

Definition at line 51 of file InstCombineNegator.cpp.

Function Documentation

◆ DEBUG_COUNTER()

DEBUG_COUNTER ( NegatorCounter  ,
"instcombine-negator"  ,
"Controls Negator transformations in InstCombine pass"   
)

◆ STATISTIC() [1/10]

STATISTIC ( NegatorMaxDepthVisited  ,
"Negator: Maximal traversal depth ever " "reached while attempting to sink negation"   
)

◆ STATISTIC() [2/10]

STATISTIC ( NegatorMaxInstructionsCreated  ,
"Negator: Maximal number of new instructions created during negation " "attempt"   
)

◆ STATISTIC() [3/10]

STATISTIC ( NegatorMaxTotalValuesVisited  ,
"Negator: Maximal number of values ever visited while attempting to " "sink negation"   
)

◆ STATISTIC() [4/10]

STATISTIC ( NegatorNumInstructionsCreatedTotal  ,
"Negator: Number of new negated instructions  created,
total"   
)

◆ STATISTIC() [5/10]

STATISTIC ( NegatorNumInstructionsNegatedSuccess  ,
"Negator: Number of new negated instructions created in successful " "negation sinking attempts"   
)

◆ STATISTIC() [6/10]

STATISTIC ( NegatorNumNegationsFoundInCache  ,
"Negator: How many negations did we retrieve/reuse from cache"   
)

◆ STATISTIC() [7/10]

STATISTIC ( NegatorNumTreesNegated  ,
"Negator: Number of negations successfully sinked"   
)

◆ STATISTIC() [8/10]

STATISTIC ( NegatorNumValuesVisited  ,
"Negator: Total number of values visited during attempts to sink negation"   
)

◆ STATISTIC() [9/10]

STATISTIC ( NegatorTimesDepthLimitReached  ,
"Negator: How many times did the traversal depth limit was reached " "during sinking"   
)

◆ STATISTIC() [10/10]

STATISTIC ( NegatorTotalNegationsAttempted  ,
"Negator: Number of negations attempted to be sinked"   
)

Variable Documentation

◆ NegatorEnabled

cl::opt< bool > NegatorEnabled("instcombine-negator-enabled", cl::init(true), cl::desc("Should we attempt to sink negations?")) ( "instcombine-negator-enabled"  ,
cl::init(true ,
cl::desc("Should we attempt to sink negations?")   
)
static

Referenced by llvm::Negator::Negate().

◆ NegatorMaxDepth

cl::opt< unsigned > NegatorMaxDepth("instcombine-negator-max-depth", cl::init(NegatorDefaultMaxDepth), cl::desc("What is the maximal lookup depth when trying to " "check for viability of negation sinking.")) ( "instcombine-negator-max-depth"  ,
cl::init(NegatorDefaultMaxDepth ,
cl::desc("What is the maximal lookup depth when trying to " "check for viability of negation sinking.")   
)
static