Add noinline keyword to SkSL.

As you might expect, a function tagged with `noinline` will never be
considered as a candidate for inlining.

Change-Id: Ia098f8974e6de251d78bb2a76cd71db8a86bc19c
Bug: skia:11362
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382337
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
diff --git a/src/sksl/SkSLInliner.cpp b/src/sksl/SkSLInliner.cpp
index 829e964..10bea6c 100644
--- a/src/sksl/SkSLInliner.cpp
+++ b/src/sksl/SkSLInliner.cpp
@@ -786,6 +786,11 @@
         return false;
     }
 
+    if (functionDef->declaration().modifiers().fFlags & Modifiers::kNoInline_Flag) {
+        // Refuse to inline functions decorated with `noinline`.
+        return false;
+    }
+
     // We don't have any mechanism to simulate early returns within a construct that supports
     // continues (for/do/while), so we can't inline if there's a return inside one.
     bool hasReturnInContinuableConstruct =