[PATCH] D115672: Teach the backend to make references to swift_async_extendedFramePointerFlags weak if it emits it

Tim Northover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 15 07:09:11 PST 2021


t.p.northover accepted this revision.
t.p.northover added a comment.
This revision is now accepted and ready to land.

Some minor issues, but other than that I think it looks OK.



================
Comment at: llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp:1142
+    for (auto &opd : MI->operands()) {
+      if (opd.getType() == MachineOperand::MO_ExternalSymbol) {
+        if (StringRef(opd.getSymbolName())
----------------
`Opd.isSymbol()` is probably better.


================
Comment at: llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp:1143-1144
+      if (opd.getType() == MachineOperand::MO_ExternalSymbol) {
+        if (StringRef(opd.getSymbolName())
+                .equals("swift_async_extendedFramePointerFlags")) {
+          ShouldEmitWeakSwiftAsyncExtendedFramePointerFlags = true;
----------------
Does `==` not work here? I thought we had enough overrides that once you had one `StringRef` you were set.


================
Comment at: llvm/lib/Target/X86/X86MCInstLower.cpp:2414
+  if (MI->getOpcode() == X86::OR64rm) {
+    for (auto &opd : MI->operands()) {
+      if (opd.getType() == MachineOperand::MO_ExternalSymbol) {
----------------
Minor issue, LLVM coding style has local variables starting with an upper-case letter.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115672



More information about the llvm-commits mailing list