[clang] [flang] [flang] Enable alias tags pass by default (PR #73111)

Andrzej Warzyński via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 27 08:21:08 PST 2023


banach-space wrote:

>  I don't feel strongly about it

ACK. 

I mostly care about consistency in the interface exposed to the end-user. TBH, I've never really investigated the relationship of `-O{0|1|2|3|4}` with various feature flags. What I described definitely holds for `-f{no-}some_feature` flags. But not 100% sure about `-O{0|1|2|3|4}`. 

TBH, this feels like just too much control in users' hands. So I would keep this option as hidden and use strictly for compiler development.

You could also just update the [relevant help text](https://github.com/banach-space/llvm-project/blob/fecd909bdd66ab1942af9cda6b67d82b5ef016ae/clang/include/clang/Driver/Options.td#L6337-L6338):
```
  PosFlag<SetTrue, [], [], "Pass alias information on to LLVM (overrides -O0 which disables alias analysis)">,
  NegFlag<SetFalse, [], [], "Do not pass alias information on to LLVM (overrides -O{1|2|3|4} which enable alias analysis)">>;
```

Btw, thanks for working on this - really great to see progress on this front! 🙏🏻 

https://github.com/llvm/llvm-project/pull/73111


More information about the cfe-commits mailing list