[all-commits] [llvm/llvm-project] 688528: [Support] Do not use `llvm::size` in `getLoopPrehe...
Ben Barham via All-commits
all-commits at lists.llvm.org
Sat Jun 8 00:32:57 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 68852812ff00d915bc96816a1454eb7d25cb0cb5
https://github.com/llvm/llvm-project/commit/68852812ff00d915bc96816a1454eb7d25cb0cb5
Author: Ben Barham <ben_barham at apple.com>
Date: 2024-06-08 (Sat, 08 Jun 2024)
Changed paths:
M llvm/include/llvm/Support/GenericLoopInfoImpl.h
Log Message:
-----------
[Support] Do not use `llvm::size` in `getLoopPreheader` (#94540)
`BlockT *LoopBase<BlockT, LoopT>::getLoopPreheader()` was changed in
7243607867393a2b8ccd477e95e6f62d00f3206f to use `llvm::size` rather than
the checking that `child_begin() + 1 == child_end()`. `llvm::size`
requires that `std::distance` be O(1) and hence that clients support
random access. Use `llvm::hasSingleElement` instead.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list