diff options
author | Michael Kruse <llvm@meinersbur.de> | 2017-02-23 17:57:27 +0000 |
---|---|---|
committer | Michael Kruse <llvm@meinersbur.de> | 2017-02-23 17:57:27 +0000 |
commit | f4e201e09f4fe51db407571a2ed0642ff1894a7d (patch) | |
tree | c05367e2ef88024cc4ba75fd86ac627069221bd2 /llvm/lib/Transforms/IPO/SampleProfile.cpp | |
parent | 2cfc7a48de3d342e8f4dd8bc555ed44f6a0d87a7 (diff) | |
download | bcm5719-llvm-f4e201e09f4fe51db407571a2ed0642ff1894a7d.tar.gz bcm5719-llvm-f4e201e09f4fe51db407571a2ed0642ff1894a7d.zip |
[Support] Remove NonowningIslPtr. NFC.
NonowningIslPtr<isl_X> was used as types of function parameters when the
function does not consume the isl object, i.e. an __isl_keep parameter.
The alternatives are:
1. IslPtr<isl_X>
This has additional calls to isl_X_copy and isl_X_free to
increase/decrease the reference counter even though not needed. The
caller already owns a reference to the isl object.
2. const IslPtr<isl_X>&
This does not change the reference counter, but requires an
additional load to get the pointer to the isl object (instead of just
passing the pointer itself).
Moreover, the compiler cannot rely on the constness of the pointer
and has to reload the pointer every time it writes to memory (unless
alias analysis such as TBAA says it is not possible).
The isl C++ bindings currently in development do not have an equivalent
to NonowningIslPtr and adding one would make the binding more
complicated and its advantage in performance is small. In order to
simplify the transition to these C++ bindings, remove NonowningIslPtr.
Change every former use of it to alternative 2 mentioned aboce
(const IslPtr<isl_X>&).
llvm-svn: 295998
Diffstat (limited to 'llvm/lib/Transforms/IPO/SampleProfile.cpp')
0 files changed, 0 insertions, 0 deletions