vitalybuka added a comment.

In D80046#2042874 <https://reviews.llvm.org/D80046#2042874>, @vitalybuka wrote:

> In D80046#2040309 <https://reviews.llvm.org/D80046#2040309>, @efriedma wrote:
>
> > If I'm understanding this correctly, the stack-safe metadata on allocas is 
> > both produced and consumed at LTO-time.  So at the point where the 
> > stack-safe metadata would be produced, we can compute whether any later 
> > passes will query it.
> >
> > Given that, why do you need a module flag?
>
>
> I assumed a pass knows nothing about consumers. Can you point to some 
> examples how this can be done?


Oh, I assume the idea to take that from AArch64TargetMachine.
Still AArch64TargetMachine is going to use this info only if sanitizers where 
enabled. Also right now SSI is used for  memtag. but asan, hwasan may follow.
I assume LTO PM knows nothing about if clang was using sanitizers, so we have 
always to insert the pass. Then we'd like to return from pass if nothing to do 
there.
The pass may check if there are functions with corresponding sanitizer 
attributes. However with module flag we can make it more efficient and avoid  
scanning all functions.

BTW. function attribute was used in the first snapshot, but @eugenis proposed 
the flag and I agree with him that now it's nicer.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80046



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to