mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 14:10:41 +00:00
[IR] Add LLVM_READONLY to BasicBlock::getTerminator.
I noticed that this function got called twice in compiled code to create succ_begin and succ_end iterators. Adding this directive helps the compiler share the call. Ideally we'd just make this method available for inlining since its quite simple, but the current header file arrangements don't allow that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292754 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f931f143cb
commit
112dbbc59b
@ -111,7 +111,7 @@ public:
|
||||
|
||||
/// \brief Returns the terminator instruction if the block is well formed or
|
||||
/// null if the block is not well formed.
|
||||
TerminatorInst *getTerminator();
|
||||
TerminatorInst *getTerminator() LLVM_READONLY;
|
||||
const TerminatorInst *getTerminator() const {
|
||||
return const_cast<BasicBlock *>(this)->getTerminator();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user