SIL: Optimization remarks can take SILType by value

No need to pass a pointer to SILType; it is a pointer-sized value itself.
This commit is contained in:
Slava Pestov
2019-02-28 20:38:46 -05:00
parent 2ce6867c7b
commit c970caedd5
3 changed files with 11 additions and 5 deletions

View File

@@ -535,7 +535,7 @@ static bool tryToSpeculateTarget(FullApplySite AI, ClassHierarchyAnalysis *CHA,
RemarkPassed R("PartialSpecDevirt", *AI.getInstruction());
R << "Partially devirtualized call with run-time checks for "
<< NV("NumSubTypesChecked", Subs.size()) << " subclasses of "
<< NV("ClassType", &ClassType);
<< NV("ClassType", ClassType);
if (NotHandledSubsNum)
R << ", number of subclasses not devirtualized: "
<< NV("NotHandledSubsNum", NotHandledSubsNum);
@@ -549,7 +549,7 @@ static bool tryToSpeculateTarget(FullApplySite AI, ClassHierarchyAnalysis *CHA,
auto RB = [&]() {
return RemarkPassed("SpecDevirt", *AI.getInstruction())
<< "Devirtualized call with run-time checks for the derived classes "
"of " << NV("ClassType", &ClassType);
"of " << NV("ClassType", ClassType);
};
// At this point it is known that there is only one remaining method