[Mesa-dev] [PATCH] clover: fix llvm 3.5 build error

Francisco Jerez currojerez at riseup.net
Wed Aug 5 04:55:37 PDT 2015


Zoltán Gilián <zoltan.gilian at gmail.com> writes:

>> thanks, this fixes the build for me.
>
> Should I commit this marking you as reviewer?

"fixes the build for me" hardly qualifies as a Tested-by.  Also I've
noticed that you've pushed a few patches [1][2][3][4] without
Reviewed-by tag.  Please stop.

[1] d2cd2c69b20fcb3f1fc3b7671745c5c84ef200cb
[2] 9ef5b7a23348291893a6bf61fcce7a306e787add
[3] aa46fba7e61a77bb3b029c7a483b5a2a2a73ff4d
[4] be3622dce383cb930a233b88bb056adb026dce1f

>
> On Wed, Aug 5, 2015 at 5:21 AM, Jan Vesely <jan.vesely at rutgers.edu> wrote:
>> On Tue, 2015-08-04 at 22:40 +0200, Zoltan Gilian wrote:
>>> There is no MDOperand in llvm 3.5.
>>
>> thanks, this fixes the build for me.
>>
>> jan
>>
>>> ---
>>>  src/gallium/state_trackers/clover/llvm/invocation.cpp | 19 ++++++++++---------
>>>  1 file changed, 10 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
>>> index 50c4557..cc2c421 100644
>>> --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
>>> +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
>>> @@ -371,12 +371,13 @@ namespace {
>>>        return kernel_node;
>>>     }
>>>
>>> -   llvm::MDNode*
>>> -   node_from_op_checked(const llvm::MDOperand &md_operand,
>>> -                        llvm::StringRef expect_name,
>>> -                        unsigned expect_num_args)
>>> +   const llvm::MDNode *
>>> +   get_operand_checked(const llvm::MDNode *parent,
>>> +                       const unsigned op_idx,
>>> +                       const llvm::StringRef expect_name,
>>> +                       const unsigned expect_num_args)
>>>     {
>>> -      auto node = llvm::cast<llvm::MDNode>(md_operand);
>>> +      auto node = llvm::cast<llvm::MDNode>(parent->getOperand(op_idx));
>>>        assert(node->getNumOperands() == expect_num_args &&
>>>               "Wrong number of operands.");
>>>
>>> @@ -399,10 +400,10 @@ namespace {
>>>        auto num_args = kernel_func->getArgumentList().size();
>>>
>>>        auto kernel_node = get_kernel_metadata(kernel_func);
>>> -      auto aq = node_from_op_checked(kernel_node->getOperand(2),
>>> -                                     "kernel_arg_access_qual", num_args + 1);
>>> -      auto ty = node_from_op_checked(kernel_node->getOperand(3),
>>> -                                     "kernel_arg_type", num_args + 1);
>>> +      auto aq = get_operand_checked(kernel_node, 2, "kernel_arg_access_qual",
>>> +                                    num_args + 1);
>>> +      auto ty = get_operand_checked(kernel_node, 3, "kernel_arg_type",
>>> +                                    num_args + 1);
>>>
>>>        std::vector<kernel_arg_md> res;
>>>        res.reserve(num_args);
>>
>>
>> --
>> Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150805/c00b1857/attachment-0001.sig>


More information about the mesa-dev mailing list