[PATCH][llvm-c] expose fence instruction to the C API

Filip Pizlo fpizlo at apple.com
Tue Nov 19 16:13:15 PST 2013


On Nov 19, 2013, at 4:08 PM, Andrew Trick <atrick at apple.com> wrote:

> 
> On Nov 19, 2013, at 11:50 AM, Filip Pizlo <fpizlo at apple.com> wrote:
> 
>> New patch!
>> 
>> <build-fence.patch>
>> 
>> 
>> On Nov 19, 2013, at 11:30 AM, Peter Zotov <whitequark at whitequark.org> wrote:
>> 
>>> Filip Pizlo писал 19.11.2013 23:22:
>>>> Hi all!
>>>> This is a fairly trivial patch to expose the fence instruction to the C API.
>>> 
>>> 1) You forgot to call map_from_llvmordering from LLVMBuildAtomicRMW.
>> 
>> Ooops! Fixed.
>> 
>>> 2) I would accept a Name parameter in the LLVMBuildFence function, as all other
>>> LLVMBuild* functions have it.
>> 
>> Fixed.
>> 
>>> 3) I've done some similar work in http://llvm-reviews.chandlerc.com/D2176,
>>> you may want to take a look.
>>> 
>>> -- 
>>> WBR, Peter Zotov.
>> 
> 
> +static AtomicOrdering map_from_llvmordering(LLVMAtomicOrdering Ordering) {
> 
> Might as well use LLVM’s current naming conventions for a static function:
> 
> mapFromLLVMOrdering(…)

Yup, fixed.

> 
> Otherwise LGTM.

Thanks!

> 
> -Andy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131119/902e4574/attachment.html>


More information about the llvm-commits mailing list