[PATCH] D21960: [Sparc] Leon errata fixes passes.

Daniel Cederman via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 8 05:13:29 PDT 2016


dcederman added a subscriber: dcederman.

================
Comment at: lib/Target/Sparc/LeonFeatures.td:65-68
@@ +64,6 @@
+
+def PreventRoundChange
+    : SubtargetFeature<"prvntroundchange", "PreventRoundChange", "true",
+                       "LEON3 erratum fix: Prevent any rounding mode change "
+                       "request: use only the round-to-nearest rounding mode">;
+
----------------
As jacob_hansen commented, this should only be a warning. It is not a good idea to remove valid function calls without notifying the user.

================
Comment at: lib/Target/Sparc/LeonFeatures.td:81-85
@@ +80,7 @@
+
+def FlushCacheLineSWAP
+    : SubtargetFeature<"flshcachelineswap", "FlushCacheLineSWAP", "true",
+                       "LEON3 erratum fix: Flush cache line containing the "
+                       "lock before performing any of the atomic instructions "
+                       "SWAP and LDSTUB">;
+
----------------
Flushing the cache is not a valid workaround for this errata, so this feature is not needed and will only decrease performance.

================
Comment at: lib/Target/Sparc/LeonPasses.h:162
@@ +161,3 @@
+  const char *getPassName() const override {
+    return "InsertNOPLoad: Erratum Fix LBR35: insert a NOP instruction after "
+           "every single-cycle load instruction when the next instruction is "
----------------
LBR35 is not the official name of the errata or errata fix, it should be removed to avoid confusion.

================
Comment at: lib/Target/Sparc/Sparc.td:144
@@ -140,2 +143,3 @@
+                [ FeatureLeon, UMACSMACSupport, LeonCASA ]> {}
 
 //===----------------------------------------------------------------------===//
----------------
UMAC/SMAC is not available on ut699, gr712rc, or gr740.

================
Comment at: lib/Target/Sparc/SparcISelLowering.cpp:1417-1419
@@ +1416,5 @@
+  return AtomicExpansionKind::None;
+//  unsigned Size = LI->getType()->getPrimitiveSizeInBits();
+//  return (Size == 64) ? AtomicExpansionKind::LLOnly
+//                      : AtomicExpansionKind::None;
+}
----------------
This code has been commented out.

================
Comment at: lib/Target/Sparc/SparcISelLowering.cpp:3100
@@ -3096,3 +3099,3 @@
   switch (MI.getOpcode()) {
-  default: llvm_unreachable("Unknown SELECT_CC!");
+  default: llvm_unreachable("Unknown Custom Instruction!");
   case SP::SELECT_CC_Int_ICC:
----------------
This does not seem related to the errata fixes.


Repository:
  rL LLVM

http://reviews.llvm.org/D21960





More information about the llvm-commits mailing list