[PATCH] D83885: [Propeller]: Use a descriptive temporary symbol name for the end of the basic block.
Rahman Lavaee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 4 23:43:01 PDT 2020
rahmanl added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:479
+ /// Returns the MCSymbol marking the end of this basic block.
+ MCSymbol *getEndSymbol() const;
+
----------------
MaskRay wrote:
> rahmanl wrote:
> > shenhan wrote:
> > > If all usage of getEndSymbol() accept a const version of "MCSymbol *", maybe change it to "const MCSymbol *" that goes along with the const nature of the function.
> > Unfortunately, that's not the case. MCObjectStreamer::emitLabel takes a non-const reference to a symbol (and actually mutates the symbol).
> If you delete`const` from getEndSymbol() , can you delete the `mutable` specifier on CachedEndMCSymbol?
That's possible. The current pattern is borrowed from MachineBasicBlock::getSymbol() and how it interacts with MachineBasicBlock::CachedMCSymbol*, which are respectively declared const and mutable. WDYT?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83885/new/
https://reviews.llvm.org/D83885
More information about the llvm-commits
mailing list