LLVM  14.0.0git
Classes | Namespaces | Functions
InstructionCost.h File Reference
#include "llvm/ADT/Optional.h"
#include "llvm/Support/MathExtras.h"
#include <limits>
Include dependency graph for InstructionCost.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  llvm::InstructionCost
 

Namespaces

 llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Functions

InstructionCost llvm::operator+ (const InstructionCost &LHS, const InstructionCost &RHS)
 
InstructionCost llvm::operator- (const InstructionCost &LHS, const InstructionCost &RHS)
 
InstructionCost llvm::operator* (const InstructionCost &LHS, const InstructionCost &RHS)
 
InstructionCost llvm::operator/ (const InstructionCost &LHS, const InstructionCost &RHS)
 
raw_ostream & llvm::operator<< (raw_ostream &OS, const InstructionCost &V)
 

Detailed Description

This file defines an InstructionCost class that is used when calculating the cost of an instruction, or a group of instructions. In addition to a numeric value representing the cost the class also contains a state that can be used to encode particular properties, such as a cost being invalid. Operations on InstructionCost implement saturation arithmetic, so that accumulating costs on large cost-values don't overflow.

Definition in file InstructionCost.h.