1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

[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 ac64bfe852
commit a711f65a0e

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