[flang-commits] [PATCH] D156761: [flang][NFC] Delete unused runtime APIs

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Mon Jul 31 16:17:41 PDT 2023


klausler created this revision.
klausler added a reviewer: vzakhari.
klausler added a project: Flang.
Herald added subscribers: sunshaoce, jdoerfert.
Herald added a project: All.
klausler requested review of this revision.

Three APIs of the runtime support library are not used by lowering
and were never implemented.  Delete them from their header file.


https://reviews.llvm.org/D156761

Files:
  flang/include/flang/Runtime/support.h


Index: flang/include/flang/Runtime/support.h
===================================================================
--- flang/include/flang/Runtime/support.h
+++ flang/include/flang/Runtime/support.h
@@ -23,56 +23,6 @@
 // Predicate: is the storage described by a Descriptor contiguous in memory?
 bool RTNAME(IsContiguous)(const Descriptor &);
 
-/// Copy elements from \p source to a contiguous memory area denoted
-/// by \p destination. The caller must guarantee that the destination
-/// buffer is big enough to hold all elements from \p source, and also
-/// that its alignment satisfies the minimal alignment required
-/// for the elements of \p source. \p destByteSize is the size in bytes
-/// of the destination buffer, and is only used for checking for overflows
-/// of the buffer.
-/// The runtime implementation is optimized to make reads from \p source
-/// efficiently by identifying contiguity in the leading dimensions (if any).
-///
-/// The implementation assumes that \p source and \p destination elements'
-/// locations never overlap.
-void RTNAME(PackContiguous)(
-    void *destination, const Descriptor &source, std::size_t destByteSize);
-
-/// Copy element from contiguous memory area denoted by \p source into
-/// \p destination. The caller must guarantee that the source buffer
-/// contains enough elements to be copied into \p destination, and also
-/// that its alignment satisfies the minimal alignment required
-/// for the elements of \p destination. \p destByteSize is the size in bytes
-/// of the source buffer, and is only used for checking for overruns
-/// of the buffer.
-/// The runtime implementation is optimized to make writes into \p destination
-/// efficiently by identifying contiguity in the leading dimensions (if any).
-///
-/// The implementation assumes that \p source and \p destination elements'
-/// locations never overlap.
-void RTNAME(UnpackContiguous)(const Descriptor &destination, const void *source,
-    std::size_t sourceByteSize);
-
-/// If \p source specifies contiguous storage in memory, then
-/// the returned address matches source.base_addr, otherwise,
-/// if \p destination is not null, then the function copies
-/// all elements from \p source into the destination buffer
-/// and returns \p destination, otherwise, the function returns
-/// a pointer to newly allocated contiguous buffer containing
-/// all elements from \p source (e.g. copied with RTNAME(PackContiguous)).
-///
-/// If \p destination is not null, then the caller must guarantee
-/// that the destination buffer is big enough to hold all elements
-/// from \p source, and also that its alignment satisfies the minimal
-/// alignment required for the elements of \p source.
-/// \p destByteSize is the size in bytes of the destination buffer,
-/// and is only used for checking for overflows of the buffer.
-///
-/// \p shouldFree is set to 1, if the function allocates new memory,
-/// otherwise, it is set to 0.
-void *RTNAME(MakeContiguous)(void *destination, const Descriptor &source,
-    std::size_t destByteSize, std::uint8_t *shouldFree);
-
 } // extern "C"
 } // namespace Fortran::runtime
 #endif // FORTRAN_RUNTIME_SUPPORT_H_


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156761.545857.patch
Type: text/x-patch
Size: 3181 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230731/f08a60b9/attachment-0001.bin>


More information about the flang-commits mailing list