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

Andrew Trick atrick at apple.com
Tue Nov 19 16:08:11 PST 2013


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(…)

Otherwise LGTM.

-Andy



More information about the llvm-commits mailing list