On Thu, Sep 3, 2009 at 5:55 PM, David Greene<dag at cray.com> wrote:> On Thursday 03 September 2009 18:22, David Greene wrote: > >> > Since scheduling and selection is mostly within a block, hopefully it >> > wouldn't be too hard to come up with a testcase? >> >> Yep, I've got a much reduced testcase now (and converted from Fortran >> to C which makes things much easier to work with). I'm going to test >> against TOT and see if I see the same problem. > > TOT is bug-free. I'm about to try 2.5. > > My little testcase definitely has missing edges in the sched dag and sunit > dag. Where do edges from loads of globals to calls get added? That's what's > missing here.They should be there from the very beginning, when the selection dag is built. -Eli
On Thursday 03 September 2009 20:41, Eli Friedman wrote:> > My little testcase definitely has missing edges in the sched dag and > > sunit dag. Where do edges from loads of globals to calls get added? > > That's what's missing here. > > They should be there from the very beginning, when the selection dag is > built.Nope, not there. I've attached the dot output. The call of killcombine looks completely divorced from the load feeding the two extract_vector_elt nodes. Am I reading the graph correctly? Hmm...except there's a little dashed blue line from the call to the chain (I think) field of the load. Is that the dependence I want? I don't know how to read these graphs. Is the code that's supposed to do this in ScheduleDAGBuild.cpp? Thanks for your help. -Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: reset.builddag.ps Type: application/postscript Size: 40025 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090903/d233c1c3/attachment.ps>
On Thursday 03 September 2009 21:13, David Greene wrote:> Hmm...except there's a little dashed blue line from the call to the chain > (I think) field of the load. Is that the dependence I want? I don't know > how to read these graphs.Interesting. So with -view-legalize-dags, that little dashed blue line has moved from the load to the store that feeds the load. That's wrong. But it's still there with -view-legalize-types-dags, so legalize types must be buggy. But -disable-legalize-types doesn't fix the problem. So the general legalize code seems to have the same issue. LLVM 2.5 compiles this fine, so it's something we've altered in the codebase. I did a diff of all of our changes to lib/CodeGen and include/llvm/CodeGen but nothing jumpoed out as obviously wrong. I suppose it's possible we present slightly different code to the legalize passes than the unmodified LLVM. Fun times, indeed. -Dave