Edmund Grimley-Evans
2010-Oct-05 13:26 UTC
[LLVMdev] custom lowering with multiple results
I may have found a solution to the problem. The attached patch seems to do what I was trying to do. It's a work-around, really. What I have done is split the READ_WORLD node (inputs: Chain; outputs: Flag, Chain) into two nodes: READ_WORLD1 (inputs: Chain; outputs, i32, Chain), and READ_WORLD2 (inputs: i32; outputs: Flag). The pair of nodes is matched by a single pattern in the .td file. Is it a known limitation that you can't have a single node that operates on both Chain and Flag? If not, perhaps it's a bug - something that has never been tested before because none of the current back ends do this. If nobody tells me it's a known limitation I'll probably try to write a cogent summary and file a bug report. -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: read_world.patch Type: text/x-patch Size: 5878 bytes Desc: read_world.patch URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101005/d86166b8/attachment.bin>
Hello Edmund,> Is it a known limitation that you can't have a single node that > operates on both Chain and Flag?There are alot of examples of nodes with both chain and flag. You can easily find them in .td files. As an example - ordinary call is of such form. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University