Page MenuHomePhabricator

[Polly] [PPCGCodeGeneration] [NFC] [WIP] Add option to fail if a store to a scalar occursin a kernel.
AcceptedPublic

Authored by bollu on Jul 28 2017, 5:39 AM.

Details

Summary
  • Having such a store prevents us from running the kernel since the final value of

the scalar on running the kernel would be undefined.

  • Useful to have a flag that fails if this condition occurs.

Event Timeline

bollu created this revision.Jul 28 2017, 5:39 AM
bollu retitled this revision from [Polly] [PPCGCodeGeneration] [NFC] Add option to fail if a store to a scalar occurs in a kernel. to [Polly] [PPCGCodeGeneration] [NFC] [WIP] Add option to fail if a store to a scalar occursin a kernel..Jul 28 2017, 5:42 AM
bollu updated this revision to Diff 108637.Jul 28 2017, 6:00 AM
  • [NFC] style fixes
singam-sanjay added inline comments.Aug 22 2017, 6:31 AM
lib/CodeGen/PPCGCodeGeneration.cpp
2075

Would having if (FailOnStoredScalar) behind this if be more appropriate ? The stored scalar is an issue only if this condition evaluates to true, right ?

grosser added inline comments.Aug 22 2017, 6:40 AM
lib/CodeGen/PPCGCodeGeneration.cpp
2075

True. Sanjay is right here.

bollu added inline comments.Aug 22 2017, 6:40 AM
lib/CodeGen/PPCGCodeGeneration.cpp
2075

Yep, you're right, that does make more sense. I'll change it out.

grosser accepted this revision.Aug 22 2017, 6:42 AM

Otherwise, LGTM.

This revision is now accepted and ready to land.Aug 22 2017, 6:42 AM