Page MenuHomePhabricator

[Polly][Isl] Replacing isl method `to_str()` with `stringFromIslObj()`. NFC.

Authored by patacca on Jun 14 2021, 3:02 AM.



This is part of an effort to reduce the differences between the custom C++ bindings used right now by polly in lib/External/isl/include/isl/isl-noxceptions.h and the official isl C++ interface.

Changes made:

  • Removing method to_str() from all the classes in the isl C++ bindings.
  • Overload method stringFromIslObj() so it accepts isl C++ objects.
  • To keep backward compatibility stringFromIslObj() now accepts a value that is returned if the isl C object is null or doesn't have a string representation (by default it's an empty string). In some cases it's better to have the string "null" instead of an empty string.
  • isl-noexceptions.h has been generated by this

Diff Detail

Event Timeline

patacca created this revision.Jun 14 2021, 3:02 AM
patacca published this revision for review.Jun 14 2021, 3:13 AM
patacca retitled this revision from [Polly][Isl] Replacing isl method `to_str()` with `stringFromIslObj()` to [Polly][Isl] Replacing isl method `to_str()` with `stringFromIslObj()`. NFC..
patacca edited the summary of this revision. (Show Details)
patacca added a reviewer: Meinersbur.
patacca added a project: Restricted Project.
Herald added a project: Restricted Project. · View Herald TranscriptJun 14 2021, 3:13 AM
Meinersbur accepted this revision.Jun 14 2021, 8:21 AM

LGTM with one nitpick.

If the forward-declaration is indeed needed for some reason I did not see, commit with it.


Why forward declaring something that is defined on the next line?


That was one way to make things complicated ;-)

This revision is now accepted and ready to land.Jun 14 2021, 8:21 AM
patacca updated this revision to Diff 351923.EditedJun 14 2021, 10:45 AM

Removing useless function declaration.

patacca updated this revision to Diff 351924.Jun 14 2021, 10:45 AM

Rebase to main

This revision was landed with ongoing or failed builds.Jun 15 2021, 5:22 AM
This revision was automatically updated to reflect the committed changes.