[llvm] 0a5d435 - Revert "[Analysis] Make members of InlineCost const (NFC)"
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 23 09:41:30 PDT 2022
Author: Kazu Hirata
Date: 2022-09-23T09:41:21-07:00
New Revision: 0a5d4355c961d04697154b02b74e7c3ff1f478c7
URL: https://github.com/llvm/llvm-project/commit/0a5d4355c961d04697154b02b74e7c3ff1f478c7
DIFF: https://github.com/llvm/llvm-project/commit/0a5d4355c961d04697154b02b74e7c3ff1f478c7.diff
LOG: Revert "[Analysis] Make members of InlineCost const (NFC)"
This reverts commit 9ac934d1bf5769276335b247e954f2dbcb467c79.
I'm reverting this to accommodate Yevgeny Rouban's downstream branch
where a field of InlineCost changes.
Added:
Modified:
llvm/include/llvm/Analysis/InlineCost.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/InlineCost.h b/llvm/include/llvm/Analysis/InlineCost.h
index 2b56f13561e2a..a0a5cb8bf356c 100644
--- a/llvm/include/llvm/Analysis/InlineCost.h
+++ b/llvm/include/llvm/Analysis/InlineCost.h
@@ -90,16 +90,16 @@ class InlineCost {
enum SentinelValues { AlwaysInlineCost = INT_MIN, NeverInlineCost = INT_MAX };
/// The estimated cost of inlining this callsite.
- const int Cost = 0;
+ int Cost = 0;
/// The adjusted threshold against which this cost was computed.
- const int Threshold = 0;
+ int Threshold = 0;
/// Must be set for Always and Never instances.
- const char *const Reason = nullptr;
+ const char *Reason = nullptr;
/// The cost-benefit pair computed by cost-benefit analysis.
- const Optional<CostBenefitPair> CostBenefit = None;
+ Optional<CostBenefitPair> CostBenefit = None;
// Trivial constructor, interesting logic in the factory functions below.
InlineCost(int Cost, int Threshold, const char *Reason = nullptr,
More information about the llvm-commits
mailing list