mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[opt-remark] Have OptEmitter store a SILFunction instead of a SILModule.
In all of these cases, we already had a SILFunction and were just grabbing its SILModule instead of passing it in. So this is just an NFC change. The reason why I am doing this is so that I can force emit opt-remarks on functions with the semantics attribute "optremark", so I need to be able to access the SILFunction in the optimization remark infrastructure.
This commit is contained in:
@@ -60,7 +60,7 @@ class Devirtualizer : public SILFunctionTransform {
|
||||
void Devirtualizer::devirtualizeAppliesInFunction(SILFunction &F,
|
||||
ClassHierarchyAnalysis *CHA) {
|
||||
llvm::SmallVector<ApplySite, 8> NewApplies;
|
||||
OptRemark::Emitter ORE(DEBUG_TYPE, F.getModule());
|
||||
OptRemark::Emitter ORE(DEBUG_TYPE, F);
|
||||
|
||||
SmallVector<ApplySite, 16> Applies;
|
||||
for (auto &BB : F) {
|
||||
|
||||
Reference in New Issue
Block a user