[EarlyCSE] Minor cosmetic NFC changes

- Avoid implicit conversion from pointer to bool
 - Add a comment when passing in a boolean value

llvm-svn: 272955
This commit is contained in:
Sanjoy Das 2016-06-16 21:00:57 +00:00
parent 07c6521aed
commit 1ab2fad363
1 changed files with 2 additions and 2 deletions

View File

@ -434,7 +434,7 @@ private:
bool isInvariantLoad() const {
if (auto *LI = dyn_cast<LoadInst>(Inst))
return LI->getMetadata(LLVMContext::MD_invariant_load);
return LI->getMetadata(LLVMContext::MD_invariant_load) != nullptr;
return false;
}
@ -763,7 +763,7 @@ bool EarlyCSE::processNode(DomTreeNode *Node) {
AvailableLoads.insert(
MemInst.getPointerOperand(),
LoadValue(Inst, CurrentGeneration, MemInst.getMatchingId(),
MemInst.isAtomic(), false));
MemInst.isAtomic(), /*IsInvariant=*/false));
// Remember that this was the last unordered store we saw for DSE. We
// don't yet handle DSE on ordered or volatile stores since we don't