[PATCH] D81905: Enhance Itanium demangler interface.
Duncan P. N. Exon Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 24 15:47:24 PDT 2020
dexonsmith added a reviewer: hfinkel.
dexonsmith added a subscriber: hfinkel.
dexonsmith added a comment.
In D81905#2105843 <https://reviews.llvm.org/D81905#2105843>, @kbobrovs wrote:
> Yes, I infer semantics properties. I use demangler to implement lowering of "C++ intrinsics" - Itanium-mangled C++ name (e.g. templated function instantiation) - for my SPIRV-based target. Lowering depends on the name, template parameter values and argument types (if overloaded). https://github.com/intel/llvm/pull/1881
>
> > If its to infer some semantic property of the symbol then there probably are better ways of expressing that, like getting the frontend to add metadata or a function attribute or something.
>
> It is not obvious to me that metadata + attributes is better than demangling (as long as it implemented correctly) - with demangling implementation is more self-encapsulated and simpler. But that's pretty much orthogonal to this code change.
Hmm, I would tend to agree with Erik here, that directly declaring the semantics via an attribute (or metadata) is better than encoding it in the name. I think it will be easier to reason about if you declare the semantics in the IR.
@hfinkel do you have thoughts?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81905/new/
https://reviews.llvm.org/D81905
More information about the llvm-commits
mailing list