[PATCH] D83885: [Propeller]: Use a descriptive temporary symbol name for the end of the basic block.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 4 23:04:50 PDT 2020
MaskRay added a comment.
.Ltmp -> .LBB_END is a good idea. The assembly is more readable. There is no space hit because `.L` symbols are usually not emitted into the symbol table.
================
Comment at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:479
+ /// Returns the MCSymbol marking the end of this basic block.
+ MCSymbol *getEndSymbol() const;
+
----------------
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?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83885/new/
https://reviews.llvm.org/D83885
More information about the llvm-commits
mailing list