This is an archive of the discontinued LLVM Phabricator instance.

[Analysis] Support AIX vec_malloc routines
ClosedPublic

Authored by scui on Jan 14 2021, 12:23 PM.

Details

Summary

This is to support the memory routines vec_malloc, vec_calloc, vec_realloc, and vec_free. These routines manage memory that is 16-byte aligned. And they are only available on AIX.

Diff Detail

Event Timeline

scui created this revision.Jan 14 2021, 12:23 PM
scui requested review of this revision.Jan 14 2021, 12:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 14 2021, 12:23 PM

This change LGTM. Lets wait for a few days to give others time to take a look as well.

hubert.reinterpretcast retitled this revision from Support AIX vec_malloc routines to [Analysis] Support AIX vec_malloc routines.Jan 14 2021, 1:22 PM
pjeeva01 accepted this revision.Jan 19 2021, 6:08 AM
This revision is now accepted and ready to land.Jan 19 2021, 6:08 AM
scui added a comment.Jan 19 2021, 7:16 AM

Thanks Jeeva. I need your help to commit this, I don't have commit access yet. The author line should be --author="Shimin Cui <scui@ca.ibm.com>".

scui added a comment.Jan 21 2021, 12:45 PM

Test case?

The change in TargetLibraryInfoTest.cpp is kind of for testing. I checked previous similar patches, ie, adding platform specific functions, there was no additional test cases added other than adding to TargetLibraryInfoTest.cpp.

RolandF added inline comments.Jan 21 2021, 2:54 PM
llvm/include/llvm/Analysis/TargetLibraryInfo.def
1432

vec_realloc?

llvm/lib/Transforms/Utils/BuildLibCalls.cpp
560

Should we not handle vec_free in this file as well?

scui updated this revision to Diff 318519.Jan 22 2021, 7:23 AM

To Address comments from Roland - fix the comment in def and add missing vec_free in BuildLibCalls.cpp

scui added inline comments.Jan 22 2021, 7:24 AM
llvm/include/llvm/Analysis/TargetLibraryInfo.def
1432

yes, fixed

llvm/lib/Transforms/Utils/BuildLibCalls.cpp
560

added

RolandF accepted this revision.Jan 22 2021, 7:53 AM

LGTM

scui added a comment.Jan 22 2021, 10:32 AM

Thanks Roland for the approval. I don't have commit access. Can you help pls to commit this? The author line should be --author="Shimin Cui <scui@ca.ibm.com>".

This revision was automatically updated to reflect the committed changes.