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

Krzysztof Parzyszek via llvm-dev llvm-dev at lists.llvm.org
Fri Jan 15 05:29:20 PST 2016


Resending to include the mailing list.

On 1/14/2016 7:33 PM, Phil Tomson wrote:
 >
 > I'm guessing these would be Pseudo Instr nodes?

No, they won't be instructions at all, just SDNodes.


 > Initially I had this:
 >
 > def SDT_XSTGADDR_NORMAL     : SDTypeProfile<0, 1, [SDTCisInt<0>]>;

The type should be "address in, address out", i.e. 1 result and 1 argument:
def SDT_XSTGADDR_NORMAL : SDTypeProfile<1, 1, [SDTCisInt<0>, 
SDTCisSameAs<0, 1>]>;


 > def XSTGADDR_NORMAL         : SDNode<"XSTGISD::ADDR_NORMAL",
 > SDT_XSTGADDR_NORMAL>;

This is pretty much it.  The XSTGADDR_NORMAL is what "addr_normal" was 
meant to be.  Now you can use XSTGADDR_NORMAL in patterns for loads and 
stores.


-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