summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2016-02-18 22:09:30 +0000
committerRichard Trieu <rtrieu@google.com>2016-02-18 22:09:30 +0000
commit7a08381403b54cd8998f3c922f18b65867e3c07c (patch)
tree888b16f3115d38f20de5fefd2d736c173a4fdc76 /llvm/lib/Analysis
parentec3d33274887bc59ff3bfdba90494a63850680cc (diff)
downloadbcm5719-llvm-7a08381403b54cd8998f3c922f18b65867e3c07c.tar.gz
bcm5719-llvm-7a08381403b54cd8998f3c922f18b65867e3c07c.zip
Remove uses of builtin comma operator.
Cleanup for upcoming Clang warning -Wcomma. No functionality change intended. llvm-svn: 261270
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/BasicAliasAnalysis.cpp3
-rw-r--r--llvm/lib/Analysis/LoopAccessAnalysis.cpp6
-rw-r--r--llvm/lib/Analysis/ValueTracking.cpp9
3 files changed, 12 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
index 2d92da15a24..74aae76793c 100644
--- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
@@ -1554,7 +1554,8 @@ bool BasicAAResult::constantOffsetHeuristic(
unsigned V0ZExtBits = 0, V0SExtBits = 0, V1ZExtBits = 0, V1SExtBits = 0;
const Value *V0 = GetLinearExpression(Var0.V, V0Scale, V0Offset, V0ZExtBits,
V0SExtBits, DL, 0, AC, DT, NSW, NUW);
- NSW = true, NUW = true;
+ NSW = true;
+ NUW = true;
const Value *V1 = GetLinearExpression(Var1.V, V1Scale, V1Offset, V1ZExtBits,
V1SExtBits, DL, 0, AC, DT, NSW, NUW);
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
index f371feb8142..7227d487002 100644
--- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp
+++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
@@ -1325,8 +1325,10 @@ bool MemoryDepChecker::areDepsSafe(DepCandidates &AccessSets,
AccessSets.findValue(AccessSets.getLeaderValue(CurAccess));
// Check accesses within this set.
- EquivalenceClasses<MemAccessInfo>::member_iterator AI, AE;
- AI = AccessSets.member_begin(I), AE = AccessSets.member_end();
+ EquivalenceClasses<MemAccessInfo>::member_iterator AI =
+ AccessSets.member_begin(I);
+ EquivalenceClasses<MemAccessInfo>::member_iterator AE =
+ AccessSets.member_end();
// Check every access pair.
while (AI != AE) {
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 6dff45f7143..fafbcef2497 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -1024,7 +1024,8 @@ static void computeKnownBitsFromShiftOperator(Operator *I,
// It would be more-clearly correct to use the two temporaries for this
// calculation. Reusing the APInts here to prevent unnecessary allocations.
- KnownZero.clearAllBits(), KnownOne.clearAllBits();
+ KnownZero.clearAllBits();
+ KnownOne.clearAllBits();
// If we know the shifter operand is nonzero, we can sometimes infer more
// known bits. However this is expensive to compute, so be lazy about it and
@@ -1069,8 +1070,10 @@ static void computeKnownBitsFromShiftOperator(Operator *I,
// return anything we'd like, but we need to make sure the sets of known bits
// stay disjoint (it should be better for some other code to actually
// propagate the undef than to pick a value here using known bits).
- if ((KnownZero & KnownOne) != 0)
- KnownZero.clearAllBits(), KnownOne.clearAllBits();
+ if ((KnownZero & KnownOne) != 0) {
+ KnownZero.clearAllBits();
+ KnownOne.clearAllBits();
+ }
}
static void computeKnownBitsFromOperator(Operator *I, APInt &KnownZero,
OpenPOWER on IntegriCloud