[llvm] r353267 - [AliasSetTracker] Minor style tweak to avoid a variable w/two distinct live ranges [NFC]
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 5 19:46:40 PST 2019
Author: reames
Date: Tue Feb 5 19:46:40 2019
New Revision: 353267
URL: http://llvm.org/viewvc/llvm-project?rev=353267&view=rev
Log:
[AliasSetTracker] Minor style tweak to avoid a variable w/two distinct live ranges [NFC]
Modified:
llvm/trunk/lib/Analysis/AliasSetTracker.cpp
Modified: llvm/trunk/lib/Analysis/AliasSetTracker.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasSetTracker.cpp?rev=353267&r1=353266&r2=353267&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/AliasSetTracker.cpp (original)
+++ llvm/trunk/lib/Analysis/AliasSetTracker.cpp Tue Feb 5 19:46:40 2019
@@ -428,14 +428,12 @@ void AliasSetTracker::addUnknown(Instruc
if (!Inst->mayReadOrWriteMemory())
return; // doesn't alias anything
- AliasSet *AS = findAliasSetForUnknownInst(Inst);
- if (AS) {
+ if (AliasSet *AS = findAliasSetForUnknownInst(Inst)) {
AS->addUnknownInst(Inst, AA);
return;
}
AliasSets.push_back(new AliasSet());
- AS = &AliasSets.back();
- AS->addUnknownInst(Inst, AA);
+ AliasSets.back().addUnknownInst(Inst, AA);
}
void AliasSetTracker::add(Instruction *I) {
More information about the llvm-commits
mailing list