Hi!
I noticed in the LegalizeDAG.cpp (SelectionDAGLegalize::LegalizeOp):
case ISD::INIT_TRAMPOLINE:
case ISD::FRAMEADDR:
case ISD::RETURNADDR:
// These operations lie about being legal: when they claim to be legal,
// they should actually be custom-lowered.
Action = TLI.getOperationAction(Node->getOpcode(),
Node->getValueType(0));
if (Action == TargetLowering::Legal)
Action = TargetLowering::Custom;
break;
What does this mean? Why does a target not request a node to be
custom lowered if such a thing is needed?
Also, I grepped for 'setOperationAction(ISD::TRAMPOLINE' and the
operation is 'Custom' in every instance. Should ISD::TRAMPOLINE be
removed from this case?
Thanks!
--
Sanjoy Das
http://playingwithpointers.com
Hi Sanjoy,> I noticed in the LegalizeDAG.cpp (SelectionDAGLegalize::LegalizeOp): > > case ISD::INIT_TRAMPOLINE: > case ISD::FRAMEADDR: > case ISD::RETURNADDR: > // These operations lie about being legal: when they claim to be legal, > // they should actually be custom-lowered. > Action = TLI.getOperationAction(Node->getOpcode(), > Node->getValueType(0)); > if (Action == TargetLowering::Legal) > Action = TargetLowering::Custom; > break; > > What does this mean? Why does a target not request a node to be > custom lowered if such a thing is needed?as far as I know all nodes are considered to be legal by default. Thus I guess the comment is confused: most likely some target forgot to declare them as custom, and someone hacked this in rather than fixing the target.> Also, I grepped for 'setOperationAction(ISD::TRAMPOLINE' and the > operation is 'Custom' in every instance. Should ISD::TRAMPOLINE be > removed from this case?Probably they should all be removed, and possibly some targets fixed to declare them as Custom. Ciao, Duncan.
Possibly Parallel Threads
- [LLVMdev] getConvertAction/setConvertAction
- [LLVMdev] getConvertAction/setConvertAction
- [LLVMdev] [PATCH] fix a "jump to case label crosses initialization of llvm::MVT::ValueType VT" error
- [LLVMdev] nested function's static link gets clobbered
- [LLVMdev] [RFC] Splitting init.trampoline into init.trampoline and adjust.trampoline