[PATCH] [mips] [IAS] Add support for the .insn directive.

Daniel Sanders daniel.sanders at imgtec.com
Wed Apr 8 08:49:53 PDT 2015


================
Comment at: lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp:39-40
@@ +38,4 @@
+    markLabelsAsMicroMips();
+  else
+    Labels.clear();
+}
----------------
tomatabacu wrote:
> dsanders wrote:
> > We should unconditionally clear Labels as the previous code did. We don't need to mark the same labels multiple times.
> Labels actually is unconditionally cleared: in markLabelsAsMicroMips() for the if and directly for the else.
Good point. For consistency, could you pull it out of markLabelsAsMicroMips() into the two callers or sink the isMicroMipsEnabled() checks inside the markLabelsAsMicroMips() as an early-exit? Both options make the usage consistent and neither is better than the other. If you choose the latter though, you ought to change the name accordingly since it won't touch the labels if micromips is not enabled.

================
Comment at: lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp:641-644
@@ +640,6 @@
+  // FIXME: Also mark labels when in MIPS16 mode.
+  if (isMicroMipsEnabled()) {
+    MipsELFStreamer &MEF = static_cast<MipsELFStreamer &>(Streamer);
+    MEF.markLabelsAsMicroMips();
+  }
+}
----------------
I've just noticed that the Labels.clear() is missing here.

http://reviews.llvm.org/D8006

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list