diff options
| author | Philip Reames <listmail@philipreames.com> | 2019-09-04 17:46:55 +0000 |
|---|---|---|
| committer | Philip Reames <listmail@philipreames.com> | 2019-09-04 17:46:55 +0000 |
| commit | 3a49ca331fa2ac8d3d7bc231ea2b671588ad476a (patch) | |
| tree | 37e1e6a183ebc62c3b9789af1994214d8f6307f5 /llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | |
| parent | f6233d90f0d82a99bcd9b2f1bd4aeea0a1933a48 (diff) | |
| download | bcm5719-llvm-3a49ca331fa2ac8d3d7bc231ea2b671588ad476a.tar.gz bcm5719-llvm-3a49ca331fa2ac8d3d7bc231ea2b671588ad476a.zip | |
Update CodeGen to use hasMetadata as appropriate [NFC]
My intial grepping for rL370933 missed a directory worth of cases.
llvm-svn: 370942
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FastISel.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index 592c0e9e49c..f8352ca2fe6 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -1237,7 +1237,7 @@ bool FastISel::lowerCallTo(CallLoweringInfo &CLI) { updateValueMap(CLI.CS->getInstruction(), CLI.ResultReg, CLI.NumResultRegs); // Set labels for heapallocsite call. - if (CLI.CS && CLI.CS->getInstruction()->getMetadata("heapallocsite")) { + if (CLI.CS && CLI.CS->getInstruction()->hasMetadata("heapallocsite")) { const MDNode *MD = CLI.CS->getInstruction()->getMetadata("heapallocsite"); MF->addCodeViewHeapAllocSite(CLI.Call, MD); } @@ -2417,10 +2417,9 @@ FastISel::createMachineMemOperandFor(const Instruction *I) const { } else return nullptr; - bool IsNonTemporal = I->getMetadata(LLVMContext::MD_nontemporal) != nullptr; - bool IsInvariant = I->getMetadata(LLVMContext::MD_invariant_load) != nullptr; - bool IsDereferenceable = - I->getMetadata(LLVMContext::MD_dereferenceable) != nullptr; + bool IsNonTemporal = I->hasMetadata(LLVMContext::MD_nontemporal); + bool IsInvariant = I->hasMetadata(LLVMContext::MD_invariant_load); + bool IsDereferenceable = I->hasMetadata(LLVMContext::MD_dereferenceable); const MDNode *Ranges = I->getMetadata(LLVMContext::MD_range); AAMDNodes AAInfo; |

