[PATCH] D73420: [llvm] Ensure InlineCost-related fields are initialized
Mircea Trofin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 25 10:44:11 PST 2020
mtrofin created this revision.
mtrofin added reviewers: davidxl, eraman.
Herald added subscribers: llvm-commits, haicheng.
Herald added a project: LLVM.
Small fix - never hurts to have things initialized.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D73420
Files:
llvm/include/llvm/Analysis/InlineCost.h
Index: llvm/include/llvm/Analysis/InlineCost.h
===================================================================
--- llvm/include/llvm/Analysis/InlineCost.h
+++ llvm/include/llvm/Analysis/InlineCost.h
@@ -67,10 +67,10 @@
};
/// The estimated cost of inlining this callsite.
- int Cost;
+ int Cost = 0;
/// The adjusted threshold against which this cost was computed.
- int Threshold;
+ int Threshold = 0;
/// Must be set for Always and Never instances.
const char *Reason = nullptr;
@@ -160,7 +160,7 @@
struct InlineParams {
/// The default threshold to start with for a callee.
- int DefaultThreshold;
+ int DefaultThreshold = 0;
/// Threshold to use for callees with inline hint.
Optional<int> HintThreshold;
@@ -240,6 +240,6 @@
/// Minimal filter to detect invalid constructs for inlining.
InlineResult isInlineViable(Function &Callee);
-}
+} // namespace llvm
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73420.240390.patch
Type: text/x-patch
Size: 921 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200125/ac087f33/attachment.bin>
More information about the llvm-commits
mailing list