diff options
author | Andy Ayers <andya@microsoft.com> | 2016-04-19 11:34:06 -0700 |
---|---|---|
committer | Andy Ayers <andya@microsoft.com> | 2016-04-20 11:04:14 -0700 |
commit | 7ca3d6edc5b66145d309a3d9c9917c530bf1e871 (patch) | |
tree | 05534566f1c0211a8dad327b92b15f4039f12725 /src/jit/inlinepolicy.h | |
parent | fa9d085cfffe748f0bb9c977d0ddf00b0d654168 (diff) | |
download | coreclr-7ca3d6edc5b66145d309a3d9c9917c530bf1e871.tar.gz coreclr-7ca3d6edc5b66145d309a3d9c9917c530bf1e871.tar.bz2 coreclr-7ca3d6edc5b66145d309a3d9c9917c530bf1e871.zip |
Inliner: estimate overall code size impact
Accumulate the per-inline size impact estimates into an overall inline
size impact estimate. No size budgeting (yet); this just provides data
for further study.
Diffstat (limited to 'src/jit/inlinepolicy.h')
-rw-r--r-- | src/jit/inlinepolicy.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/jit/inlinepolicy.h b/src/jit/inlinepolicy.h index 6afe0a2926..4152870aef 100644 --- a/src/jit/inlinepolicy.h +++ b/src/jit/inlinepolicy.h @@ -108,6 +108,9 @@ public: // Policy policies bool PropagateNeverToRuntime() const override { return true; } + // Policy estimates + int CodeSizeEstimate() override; + #if defined(DEBUG) || defined(INLINE_DATA) const char* GetName() const override { return "LegacyPolicy"; } @@ -169,6 +172,12 @@ public: // Policy policies bool PropagateNeverToRuntime() const override { return true; } + // Policy estimates + int CodeSizeEstimate() override + { + return 0; + } + const char* GetName() const override { return "RandomPolicy"; } private: @@ -209,6 +218,9 @@ public: // Policy determinations void DetermineProfitability(CORINFO_METHOD_INFO* methodInfo) override; + // Policy estimates + int CodeSizeEstimate() override; + // Externalize data void DumpData(FILE* file) const override; void DumpSchema(FILE* file) const override; @@ -217,7 +229,7 @@ public: const char* GetName() const override { return "DiscretionaryPolicy"; } protected: - + void ComputeOpcodeBin(OPCODE opcode); void EstimateCodeSize(); void MethodInfoObservations(CORINFO_METHOD_INFO* methodInfo); |