[llvm] r260727 - Initialize CodeMetrics' member variables inline with definitions.
Justin Lebar via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 12 12:59:20 PST 2016
Author: jlebar
Date: Fri Feb 12 14:59:20 2016
New Revision: 260727
URL: http://llvm.org/viewvc/llvm-project?rev=260727&view=rev
Log:
Initialize CodeMetrics' member variables inline with definitions.
Summary: No functional changes.
Reviewers: jingyue
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D17125
Modified:
llvm/trunk/include/llvm/Analysis/CodeMetrics.h
Modified: llvm/trunk/include/llvm/Analysis/CodeMetrics.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/CodeMetrics.h?rev=260727&r1=260726&r2=260727&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/CodeMetrics.h (original)
+++ llvm/trunk/include/llvm/Analysis/CodeMetrics.h Fri Feb 12 14:59:20 2016
@@ -42,50 +42,45 @@ bool callIsSmall(ImmutableCallSite CS);
struct CodeMetrics {
/// \brief True if this function contains a call to setjmp or other functions
/// with attribute "returns twice" without having the attribute itself.
- bool exposesReturnsTwice;
+ bool exposesReturnsTwice = false;
/// \brief True if this function calls itself.
- bool isRecursive;
+ bool isRecursive = false;
/// \brief True if this function cannot be duplicated.
///
/// True if this function contains one or more indirect branches, or it contains
/// one or more 'noduplicate' instructions.
- bool notDuplicatable;
+ bool notDuplicatable = false;
/// \brief True if this function calls alloca (in the C sense).
- bool usesDynamicAlloca;
+ bool usesDynamicAlloca = false;
/// \brief Number of instructions in the analyzed blocks.
- unsigned NumInsts;
+ unsigned NumInsts = false;
/// \brief Number of analyzed blocks.
- unsigned NumBlocks;
+ unsigned NumBlocks = false;
/// \brief Keeps track of basic block code size estimates.
DenseMap<const BasicBlock *, unsigned> NumBBInsts;
/// \brief Keep track of the number of calls to 'big' functions.
- unsigned NumCalls;
+ unsigned NumCalls = false;
/// \brief The number of calls to internal functions with a single caller.
///
/// These are likely targets for future inlining, likely exposed by
/// interleaved devirtualization.
- unsigned NumInlineCandidates;
+ unsigned NumInlineCandidates = 0;
/// \brief How many instructions produce vector values.
///
/// The inliner is more aggressive with inlining vector kernels.
- unsigned NumVectorInsts;
+ unsigned NumVectorInsts = 0;
/// \brief How many 'ret' instructions the blocks contain.
- unsigned NumRets;
-
- CodeMetrics()
- : exposesReturnsTwice(false), isRecursive(false), notDuplicatable(false),
- usesDynamicAlloca(false), NumInsts(0), NumBlocks(0), NumCalls(0),
- NumInlineCandidates(0), NumVectorInsts(0), NumRets(0) {}
+ unsigned NumRets = 0;
/// \brief Add information about a block to the current state.
void analyzeBasicBlock(const BasicBlock *BB, const TargetTransformInfo &TTI,
More information about the llvm-commits
mailing list