This is an archive of the discontinued LLVM Phabricator instance.

[Polly] Use Isl c++ for InvalidDomainMap
ClosedPublic

Authored by nandini12396 on Jul 12 2017, 8:13 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

nandini12396 created this revision.Jul 12 2017, 8:13 AM
maxf added a subscriber: maxf.Jul 12 2017, 10:14 AM
grosser edited edge metadata.Jul 12 2017, 11:49 AM

Hi Nandini,

thank you for working on this! If you get memory leaks, I suggest to try to try to reduce the size of the patch. Can you e.g. only translate the InvalidDomainMap? If this works, we can then gradually add more changes?

Hi Nandini,

thank you for working on this! If you get memory leaks, I suggest to try to try to reduce the size of the patch. Can you e.g. only translate the InvalidDomainMap? If this works, we can then gradually add more changes?

Sure. I will remove the unnecessary changes.

grosser requested changes to this revision.Jul 14 2017, 12:44 AM

Mark this as requesting changes to make sure this does not appear as "requiring review" just yet.

This revision now requires changes to proceed.Jul 14 2017, 12:44 AM
nandini12396 edited edge metadata.
nandini12396 retitled this revision from [Polly] [WIP] Use Isl c++ for domain derivation to [Polly] [WIP] Use Isl c++ for InvalidDomainMap.

Hi Nandini,

thanks for the update. The patch is almost perfect. Just two minor corrections needed. It seems we are lacking some good documentation of get(), copy(), and release(). I will write it down for you in a second. Meanwhile, can you update your patch and see if it is working with the proposed changes.

lib/Analysis/ScopInfo.cpp
2777 ↗(On Diff #106757)

Use copy() here.

2817 ↗(On Diff #106757)

Use copy() here.

Hello Sir,

thank you! It did work indeed!!

I understood the documentation from https://reviews.llvm.org/D30325#686684. From what I understood, get() is used to obtain a raw pointer that can be passed but that does not have to be consumed.

Right, now the InvalidDomain is indeed consumed. Which is why using get() is not right. Does this make sense? Is there something specific we can or should explain better?

lib/Analysis/ScopInfo.cpp
2783 ↗(On Diff #106757)

InvalidDomain is consumed here.

2785 ↗(On Diff #106757)

InvalidDomain is consumed here.

nandini12396 retitled this revision from [Polly] [WIP] Use Isl c++ for InvalidDomainMap to [Polly] Use Isl c++ for InvalidDomainMap.
nandini12396 edited the summary of this revision. (Show Details)

Addressed mistakes, as suggested by Tobias Sir.

This revision was automatically updated to reflect the committed changes.

Hi Nandini,

this works now. Thanks a lot! I committed the change for you!

There are two good directions to proceed:

  1. Take other (small) chunks of code and translate them to C++
  2. Copy/Import and Improve the C++ bindings documentation that you referenced here and add it into our SPINX documentation.

Hi Nandini,

this works now. Thanks a lot! I committed the change for you!

There are two good directions to proceed:

  1. Take other (small) chunks of code and translate them to C++
  2. Copy/Import and Improve the C++ bindings documentation that you referenced here and add it into our SPINX documentation.

Sure, thank you so much. I think I understood what I misunderstood.

OK, can you share (and maybe document) what you misunderstood? Others likely make similar mistakes, so it is good to have this documented and explained.

OK, can you share (and maybe document) what you misunderstood? Others likely make similar mistakes, so it is good to have this documented and explained.

Just that, get() is used to obtain a raw pointer that can be passed to but must not be consumed.

OK. Then we should highlight this in *bold* at an obvious place of our documentation.

OK. Then we should highlight this in *bold* at an obvious place of our documentation.

sure.