LLVM  13.0.0git
Namespaces | 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/None.h"
#include "llvm/ADT/Optional.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/ADT/iterator_range.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 <tuple>
#include <type_traits>
#include <utility>
Include dependency graph for InstCombineNegator.cpp:

Go to the source code of this file.

Namespaces

 llvm
 

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< bool > NegatorEnabled ("instcombine-negator-enabled", cl::init(true), cl::desc("Should we attempt to sink negations?"))
 
static 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."))
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "instcombine"

Definition at line 62 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?"))
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."))
static