[llvm-commits] [llvm] r96214 - /llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
Chris Lattner
clattner at apple.com
Mon Feb 15 11:13:57 PST 2010
On Feb 15, 2010, at 9:21 AM, Dan Gohman wrote:
>
> On Feb 14, 2010, at 11:11 PM, Chris Lattner wrote:
>
>> Author: lattner
>> Date: Mon Feb 15 01:11:34 2010
>> New Revision: 96214
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=96214&view=rev
>> Log:
>> give SDValue an operator->, allowing V->isTargetOpcode() and
>> many other natural things.
>
>
> I had been gradually moving everything away from using SDValues
> as if they were SDNodes. While it's convenient to ignore the
> distinction sometimes, it's really hard to follow when it does
> matter.
I'm ok with it if that is the direction you want to go, but it seems much more natural to treat SDValue as a "rich pointer". It seems much more natural to use V->getOpcode() than V.getOpcode() or V.getOperand() etc. The duplicated methods don't make a lot of sense to me (and yes, I'm to blame for the original poor design).
-Chris
More information about the llvm-commits
mailing list