[llvm] r372604 - [ValueTracking] Remove unused matchSelectPattern optional argument. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 23 06:20:47 PDT 2019
Author: rksimon
Date: Mon Sep 23 06:20:47 2019
New Revision: 372604
URL: http://llvm.org/viewvc/llvm-project?rev=372604&view=rev
Log:
[ValueTracking] Remove unused matchSelectPattern optional argument. NFCI.
The matchSelectPattern const wrapper is never explicitly called with the optional Instruction::CastOps argument, and it turns out that it wasn't being forwarded to matchSelectPattern anyway!
Noticed while investigating clang static analyzer warnings.
Modified:
llvm/trunk/include/llvm/Analysis/ValueTracking.h
Modified: llvm/trunk/include/llvm/Analysis/ValueTracking.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ValueTracking.h?rev=372604&r1=372603&r2=372604&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ValueTracking.h (original)
+++ llvm/trunk/include/llvm/Analysis/ValueTracking.h Mon Sep 23 06:20:47 2019
@@ -620,12 +620,12 @@ class Value;
SelectPatternResult matchSelectPattern(Value *V, Value *&LHS, Value *&RHS,
Instruction::CastOps *CastOp = nullptr,
unsigned Depth = 0);
+
inline SelectPatternResult
- matchSelectPattern(const Value *V, const Value *&LHS, const Value *&RHS,
- Instruction::CastOps *CastOp = nullptr) {
- Value *L = const_cast<Value*>(LHS);
- Value *R = const_cast<Value*>(RHS);
- auto Result = matchSelectPattern(const_cast<Value*>(V), L, R);
+ matchSelectPattern(const Value *V, const Value *&LHS, const Value *&RHS) {
+ Value *L = const_cast<Value *>(LHS);
+ Value *R = const_cast<Value *>(RHS);
+ auto Result = matchSelectPattern(const_cast<Value *>(V), L, R);
LHS = L;
RHS = R;
return Result;
More information about the llvm-commits
mailing list