summaryrefslogtreecommitdiff
path: root/js/src/jit/RangeAnalysis.h
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit/RangeAnalysis.h')
-rw-r--r--js/src/jit/RangeAnalysis.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/js/src/jit/RangeAnalysis.h b/js/src/jit/RangeAnalysis.h
index 16fe93e000..879a20c940 100644
--- a/js/src/jit/RangeAnalysis.h
+++ b/js/src/jit/RangeAnalysis.h
@@ -103,24 +103,24 @@ class RangeAnalysis
public:
RangeAnalysis(MIRGenerator* mir, MIRGraph& graph) :
mir(mir), graph_(graph) {}
- MOZ_MUST_USE bool addBetaNodes();
- MOZ_MUST_USE bool analyze();
- MOZ_MUST_USE bool addRangeAssertions();
- MOZ_MUST_USE bool removeBetaNodes();
- MOZ_MUST_USE bool prepareForUCE(bool* shouldRemoveDeadCode);
- MOZ_MUST_USE bool tryRemovingGuards();
- MOZ_MUST_USE bool truncate();
- MOZ_MUST_USE bool removeUnnecessaryBitops();
+ [[nodiscard]] bool addBetaNodes();
+ [[nodiscard]] bool analyze();
+ [[nodiscard]] bool addRangeAssertions();
+ [[nodiscard]] bool removeBetaNodes();
+ [[nodiscard]] bool prepareForUCE(bool* shouldRemoveDeadCode);
+ [[nodiscard]] bool tryRemovingGuards();
+ [[nodiscard]] bool truncate();
+ [[nodiscard]] bool removeUnnecessaryBitops();
// Any iteration bounds discovered for loops in the graph.
LoopIterationBoundVector loopIterationBounds;
private:
- MOZ_MUST_USE bool analyzeLoop(MBasicBlock* header);
+ [[nodiscard]] bool analyzeLoop(MBasicBlock* header);
LoopIterationBound* analyzeLoopIterationCount(MBasicBlock* header,
MTest* test, BranchDirection direction);
void analyzeLoopPhi(MBasicBlock* header, LoopIterationBound* loopBound, MPhi* phi);
- MOZ_MUST_USE bool tryHoistBoundsCheck(MBasicBlock* header, MBoundsCheck* ins);
+ [[nodiscard]] bool tryHoistBoundsCheck(MBasicBlock* header, MBoundsCheck* ins);
};
class Range : public TempObject {
@@ -455,7 +455,7 @@ class Range : public TempObject {
void dump(GenericPrinter& out) const;
void dump() const;
- MOZ_MUST_USE bool update(const Range* other);
+ [[nodiscard]] bool update(const Range* other);
// Unlike the other operations, unionWith is an in-place
// modification. This is to avoid a bunch of useless extra
@@ -485,7 +485,7 @@ class Range : public TempObject {
static Range* sign(TempAllocator& alloc, const Range* op);
static Range* NaNToZero(TempAllocator& alloc, const Range* op);
- static MOZ_MUST_USE bool negativeZeroMul(const Range* lhs, const Range* rhs);
+ [[nodiscard]] static bool negativeZeroMul(const Range* lhs, const Range* rhs);
bool isUnknownInt32() const {
return isInt32() && lower() == INT32_MIN && upper() == INT32_MAX;