This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] moving inbound check for slice driven loop into before block of the WhileOp
ClosedPublic

Authored by Peiming on Jun 8 2023, 12:32 PM.

Details

Summary

This patch changes the while loop generated for iterating over a fully reduced sparse level with affine index expression.
Before:

cont = true
while (cont) {
  if (inBound()) {
    ....
    cont = true;
  } else {
    cont = false;
  }
}

After:

while(inBound()) {
  ....
}

Diff Detail

Event Timeline

Peiming created this revision.Jun 8 2023, 12:32 PM
Herald added a project: Restricted Project. · View Herald Transcript
Peiming requested review of this revision.Jun 8 2023, 12:32 PM
Peiming planned changes to this revision.Jun 8 2023, 12:37 PM
Peiming requested review of this revision.Jun 8 2023, 12:41 PM
K-Wu accepted this revision.Jun 8 2023, 2:24 PM
This revision is now accepted and ready to land.Jun 8 2023, 2:24 PM
Peiming updated this revision to Diff 530003.Jun 9 2023, 10:02 AM

update comments

This revision was landed with ongoing or failed builds.Jun 9 2023, 10:03 AM
This revision was automatically updated to reflect the committed changes.