fhahn added a comment.

In D77058#1964427 <https://reviews.llvm.org/D77058#1964427>, @Meinersbur wrote:

> Note that loop-metadata is best-effort only and may be forgotten in the 
> optimization pipeline.


Agreed, that can be a potential issue (I tried to note that in the 
description), but I think that's pretty much the same issue we have with the 
loop related pragmas. Ideally there would be even more incentive now to fix the 
offending transforms.

> Do we also need an equivalent to `-Xclang -disable-O0-optnone`?
> 
> Personally, I don't like to the `optnone` approach: There have been many post 
> on llvm-dev using `clang -emit-llvm` and being surprised that `opt` has no 
> effect.

Ah yes, optnone is a common pitfall :(

IIUC we don't need a patch similar like this one for optnone, as it already 
gets added to the function attributes (for -O0) and has an option to disable 
adding it (-Xclang -disable-O0-optnone) on a per-TU basis.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77058



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

Reply via email to