71 int width()
const {
return first; }
82class ImmInfo :
public std::multimap<ImmInfoKey, ImmInfoValue> {
88 return std::multimap<ImmInfoKey, ImmInfoValue>::count(
key);
91 size_t count(
const Operation& operation,
int inputOperandId)
const;
97 const Operation& operation,
int inputOperandId)
const;
104 int destWidth)
const;
106 const Operation& operation,
int inputOperandId,
107 int destWidth)
const;
129 bool allowSignExtension =
false);
std::pair< std::string, int > ImmInfoKey
int64_t lowerBound() const
int64_t upperBound() const
bool signExtending() const
const ImmInfoValue & widestImmediate(const ImmInfoKey &key) const
static int registerImmediateLoadWidth(const TTAMachine::RegisterFile &targetRF, bool allowSignExtension=false)
bool canTakeImmediate(const Operation &operation, int inputOperandId, int64_t value, int destWidth)
static ImmInfoKey key(const Operation &operation, int inputOperandId)
bool canTakeImmediateByWidth(const Operation &operation, int inputOperandId, int bitWidth)
virtual ~ImmInfo()=default
std::pair< int64_t, int64_t > immediateValueBounds(const ImmInfoKey &key, int destWidth) const
size_t count(const ImmInfoKey &key) const
const ImmInfoValue & narrowestImmediate(const ImmInfoKey &key) const