[PATCH] D35701: Break up Targets.cpp into a header/impl pair per target type[NFCI]

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 21 14:09:12 PDT 2017


craig.topper added a comment.

Please recheck all the cpp file headers. Many of them aren't 80 columns and they should probably mention the target the way the header comments do. Right now it looks like a copy and paste from Targets.cpp with only the file name changed.

Clang format seems to have been really inconsistent about whether the closing curly brace for a static array is on a line by itself or the end of the previous line.



================
Comment at: lib/Basic/Targets/AMDGPU.cpp:1
+//===--- AMDGPU.cpp - Implement target feature support -------------------===//
+//
----------------
I think this line is short.


================
Comment at: lib/Basic/Targets/AMDGPU.cpp:144
+  "m0", "flat_scratch", "exec_lo", "exec_hi", "vcc_lo", "vcc_hi", 
+  "flat_scratch_lo", "flat_scratch_hi"};
+
----------------
Closing curly on separate line.


================
Comment at: lib/Basic/Targets/ARM.cpp:1
+//===--- ARM.cpp - Implement target feature support -------------------===//
+//
----------------
Short


================
Comment at: lib/Basic/Targets/ARM.cpp:54
+    "q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7", "q8", "q9", "q10", "q11",
+    "q12", "q13", "q14", "q15"};
+
----------------
Place losing curly on separate line


================
Comment at: lib/Basic/Targets/AVR.h:78
+        "r10", "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18", "r19",
+        "r20", "r21", "r22", "r23", "r24", "r25", "X",   "Y",   "Z",   "SP"};
+    return llvm::makeArrayRef(GCCRegNames);
----------------
Closing curly on separate line


================
Comment at: lib/Basic/Targets/BPF.cpp:1
+//===--- BPF.cpp - Implement target feature support -------------------===//
+//
----------------
Line is short and description should match the header.


================
Comment at: lib/Basic/Targets/Hexagon.cpp:112
+    "r27", "r28", "r29", "r30", "r31", "p0",  "p1",  "p2",  "p3",
+    "sa0", "lc0", "sa1", "lc1", "m0",  "m1",  "usr", "ugp"};
+
----------------
Closing curly on separate line.


================
Comment at: lib/Basic/Targets/MSP430.cpp:22
+    "r0", "r1", "r2",  "r3",  "r4",  "r5",  "r6",  "r7",
+    "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"};
+
----------------
Closing curly on separate line


================
Comment at: lib/Basic/Targets/Mips.cpp:1
+//===--- Mips.cpp - Implement target feature support -------------------===//
+//
----------------
This line looks short of 80 columns.


================
Comment at: lib/Basic/Targets/Mips.h:218
+        "$msair", "$msacsr", "$msaaccess", "$msasave", "$msamodify",
+        "$msarequest", "$msamap", "$msaunmap"};
+    return llvm::makeArrayRef(GCCRegNames);
----------------
Closing curly on separate line


================
Comment at: lib/Basic/Targets/Mips.h:363
+        {{"gp"}, "$28"}, {{"sp", "$sp"}, "$29"}, {{"fp", "$fp"}, "$30"},
+        {{"ra"}, "$31"}};
+    static const TargetInfo::GCCRegAlias NewABIRegAliases[] = {
----------------
Closing curly


================
Comment at: lib/Basic/Targets/Mips.h:375
+        {{"gp"}, "$28"}, {{"sp", "$sp"}, "$29"}, {{"fp", "$fp"}, "$30"},
+        {{"ra"}, "$31"}};
+    if (ABI == "o32")
----------------
Closing curly


================
Comment at: lib/Basic/Targets/NVPTX.cpp:1
+//===--- NVPTX.cpp - Implement target feature support -------------------===//
+//
----------------
Short of 80 columns


================
Comment at: lib/Basic/Targets/Nios2.cpp:1
+//===--- Nios2.cpp - Implement target feature support -------------------===//
+//
----------------
Line is short and should probably match the header description.


================
Comment at: lib/Basic/Targets/Nios2.h:104
+        "ctl0", "ctl1", "ctl2", "ctl3", "ctl4", "ctl5", "ctl6", "ctl7", "ctl8",
+        "ctl9", "ctl10", "ctl11", "ctl12", "ctl13", "ctl14", "ctl15"};
+    return llvm::makeArrayRef(GCCRegNames);
----------------
Closing curly


================
Comment at: lib/Basic/Targets/PNaCl.cpp:1
+//===--- PNaCl.cpp - Implement target feature support -------------------===//
+//
----------------
Short and probably the wrong description.


================
Comment at: lib/Basic/Targets/PPC.cpp:449
+    "v22", "v23",    "v24",  "v25",     "v26",     "v27", "v28", "v29", "v30",
+    "v31", "vrsave", "vscr", "spe_acc", "spefscr", "sfp"};
+
----------------
Closing curly


================
Comment at: lib/Basic/Targets/Sparc.cpp:1
+//===--- Sparc.cpp - Implement target feature support -------------------===//
+//
----------------
Line is short


================
Comment at: lib/Basic/Targets/Sparc.cpp:25
+    "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18", "r19", "r20", "r21",
+    "r22", "r23", "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31"};
+
----------------
Closing curly


================
Comment at: lib/Basic/Targets/SystemZ.cpp:35
+    "r11", "r12", "r13", "r14", "r15", "f0",  "f2", "f4",  "f6",  "f1", "f3",
+    "f5",  "f7",  "f8",  "f10", "f12", "f14", "f9", "f11", "f13", "f15"};
+
----------------
Closing curly


================
Comment at: lib/Basic/Targets/TCE.cpp:1
+//===--- TCE.cpp - Implement target feature support -------------------===//
+//
----------------
Line is short


================
Comment at: lib/Basic/Targets/XCore.cpp:1
+//===--- XCore.cpp - Implement target feature support -------------------===//
+//
----------------
Line is short


https://reviews.llvm.org/D35701





More information about the cfe-commits mailing list