Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions llvm/lib/Analysis/InlineCost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,9 @@ class CallAnalyzer : public InstVisitor<CallAnalyzer, bool> {
InlineResult analyze();

std::optional<Constant *> getSimplifiedValue(Instruction *I) {
if (SimplifiedValues.contains(I))
return SimplifiedValues[I];
auto It = SimplifiedValues.find(I);
if (It != SimplifiedValues.end())
return It->second;
return std::nullopt;
}

Expand Down Expand Up @@ -1129,8 +1130,9 @@ class InlineCostCallAnalyzer final : public CallAnalyzer {
void print(raw_ostream &OS);

std::optional<InstructionCostDetail> getCostDetails(const Instruction *I) {
if (InstructionCostDetailMap.contains(I))
return InstructionCostDetailMap[I];
auto It = InstructionCostDetailMap.find(I);
if (It != InstructionCostDetailMap.end())
return It->second;
return std::nullopt;
}

Expand Down
Loading