[PATCH] D81678: Introduce frozen attribute at call sites for stricter poison analysis

Gui Andrade via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 22 16:07:55 PDT 2020


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


================
Comment at: clang/include/clang/Driver/CC1Options.td:507
+def disable_frozen_args : Flag<["-"], "disable-frozen-args">,
+  HelpText<"Disable emitting frozen attribute in LLVM IR">;
 def load : Separate<["-"], "load">, MetaVarName<"<dsopath>">,
----------------
jdoerfert wrote:
> Do we want a second flag for return values or one to disable everything? Having the ability to disable it partially seems odd.
The attribute is supposed to be a stopgap while not all the tests are up to date. It turns out that the return values are much less complicated to update the call operands, so a flag for disabling return position attributes wasn't necessary.


================
Comment at: clang/lib/CodeGen/CGCall.cpp:4095
+    }
+  }
   call->setCallingConv(getRuntimeCC());
----------------
jdoerfert wrote:
> Why would we do this? Function attributes are valid at the call site, no need to copy them.
Do you mean that for some definition: `define @foo(i32 frozen %a, i32 frozen %b)`, it's valid to issue a call instruction like `call @foo(i32 %a, i32 %b)` and its operands will be correctly identified as `frozen`? That's the kind of behavior I was seeing and I wasn't sure if it was an error.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81678





More information about the llvm-commits mailing list