Hello, I'm wondering what is exactly the difference in translating/implementing the ''forall'' loop against "coforall" ?
Since in my experiment, if I use forall loop, either the intermediate llvm or c code output will have a "coforall_fn_chpl" function that contains the actual computation within the user code's forall body, but that function is wrongly mapped to the internal module source code; however, if I use coforall(nothing else changed), same coforall_fn_chpl will be generated(everything looks the same as before) and it will be correctly mapped back to the user code ! Now, you can find "coforall_fn_chpl" function in the user code module if you check the AST for user code, but before, you couldn't find that function in user's AST, even though it was there in the llvm bit code ! Any ideas ? Thanks On Thu, Oct 29, 2015 at 12:17 PM, Hui Zhang <[email protected]> wrote: > okay...thanks for the info ! > > I'll definitely let you know when I find out the bug. > > On Thu, Oct 29, 2015 at 12:09 PM, Brad Chamberlain <[email protected]> wrote: > >> >> Hi Hui -- >> >> Chiming in on this part: >> >> On Thu, 29 Oct 2015, Michael Ferguson wrote: >> >> The compiler generally uses a global variable for the file/line. >>> This variable is set with SET_LINENO and the file/line from it are >>> stored in each new AST node. >>> >>> If you have identified the AST node with the wrong line number, you >>> can get its id number (ast->id) and instruct the compiler to >>> call gdbShouldBreakHere when that id is created with --break-on-id. >>> It's possible that some code adding AST elements called >>> SET_LINENO with the wrong argument. >>> >> >> >> If you find the source of the AST creation that has the wrong >> filename/line#, please let us know. We're trying to shake out these cases >> over time as best we can, for obvious reasons. >> >> >> One other thing I'll mention is that oftentimes, an AST node that you're >> looking at in codegen has been copied a few times before getting there, so >> its creation point will be a copy of another AST node which also had the >> wrong filename/line#. So then I usually re-run with --break-on-id, chasing >> the copies upstream until I find the original creation point. >> >> -Brad >> >> > > > -- > Best regards > > > Hui Zhang > -- Best regards Hui Zhang
------------------------------------------------------------------------------
_______________________________________________ Chapel-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/chapel-developers
