[PATCH] D35731: [Polly] Introduce isl_conv:: isl++ classes that automatically convert to old C classes

Tobias Grosser via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 21 12:59:17 PDT 2017


grosser created this revision.
grosser added a project: Polly.
Herald added subscribers: kbarton, nemanjai.

... and use these classes to port the ScopInfo.h interface to C++. This allows
us to return C++ objects everywhere in the interface, without having to convert
all C users at a time. As a result, new code can use C++ without the need for
std::give (or the new std::manage) calls all over the place, while old code
still works.

The isl++ interface on purpose does not allow for conversions back to isl C
types as there is a risk that automatic conversions might cause difficult to
detect memory leaks. The isl_conv:: classes allow such conversions, but are
expected to only be used at interface boundaries to avoid the need of isl++
conversion functions all over the place. After we moved to the C++ interface,
this conversion layer is expected to be removed again.

To make this patch compile, we have to remove some "auto" declarations and
replace them with specific types. This is a good direction anyhow, as LLVM's
coding style suggests to not use auto besides in obvious situations.


https://reviews.llvm.org/D35731

Files:
  include/polly/ScopInfo.h
  lib/Analysis/DependenceInfo.cpp
  lib/Analysis/PolyhedralInfo.cpp
  lib/Analysis/ScopInfo.cpp
  lib/CodeGen/BlockGenerators.cpp
  lib/CodeGen/IslAst.cpp
  lib/CodeGen/IslNodeBuilder.cpp
  lib/CodeGen/PPCGCodeGeneration.cpp
  lib/Support/SCEVAffinator.cpp
  lib/Transform/ScheduleOptimizer.cpp
  lib/Transform/Simplify.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35731.107701.patch
Type: text/x-patch
Size: 38320 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170721/c872e24d/attachment.bin>


More information about the llvm-commits mailing list