[PATCH] D80046: [StackSafety] Make full LTO to attach metadata if MTE is enabled

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 18 21:40:50 PDT 2020


vitalybuka added a comment.

In D80046#2042937 <https://reviews.llvm.org/D80046#2042937>, @efriedma wrote:

> Okay, I think we're mostly on the same page, then.


Probably most important is Q no. 4.

> I have a few issues here:
> 
> 1. Whether the backend wants this information is really a per-function decision, not a per-module decision; using module-level metadata is sort of weird.

Correct. Seems like redundancy.
BTW. Even if the function is not sanitized, it's stack safety analysis can be useful for sanitized callers.

> 2. Having weird rules like this makes it harder to write a non-clang frontend producing LLVM IR.

So it's traidoff , quit pass early vs more computations. I prefer the flag, but not strongly.

> 3. All metadata produced and used by in-tree code needs to be documented in LangRef.

I'll update if we go this way

> 4. Is there some reason this analysis needs to run in the middle of the pass pipeline, as opposed to running it closer to where we actually use the information?  Along those lines, do we need to encode this as metadata at all?

In the current design StackSafety is ModulePass and AArch64StackTagging is FunctionPass.
We have some difficulty of using ModulePass from FunctionPass without significant reordering passes. But I suspect it's possible to find good solution. I'll try to get more details.
If we go that way then this patch is not needed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80046





More information about the llvm-commits mailing list