Avoid access to static member ServiceLoaderRewriter.rewrite() via instance reference

Change-Id: I7b5187767ee80f867c7679ddd0416c2bc65c8491
diff --git a/src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java b/src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java
index bbea0ac..4328b31 100644
--- a/src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java
+++ b/src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java
@@ -143,7 +143,6 @@
   private final UninstantiatedTypeOptimization uninstantiatedTypeOptimization;
   private final TypeChecker typeChecker;
   private final IdempotentFunctionCallCanonicalizer idempotentFunctionCallCanonicalizer;
-  private final ServiceLoaderRewriter serviceLoaderRewriter;
 
   final DeadCodeRemover deadCodeRemover;
 
@@ -229,8 +228,6 @@
               ? new UninstantiatedTypeOptimization(appViewWithLiveness)
               : null;
       this.typeChecker = new TypeChecker(appView.withLiveness());
-      this.serviceLoaderRewriter =
-          options.enableServiceLoaderRewriting ? new ServiceLoaderRewriter() : null;
       this.d8NestBasedAccessDesugaring = null;
     } else {
       this.classInliner = null;
@@ -245,7 +242,6 @@
       this.devirtualizer = null;
       this.uninstantiatedTypeOptimization = null;
       this.typeChecker = null;
-      this.serviceLoaderRewriter = null;
       this.d8NestBasedAccessDesugaring =
           options.enableNestBasedAccessDesugaring ? new D8NestBasedAccessDesugaring(appView) : null;
     }
@@ -922,9 +918,9 @@
     // we will return with finalizeEmptyThrowingCode() above.
     assert code.verifyTypes(appView);
 
-    if (serviceLoaderRewriter != null) {
+    if (options.enableServiceLoaderRewriting) {
       assert appView.appInfo().hasLiveness();
-      serviceLoaderRewriter.rewrite(code, appView.withLiveness());
+      ServiceLoaderRewriter.rewrite(code, appView.withLiveness());
     }
 
     if (classStaticizer != null) {