[llvm-dev] Expanding a PseudoOp and accessing the DAG

Krzysztof Parzyszek via llvm-dev llvm-dev at lists.llvm.org
Fri Jan 15 13:10:21 PST 2016


On 1/15/2016 2:57 PM, Phil Tomson wrote:
>
>
> I see the following in my SelectCode (in XSTGGenDGISel.inc):
>
>
> /*2235*/        OPC_SwitchOpcode /*2 cases */, 27,
> TARGET_VAL(XSTGISD::ADDR_NORMAL),// ->2266
> /*2239*/          OPC_RecordChild0, // #1 = $addr
> /*2240*/          OPC_MoveChild, 0,
> /*2242*/          OPC_CheckOpcode, TARGET_VAL(ISD::TargetGlobalAddress),
> /*2245*/          OPC_MoveParent,
> /*2246*/          OPC_MoveParent,
> /*2247*/          OPC_CheckPredicate, 5, // Predicate_unindexedload
> /*2249*/          OPC_CheckPredicate, 6, // Predicate_load
> /*2251*/          OPC_CheckType, MVT::i64,
> /*2253*/          OPC_EmitMergeInputChains1_0,
> /*2254*/          OPC_EmitInteger, MVT::i64, 0,
> /*2257*/          OPC_MorphNodeTo, TARGET_VAL(XSTG::LOADI64_RI),
> 0|OPFL_Chain|OPFL_MemRefs,
>                        1/*#VTs*/, MVT::i64, 2/*#Ops*/, 1, 2,
>                    // Src: (ld:i64 (XSTGADDR_NORMAL:iPTR
> (tglobaladdr:iPTR):$addr))<<P:Predicate_unindexedload>><<P:Predicate_load>>
> - Complexity = 10
>                    // Dst: (LOADI64_RI:i64 (tglobaladdr:i64):$addr, 0:i64)
>
> Not sure why the initial Opcode index is being set to 0 instead of 2235?

That's where matching of ADDR_NORMAL begins.  Is the code matching 
ADDR_USE_GRP in the .inc file?

-Krzysztof


-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation


More information about the llvm-dev mailing list