Skip to content

Commit

Permalink
Fix mismatches between function parameter definitions and declarations (
Browse files Browse the repository at this point in the history
#89512)

Addresses issue #88716.

Some function parameter names in the affected header files did not match
the parameter names in the definitions, or were listed in a different
order.

---------

Signed-off-by: Troy-Butler <squintik@outlook.com>
  • Loading branch information
Troy-Butler committed Apr 26, 2024
1 parent 1b2f970 commit 468fecf
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 24 deletions.
14 changes: 5 additions & 9 deletions clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,15 +225,11 @@ class StoreManager {
/// invalidated. This should include any regions explicitly invalidated
/// even if they do not currently have bindings. Pass \c NULL if this
/// information will not be used.
virtual StoreRef invalidateRegions(Store store,
ArrayRef<SVal> Values,
const Expr *E, unsigned Count,
const LocationContext *LCtx,
const CallEvent *Call,
InvalidatedSymbols &IS,
RegionAndSymbolInvalidationTraits &ITraits,
InvalidatedRegions *InvalidatedTopLevel,
InvalidatedRegions *Invalidated) = 0;
virtual StoreRef invalidateRegions(
Store store, ArrayRef<SVal> Values, const Expr *Ex, unsigned Count,
const LocationContext *LCtx, const CallEvent *Call,
InvalidatedSymbols &IS, RegionAndSymbolInvalidationTraits &ITraits,
InvalidatedRegions *TopLevelRegions, InvalidatedRegions *Invalidated) = 0;

/// enterStackFrame - Let the StoreManager to do something when execution
/// engine is about to execute into a callee.
Expand Down
20 changes: 10 additions & 10 deletions llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3141,20 +3141,20 @@ Value *InstCombinerImpl::getSelectCondition(Value *A, Value *B,
return nullptr;
}

/// We have an expression of the form (A & C) | (B & D). Try to simplify this
/// to "A' ? C : D", where A' is a boolean or vector of booleans.
/// We have an expression of the form (A & B) | (C & D). Try to simplify this
/// to "A' ? B : D", where A' is a boolean or vector of booleans.
/// When InvertFalseVal is set to true, we try to match the pattern
/// where we have peeked through a 'not' op and A and B are the same:
/// (A & C) | ~(A | D) --> (A & C) | (~A & ~D) --> A' ? C : ~D
Value *InstCombinerImpl::matchSelectFromAndOr(Value *A, Value *C, Value *B,
/// where we have peeked through a 'not' op and A and C are the same:
/// (A & B) | ~(A | D) --> (A & B) | (~A & ~D) --> A' ? B : ~D
Value *InstCombinerImpl::matchSelectFromAndOr(Value *A, Value *B, Value *C,
Value *D, bool InvertFalseVal) {
// The potential condition of the select may be bitcasted. In that case, look
// through its bitcast and the corresponding bitcast of the 'not' condition.
Type *OrigType = A->getType();
A = peekThroughBitcast(A, true);
B = peekThroughBitcast(B, true);
if (Value *Cond = getSelectCondition(A, B, InvertFalseVal)) {
// ((bc Cond) & C) | ((bc ~Cond) & D) --> bc (select Cond, (bc C), (bc D))
C = peekThroughBitcast(C, true);
if (Value *Cond = getSelectCondition(A, C, InvertFalseVal)) {
// ((bc Cond) & B) | ((bc ~Cond) & D) --> bc (select Cond, (bc B), (bc D))
// If this is a vector, we may need to cast to match the condition's length.
// The bitcasts will either all exist or all not exist. The builder will
// not create unnecessary casts if the types already match.
Expand All @@ -3168,11 +3168,11 @@ Value *InstCombinerImpl::matchSelectFromAndOr(Value *A, Value *C, Value *B,
Type *EltTy = Builder.getIntNTy(SelEltSize / Elts);
SelTy = VectorType::get(EltTy, VecTy->getElementCount());
}
Value *BitcastC = Builder.CreateBitCast(C, SelTy);
Value *BitcastB = Builder.CreateBitCast(B, SelTy);
if (InvertFalseVal)
D = Builder.CreateNot(D);
Value *BitcastD = Builder.CreateBitCast(D, SelTy);
Value *Select = Builder.CreateSelect(Cond, BitcastC, BitcastD);
Value *Select = Builder.CreateSelect(Cond, BitcastB, BitcastD);
return Builder.CreateBitCast(Select, OrigType);
}

Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Transforms/Vectorize/VPlan.h
Original file line number Diff line number Diff line change
Expand Up @@ -3278,8 +3278,8 @@ class VPlan {
private:
/// Add to the given dominator tree the header block and every new basic block
/// that was created between it and the latch block, inclusive.
static void updateDominatorTree(DominatorTree *DT, BasicBlock *LoopLatchBB,
BasicBlock *LoopPreHeaderBB,
static void updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB,
BasicBlock *LoopLatchBB,
BasicBlock *LoopExitBB);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,10 @@ class SparseIterator {
};

/// Helper function to create a TensorLevel object from given `tensor`.
std::unique_ptr<SparseTensorLevel> makeSparseTensorLevel(OpBuilder &builder,
Location loc, Value t,
unsigned tid, Level l);
std::unique_ptr<SparseTensorLevel> makeSparseTensorLevel(OpBuilder &b,
Location l, Value t,
unsigned tid,
Level lvl);

/// Helper function to create a simple SparseIterator object that iterate over
/// the SparseTensorLevel.
Expand Down

0 comments on commit 468fecf

Please sign in to comment.