[flang-commits] [flang] [flang] Change `uniqueCGIdent` separator from `.` to `_` (PR #71338)

Johannes Doerfert via flang-commits flang-commits at lists.llvm.org
Mon Nov 6 12:11:45 PST 2023


jdoerfert wrote:

> @jdoerfert just pointed out that `$` is a better option for offload identifiers as there is no possibilities of collision with user defined names -literals are never going to collide. I see 2 options:
> 
> 1. Change all separators to `$` or some other valid separator for the sake of consistency.
> 2. Adding a pass to change `.` in offload identifiers.

Since QQ is reserved, we can use `_` with QQ, assuming all use cases have QQ or some other way of preventing clashes.

Wrt. renaming late, I generally advise against. It makes tracing names across stages unnecessarily complicated. Consistent names (throughout the pipeline and across targets) makes tooling and debugging much easier.

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


More information about the flang-commits mailing list