[PATCH] D79830: Add support of __builtin_expect_with_probability

Zhi Zhuang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 13 16:24:12 PDT 2020


LukeZhuang marked 4 inline comments as done.
LukeZhuang added inline comments.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2049
+    ConstantFP *Confidence_f = dyn_cast<ConstantFP>(Confidence);
+    if (!Confidence_f) {
+      CGM.Error(E->getArg(2)->getLocStart(),
----------------
erichkeane wrote:
> This check should be able to be done during Sema.
fixed in the lastest change


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2056
+      if (prob < 0.0 || prob > 1.0) {
+        CGM.Error(E->getArg(2)->getLocStart(),
+                  "probability of __builtin_expect_with_probability is "
----------------
erichkeane wrote:
> Same as above, we shouldn't do this during Codegen.
fixed in the lastest change


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79830/new/

https://reviews.llvm.org/D79830





More information about the cfe-commits mailing list