[PATCH] Convert some signatures of SelectionDAG::getNode() to use ArrayRef instead of Ops/NumOps

Reid Kleckner rnk at google.com
Fri Apr 18 12:46:06 PDT 2014


Oh, got it.  It's hard to tell from the diff context.


On Fri, Apr 18, 2014 at 12:02 PM, Craig Topper <craig.topper at gmail.com>wrote:

> My intention was to drop them. The only ones that I intentionally left
> were cases where there was a C array that was being used in a weird way.
> For instance, there were several places where a possibly null SDValue was
> in the last entry and the size passed to getNode was then conditional on
> whether that was null.
>
> Do you see some in the patch that I missed?
>
>
> On Fri, Apr 18, 2014 at 11:39 AM, Reid Kleckner <rnk at google.com> wrote:
>
>> Cool!  I think you can drop a lot of explicit conversions of C arrays,
>> since ArrayRef has this ctor:
>>     template <size_t N>
>>     /*implicit*/ LLVM_CONSTEXPR ArrayRef(const T (&Arr)[N])
>>       : Data(Arr), Length(N) {}
>>
>> Right?  If not, what's breaking?
>>
>>
>> On Fri, Apr 18, 2014 at 9:01 AM, Craig Topper <craig.topper at gmail.com>wrote:
>>
>>> Several of the signatures of getNode take an SDValue* and a NumOps
>>> argument. This results in most callers having to explicitly call .size() or
>>> hardcoding the size of a statically sized array. This patch converts the
>>> methods to take an ArrayRef so this will now happen automatically. I
>>> explicitly created ArrayRefs for the cases where this wouldn't work or
>>> wasn't obvious to me that it would.
>>>
>>> Submitting to the list before I commit since this touches a many files
>>> and locations within them and I've already had to merge a couple times.
>>>
>>> --
>>> ~Craig
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>
>>>
>>
>
>
> --
> ~Craig
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140418/1b290dad/attachment.html>


More information about the llvm-commits mailing list