This is an archive of the discontinued LLVM Phabricator instance.

[Pipeliner] Incorrect loop carried dependence calculation
ClosedPublic

Authored by dantrushin on Apr 2 2019, 8:59 AM.

Details

Summary

SwingSchedulerDAG::isLoopCarriedDep performs incorrect dependence
calculations. In particular, it cannot properly handle negative
offsets like this:

%1 = PHI %0, %2
%x = LD [%1, -6]   // 32-bit load
...
ST %y, [%1, 2]      // 32-bit store
%2 = ADD %1, 4

and case of stride smaller than access size like this:

%1 = PHI %0, %2
%x = LD [%1, 0]        // 32-bit load
...
ST %y, [%1, 2]        // 32-bit store
%2 = ADD %1, 2

Diff Detail

Event Timeline

dantrushin created this revision.Apr 2 2019, 8:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 2 2019, 8:59 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
bcahoon accepted this revision.Apr 9 2019, 12:57 PM

Thanks for the patch! I've been trying to create a test case, but haven't had much luck.

Thanks,,
Brendon

This revision is now accepted and ready to land.Apr 9 2019, 12:57 PM

I don't have commit access. Brendon, could you do it for me?

Thanks,
Denis

This revision was automatically updated to reflect the committed changes.