Hi guys, I am working on an intrinsic function, which will write to a pointer argument. So I am lowering it and think I need to catch it in lowerINTRINSIC_W_CHAIN, but somehow it always fall into INTRINSIC_WO_CHAIN category. I put [IntrReadwriteArgMem] into my Intrinsic class definition, it did not help. tried put [SDNPHasChain] into intrinsic class definition, cause errors” Element type mismatch for list”. wondering how to flag it to INTRINSIC_W_CHAIN? best Kevin
On 7/18/2014 2:00 PM, kewuzhang wrote:> > I am working on an intrinsic function, which will write to a pointer argument. > So I am lowering it and think I need to catch it in lowerINTRINSIC_W_CHAIN, but somehow it always fall into INTRINSIC_WO_CHAIN category. > > I put [IntrReadwriteArgMem] into my Intrinsic class definition, it did not help. > tried put [SDNPHasChain] into intrinsic class definition, cause errors” Element type mismatch for list”. > > wondering how to flag it to INTRINSIC_W_CHAIN?Does it have chain in the initial DAG? -Krzysztof -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
----- Original Message -----> From: "kewuzhang" <kewu.zhang at amd.com> > To: llvmdev at cs.uiuc.edu > Sent: Friday, July 18, 2014 2:00:07 PM > Subject: [LLVMdev] how to define INTRINSIC_W_CHAIN > > Hi guys, > > I am working on an intrinsic function, which will write to a pointer > argument. > So I am lowering it and think I need to catch it in > lowerINTRINSIC_W_CHAIN, but somehow it always fall into > INTRINSIC_WO_CHAIN category. > > I put [IntrReadwriteArgMem] into my Intrinsic class definition, it > did not help. > tried put [SDNPHasChain] into intrinsic class definition, cause > errors” Element type mismatch for list”. > > wondering how to flag it to INTRINSIC_W_CHAIN?Does your intrinsic return a value? If not, it will be a INTRINSIC_VOID (which also has a chain). -Hal> > best > > Kevin > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-- Hal Finkel Assistant Computational Scientist Leadership Computing Facility Argonne National Laboratory
en! my test is : %r1 = call<float> @test.adddiv( <float> %r0, <float>* %p0). since>> but somehow it always fall into INTRINSIC_WO_CHAIN category.(caught it in lowering..) I think it doesn’t have chain in initial DAG. unfortunately the intrinsic “test.adddiv” is defined by me for now. not sure how to make it has a chain. kevin On Jul 18, 2014, at 3:06 PM, Krzysztof Parzyszek <kparzysz at codeaurora.org> wrote:> On 7/18/2014 2:00 PM, kewuzhang wrote: >> >> I am working on an intrinsic function, which will write to a pointer argument. >> So I am lowering it and think I need to catch it in lowerINTRINSIC_W_CHAIN, but somehow it always fall into INTRINSIC_WO_CHAIN category. >> >> I put [IntrReadwriteArgMem] into my Intrinsic class definition, it did not help. >> tried put [SDNPHasChain] into intrinsic class definition, cause errors” Element type mismatch for list”. >> >> wondering how to flag it to INTRINSIC_W_CHAIN? > > > Does it have chain in the initial DAG? > > -Krzysztof > > > -- > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev