[PATCH] D132376: [BOLT][AArch64] Handle external references to the middle of Constant Islands
Denis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 23 15:35:30 PDT 2022
treapster added inline comments.
================
Comment at: bolt/lib/Core/BinaryContext.cpp:402
+
if (IslandIter != AddressToConstantIslandMap.end()) {
if (MCSymbol *IslandSym =
----------------
yota9 wrote:
> treapster wrote:
> > yota9 wrote:
> > > I assume we need to add extra check that we're still in bounds of the function. E.g. for the case when IslandIter was originally eq to AddressToConstantIslandMap.end() and we've decremented the iterator.
> > getOrCreateIslandAccess (which is called by getOrCreateProxyIslandAccess) returns nullptr if !isInConstantIsland(Address))
> Than it looks like "IslandIter == AddressToConstantIslandMap.begin()" check above is redundant too (it might be rewritten that iterator not equal to begin() before decrement and without else case). Although I don't might to have both your and mine checks for better code flow control, my IMHO that we need either check both edge cases here or none.
You're probably right, i'll change to
```
if (IslandIter != AddressToConstantIslandMap.begin())
--IslandIter;
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132376/new/
https://reviews.llvm.org/D132376
More information about the llvm-commits
mailing list