Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions llvm/include/llvm/Analysis/ScalarEvolution.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,7 @@ class SCEVUnionPredicate final : public SCEVPredicate {
public:
SCEVUnionPredicate(ArrayRef<const SCEVPredicate *> Preds);

const SmallVectorImpl<const SCEVPredicate *> &getPredicates() const {
return Preds;
}
ArrayRef<const SCEVPredicate *> getPredicates() const { return Preds; }

/// Implementation of the SCEVPredicate interface
bool isAlwaysTrue() const override;
Expand Down
3 changes: 1 addition & 2 deletions llvm/lib/Analysis/ScalarEvolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14914,8 +14914,7 @@ void PredicatedScalarEvolution::addPredicate(const SCEVPredicate &Pred) {
if (Preds->implies(&Pred))
return;

auto &OldPreds = Preds->getPredicates();
SmallVector<const SCEVPredicate*, 4> NewPreds(OldPreds.begin(), OldPreds.end());
SmallVector<const SCEVPredicate *, 4> NewPreds(Preds->getPredicates());
NewPreds.push_back(&Pred);
Preds = std::make_unique<SCEVUnionPredicate>(NewPreds);
updateGeneration();
Expand Down
5 changes: 2 additions & 3 deletions llvm/lib/Transforms/Utils/LCSSA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,11 @@ bool llvm::formLCSSAForInstructions(SmallVectorImpl<Instruction *> &Worklist,

// Compute the set of BasicBlocks in the loop `L` dominating at least one exit.
static void computeBlocksDominatingExits(
Loop &L, const DominatorTree &DT,
const SmallVectorImpl<BasicBlock *> &ExitBlocks,
Loop &L, const DominatorTree &DT, ArrayRef<BasicBlock *> ExitBlocks,
SmallSetVector<BasicBlock *, 8> &BlocksDominatingExits) {
// We start from the exit blocks, as every block trivially dominates itself
// (not strictly).
SmallVector<BasicBlock *, 8> BBWorklist(ExitBlocks.begin(), ExitBlocks.end());
SmallVector<BasicBlock *, 8> BBWorklist(ExitBlocks);

while (!BBWorklist.empty()) {
BasicBlock *BB = BBWorklist.pop_back_val();
Expand Down
6 changes: 3 additions & 3 deletions llvm/utils/TableGen/Common/DAGISelMatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ SwitchTypeMatcher::~SwitchTypeMatcher() {
delete C.second;
}

CheckPredicateMatcher::CheckPredicateMatcher(
const TreePredicateFn &pred, const SmallVectorImpl<unsigned> &Ops)
CheckPredicateMatcher::CheckPredicateMatcher(const TreePredicateFn &pred,
ArrayRef<unsigned> Ops)
: Matcher(CheckPredicate), Pred(pred.getOrigPatFragRecord()),
Operands(Ops.begin(), Ops.end()) {}
Operands(Ops) {}

TreePredicateFn CheckPredicateMatcher::getPredicate() const {
return TreePredicateFn(Pred);
Expand Down
2 changes: 1 addition & 1 deletion llvm/utils/TableGen/Common/DAGISelMatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ class CheckPredicateMatcher : public Matcher {

public:
CheckPredicateMatcher(const TreePredicateFn &pred,
const SmallVectorImpl<unsigned> &Operands);
ArrayRef<unsigned> Operands);

TreePredicateFn getPredicate() const;
unsigned getNumOperands() const;
Expand Down