[PATCH] D66795: [Mips] Use appropriate private label prefix based on Mips ABI

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 27 04:39:09 PDT 2019


arichardson added a comment.

In D66795#1646746 <https://reviews.llvm.org/D66795#1646746>, @mbrkusanin wrote:

> - adjustPrefixes() is not called after every call of createMCAsmInfo(), only where MCTargetOptions is available since this is what tells us if ABI is given as argument.
> - StringRef CPU could be removed from adjustPrefixes() since MipsABIInfo::computeTargetABI() does not use it in it's implementation and an empty string could be passed. We could remove Triple as well and use MCTargetOptions.ABIName only and read it manualy, but this way we would keep it consistent with other uses of MipsABIInfo.


We've also had some issues with the MIPS ABI not being available in the MC* classes for CHERI.
Would it be possible to require a `const MCTargetOptions &Options` when creating MCAsmInfo?
If MCTargetOptions isn't always available, how about passing an `Optional<MCTargetOptions>` to MCAsmInfo? That would be equivalent to the current approach but make it harder to forget calling `adjustPrefixes()`


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66795/new/

https://reviews.llvm.org/D66795





More information about the llvm-commits mailing list