[PATCH] D53342: [SimplifyLibCalls] Mark known arguments with nonnull

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 14 11:27:22 PDT 2019


xbolva00 marked 2 inline comments as done.
xbolva00 added inline comments.


================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:638
+  AttrBuilder ArgAttrs(CI->getAttributes().getParamAttributes(0));
+  NewCI->getAttributes().addParamAttributes(CI->getContext(), 0, ArgAttrs);
   return Dst;
----------------
jdoerfert wrote:
> Somewhere above and somewhere below you copy all attributes, here only the param 0 attributes, is there a reason why?
I think it crashed for me. I will check it again.


================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:3111
+        CI->getArgOperand(0), 1, CI->getArgOperand(1), 1, CI->getArgOperand(2));
+    NewCI->setAttributes(CI->getAttributes());
     return CI->getArgOperand(0);
----------------
jdoerfert wrote:
> Is there a reason this is not happening for the two functions below?
Oops, thanks! I will adjust those places too.


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

https://reviews.llvm.org/D53342





More information about the llvm-commits mailing list