This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Ported and adopted AMDLibCalls pass
ClosedPublic

Authored by rampitec on Aug 7 2017, 5:04 PM.

Details

Summary

The pass does simplifications of well known AMD library calls.
If given -amdgpu-prelink option it works in a pre-link mode which
allows to reference new library functions which will be linked in
later.

In addition it also used to process traditional AMD option
-fuse-native which allows to replace some of the functions with
their fast native implementations from the library.

The necessary glue to pass the prelink option and translate
-fuse-native is to be added to the driver.

Diff Detail

Repository
rL LLVM

Event Timeline

rampitec created this revision.Aug 7 2017, 5:04 PM
arsenm added a comment.Aug 7 2017, 5:12 PM

Have you tried to make TargetLibraryInfo aware of the different names used for the same library functions?

Have you tried to make TargetLibraryInfo aware of the different names used for the same library functions?

TLI is too different. Not only it does not have most of the functions we need, but we also need a convenient way dealing with vectors and a mangler to create new names, plus demangler to break down name into base and argument info.

vpykhtin accepted this revision.Aug 11 2017, 8:34 AM

LGTM.

This revision is now accepted and ready to land.Aug 11 2017, 8:34 AM
This revision was automatically updated to reflect the committed changes.