[PATCH] D73420: [llvm] Ensure InlineCost-related fields are initialized
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 28 12:11:24 PST 2020
davidxl added inline comments.
================
Comment at: llvm/include/llvm/Analysis/InlineCost.h:163
/// The default threshold to start with for a callee.
- int DefaultThreshold;
----------------
mtrofin wrote:
> davidxl wrote:
> > why is 0 a meaningful default value to start with?
> My goal was to ensure the fields are initialized, to avoid nasty-to-debug uninitialized value bugs; so I picked 0 as the natural thing to initialize with. Happy to change to a different value.
how about initializing it to some illegal value such as -1 to indicate it is not logically initialized
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73420/new/
https://reviews.llvm.org/D73420
More information about the llvm-commits
mailing list