diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h index fac0c04ae2caab..ef23b160a3c032 100644 --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h +++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h @@ -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 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 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. diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp index 8ec1ed7529c1cb..ed9a89b14efcca 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp @@ -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. @@ -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); } diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h index c74329a0bcc4ac..21b088cd238660 100644 --- a/llvm/lib/Transforms/Vectorize/VPlan.h +++ b/llvm/lib/Transforms/Vectorize/VPlan.h @@ -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); }; diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h index 9d69a233555986..46b923250dd893 100644 --- a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h +++ b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h @@ -284,9 +284,10 @@ class SparseIterator { }; /// Helper function to create a TensorLevel object from given `tensor`. -std::unique_ptr makeSparseTensorLevel(OpBuilder &builder, - Location loc, Value t, - unsigned tid, Level l); +std::unique_ptr makeSparseTensorLevel(OpBuilder &b, + Location l, Value t, + unsigned tid, + Level lvl); /// Helper function to create a simple SparseIterator object that iterate over /// the SparseTensorLevel.