[llvm-dev] returning from LowerOperation()
Friedman, Eli via llvm-dev
llvm-dev at lists.llvm.org
Mon Jan 23 12:36:31 PST 2017
On 1/23/2017 5:21 AM, Jonas Paulsson wrote:
> Hi Eli,
> I would like to clarify generally what the difference is between
> returning SDValue() and Op (input argument unchanged) from
> My understanding is that returning SDValue() means that Target gives
> up, and the common code is supposed to handle it. Returning Op, the
> unchanged argument, means that the Target is happy with the node as it
> is, and the common code can move on to something else.
This is right.
> Are there any exceptions to this? Is this commented on anywhere? Are
> there cases where the target should not return SDValue()?
No exceptions to this. Not sure if it's described anywhere off the top
of my head; if there isn't a comment describing this on the declaration
of LowerOperation or LowerOperationWrapper, it would probably be good to
add one. Returning SDValue() should be "fine" in all cases (it might
lead to a fatal error if we can't actually lower the operation).
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
More information about the llvm-dev