[PATCH] D40567: Always show template parameters in IR type names

2018-02-26 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff abandoned this revision. sepavloff added a comment. The feedback here, in https://reviews.llvm.org/D40508 and in the mail list (http://lists.llvm.org/pipermail/llvm-dev/2017-December/119585.html) demonstrates that this is a wrong direction. Part of this patch is used in

[PATCH] D40567: Always show template parameters in IR type names

2017-12-06 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D40567#943747, @sepavloff wrote: > Although code generation (in LTO compilation) might be unaffected by this > distortions, other applications of IR linking suffer from it. It does not > allow to implement some checks, validation techniques

[PATCH] D40567: Always show template parameters in IR type names

2017-12-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 125761. sepavloff added a comment. Updated patch - old type names are generated always if --ir-type-names is not specified, - added new value of --ir-type-names, none, to suppress type names, - value of --ir-type-names is stored in module properties.

[PATCH] D40567: Always show template parameters in IR type names

2017-12-04 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Consider a bit more complicated example. File `common.h` #ifndef COMMON_H #define COMMON_H struct Alarm { }; struct Info { }; template struct Handler; #endif File `use-1.cpp` #include "common.h" Handler *info; void set(Handler *e) { info = e; }

[PATCH] D40567: Always show template parameters in IR type names

2017-11-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In https://reviews.llvm.org/D40567#940025, @rsmith wrote: > What actual problem is this solving? These IR type names exist only for the > convenience of humans reading the IR, and making them long (potentially > extremely long) by including template arguments seems

[PATCH] D40567: Always show template parameters in IR type names

2017-11-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. What actual problem is this solving? These IR type names exist only for the convenience of humans reading the IR, and making them long (potentially extremely long) by including template arguments seems likely to hinder that more than it helps.

[PATCH] D40567: Always show template parameters in IR type names

2017-11-28 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. Herald added subscribers: JDevlieghere, eraman. If a module contains opaque type and another one contains definition of equivalent type in sense of C++, `llvm-link` merges these types. In this procedure it can rely only on type name. An issue arises if the type is