[PATCH] D36831: [AMDGPU] Transform __read_pipe_* and __write_pipe_*

Yaxun Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 1 07:02:54 PDT 2017


yaxunl marked 5 inline comments as done.
yaxunl added a comment.

In https://reviews.llvm.org/D36831#858723, @vpykhtin wrote:

> Splitting AMDGPULibFunc in two classes looks a huge overkill. How about modifying AMDGPULibFunc::parse so it could accept unmangled names and just return an enum id for the function (using some fast lookup approach)? Type info for such functions can be left unpopulated and supposed to be handled by the client (as in fold_read_write_pipe).


The unmangled lib function is different from mangled function in the way how the function names and type information are handled. I have found a way to reuse the interface mangle, getOrInsertFunction, getFunction, and getFunctionType. However to achieve that we really need to have different classes for mangled and unmangled lib function and take advantages of some virtual functions. Having different classes for unmangled and mangled lib functions also have a cleaner design where all name mangling stuff are kept in where they belong.


https://reviews.llvm.org/D36831





More information about the llvm-commits mailing list