[PATCH] D65823: [llvm] InlineCost shouldn't assert about zero thresholds when full cost is requested.
Mircea Trofin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 6 12:57:16 PDT 2019
mtrofin created this revision.
mtrofin added a reviewer: davidxl.
Herald added subscribers: llvm-commits, haicheng, hiraditya, eraman.
Herald added a project: LLVM.
mtrofin added a reviewer: yamauchi.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D65823
Files:
llvm/lib/Analysis/InlineCost.cpp
Index: llvm/lib/Analysis/InlineCost.cpp
===================================================================
--- llvm/lib/Analysis/InlineCost.cpp
+++ llvm/lib/Analysis/InlineCost.cpp
@@ -1758,9 +1758,9 @@
// While Threshold depends on commandline options that can take negative
// values, we want to enforce the invariant that the computed threshold and
// bonuses are non-negative.
- assert(Threshold >= 0);
- assert(SingleBBBonus >= 0);
- assert(VectorBonus >= 0);
+ assert(ComputeFullInlineCost || Threshold >= 0);
+ assert(ComputeFullInlineCost || SingleBBBonus >= 0);
+ assert(ComputeFullInlineCost || VectorBonus >= 0);
// Speculatively apply all possible bonuses to Threshold. If cost exceeds
// this Threshold any time, and cost cannot decrease, we can stop processing
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65823.213696.patch
Type: text/x-patch
Size: 799 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190806/a9efc03d/attachment-0001.bin>
More information about the llvm-commits
mailing list