[LLVMdev] Lying about being expanded?

Sanjoy Das sanjoy at playingwithpointers.com
Sat Aug 20 23:31:35 PDT 2011


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



More information about the llvm-dev mailing list