This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Add reverse iterator support for BasicBlocks in llvm::Function
Needs ReviewPublic

Authored by getianao on May 12 2023, 7:32 AM.

Details

Summary

In commit D140162, public access to BasicBlocks in llvm::Function was removed, including access to getBasicBlockList(). This revision aims to add reverse iterator support for BasicBlocks in llvm::Function to make it easier for developers to work with LLVM functions.

Diff Detail

Event Timeline

getianao created this revision.May 12 2023, 7:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 12 2023, 7:32 AM
getianao requested review of this revision.May 12 2023, 7:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 12 2023, 7:32 AM

what about reverse(F)?

what about reverse(F)?

These methods might not be very useful, but having them for completeness won't hurt, I guess?

llvm/include/llvm/IR/Function.h
775

Please try to keep existing formatting.

+1 to reverse(F).

getianao updated this revision to Diff 521857.May 12 2023, 6:44 PM

Fix format

getianao marked an inline comment as done.May 12 2023, 6:45 PM