Skip to content

Commit

Permalink
Attributor: Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
arsenm committed Mar 3, 2023
1 parent ce3d93e commit ba21524
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions llvm/include/llvm/Transforms/IPO/Attributor.h
Original file line number Diff line number Diff line change
Expand Up @@ -2600,7 +2600,7 @@ struct BitIntegerState

/// Keep only "assumed bits" also set in \p BitsEncoding but all known ones.
BitIntegerState &intersectAssumedBits(base_t BitsEncoding) {
// Make sure we never loose any "known bits".
// Make sure we never lose any "known bits".
this->Assumed = (this->Assumed & BitsEncoding) | this->Known;
return *this;
}
Expand Down Expand Up @@ -2641,14 +2641,14 @@ struct IncIntegerState

/// Take minimum of assumed and \p Value.
IncIntegerState &takeAssumedMinimum(base_t Value) {
// Make sure we never loose "known value".
// Make sure we never lose "known value".
this->Assumed = std::max(std::min(this->Assumed, Value), this->Known);
return *this;
}

/// Take maximum of known and \p Value.
IncIntegerState &takeKnownMaximum(base_t Value) {
// Make sure we never loose "known value".
// Make sure we never lose "known value".
this->Assumed = std::max(Value, this->Assumed);
this->Known = std::max(Value, this->Known);
return *this;
Expand Down Expand Up @@ -2677,14 +2677,14 @@ struct DecIntegerState : public IntegerStateBase<base_ty, 0, ~base_ty(0)> {

/// Take maximum of assumed and \p Value.
DecIntegerState &takeAssumedMaximum(base_t Value) {
// Make sure we never loose "known value".
// Make sure we never lose "known value".
this->Assumed = std::min(std::max(this->Assumed, Value), this->Known);
return *this;
}

/// Take minimum of known and \p Value.
DecIntegerState &takeKnownMinimum(base_t Value) {
// Make sure we never loose "known value".
// Make sure we never lose "known value".
this->Assumed = std::min(Value, this->Assumed);
this->Known = std::min(Value, this->Known);
return *this;
Expand Down Expand Up @@ -2811,7 +2811,7 @@ struct IntegerRangeState : public AbstractState {

/// Unite assumed range with the passed state.
void unionAssumed(const ConstantRange &R) {
// Don't loose a known range.
// Don't lose a known range.
Assumed = Assumed.unionWith(R).intersectWith(Known);
}

Expand Down

0 comments on commit ba21524

Please sign in to comment.