[PATCH] D36331: Add ARC backend

Eugene Zelenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 4 13:06:29 PDT 2017


Eugene.Zelenko added a comment.

Please run Clang-tidy modernize checks over this code. Same for readability-container-size-empty, readability-redundant-control-flow, readability-redundant-member-init, readability-redundant-string-cstr, readability-redundant-string-init, readability-simplify-boolean-expr



================
Comment at: llvm/lib/Target/ARC/ARC.h:33
+
+#endif
----------------
Please add // LLVM_LIB_TARGET_ARC_ARC_H


================
Comment at: llvm/lib/Target/ARC/ARCBranchFinalize.cpp:40
+  static char ID;
+  ARCBranchFinalize() : MachineFunctionPass(ID), TII(0) {
+    initializeARCBranchFinalizePass(*PassRegistry::getPassRegistry());
----------------
Please use default member initialization and nullptr.


================
Comment at: llvm/lib/Target/ARC/ARCFrameLowering.cpp:101
+    bool allocate) const {
+
+  MachineFunction &MF = *MBB.getParent();
----------------
Unnecessary empty line.


================
Comment at: llvm/lib/Target/ARC/ARCFrameLowering.h:82
+
+#endif
----------------
Please add // LLVM_LIB_TARGET_ARC_ARCFRAMELOWERING_H


================
Comment at: llvm/lib/Target/ARC/ARCISelDAGToDAG.cpp:42
+class ARCDAGToDAGISel : public SelectionDAGISel {
+
+public:
----------------
Unnecessary empty line.


================
Comment at: llvm/lib/Target/ARC/ARCISelLowering.cpp:77
+    : TargetLowering(TM), TM(TM), Subtarget(Subtarget) {
+
+  // Set up the register classes.
----------------
Unnecessary empty line.


================
Comment at: llvm/lib/Target/ARC/ARCISelLowering.cpp:562
+  for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) {
+
+    CCValAssign &VA = ArgLocs[i];
----------------
Unnecessary empty line.


================
Comment at: llvm/lib/Target/ARC/ARCISelLowering.cpp:698
+                               const SDLoc &dl, SelectionDAG &DAG) const {
+
+  ARCFunctionInfo *AFI = DAG.getMachineFunction().getInfo<ARCFunctionInfo>();
----------------
Unnecessary empty line.


================
Comment at: llvm/lib/Target/ARC/ARCISelLowering.h:122
+
+#endif
----------------
Please add // LLVM_LIB_TARGET_ARC_ARCISELLOWERING_H


================
Comment at: llvm/lib/Target/ARC/ARCInstrInfo.h:38
+  /// always be able to get register info as well (through this method).
+  ///
+  const TargetRegisterInfo &getRegisterInfo() const { return RI; }
----------------
Unnecessary line.


================
Comment at: llvm/lib/Target/ARC/ARCInstrInfo.h:96
+
+#endif
----------------
Please add // LLVM_LIB_TARGET_ARC_ARCINSTRINFO_H


================
Comment at: llvm/lib/Target/ARC/ARCMCInstLower.h:13
+#define LLVM_LIB_TARGET_ARC_ARCMCINSTLOWER_H
+#include "llvm/CodeGen/MachineOperand.h"
+#include "llvm/Support/Compiler.h"
----------------
Please separate with empty line.


================
Comment at: llvm/lib/Target/ARC/ARCMCInstLower.h:42
+
+#endif
----------------
Please add // LLVM_LIB_TARGET_ARC_ARCMCINSTLOWER_H


================
Comment at: llvm/lib/Target/ARC/ARCMachineFunctionInfo.h:64
+
+#endif
----------------
Please add // LLVM_LIB_TARGET_ARC_ARCMACHINEFUNCTIONINFO_H


================
Comment at: llvm/lib/Target/ARC/ARCRegisterInfo.h:61
+
+#endif
----------------
Please add // LLVM_LIB_TARGET_ARC_ARCREGISTERINFO_H


================
Comment at: llvm/lib/Target/ARC/ARCSubtarget.cpp:31
+                           const std::string &FS, const TargetMachine &TM)
+    : ARCGenSubtargetInfo(TT, CPU, FS), InstrInfo(), FrameLowering(*this),
+      TLInfo(TM, *this) {}
----------------
InstrInfo() call is redundant.


================
Comment at: llvm/lib/Target/ARC/ARCSubtarget.h:66
+
+#endif
----------------
Please add // LLVM_LIB_TARGET_ARC_ARCSUBTARGET_H


================
Comment at: llvm/lib/Target/ARC/ARCTargetMachine.h:52
+
+#endif
----------------
Please add // LLVM_LIB_TARGET_ARC_ARCTARGETMACHINE_H


================
Comment at: llvm/lib/Target/ARC/ARCTargetStreamer.h:24
+
+#endif
----------------
Please add // LLVM_LIB_TARGET_ARC_ARCTARGETSTREAMER_H


================
Comment at: llvm/lib/Target/ARC/ARCTargetTransformInfo.h:56
+
+#endif
----------------
Please add // LLVM_LIB_TARGET_ARC_ARCTARGETTRANSFORMINFO_H


================
Comment at: llvm/lib/Target/ARC/InstPrinter/ARCInstPrinter.h:19
+#define LLVM_LIB_TARGET_ARC_INSTPRINTER_ARCINSTPRINTER_H
+#include "llvm/MC/MCInstPrinter.h"
+
----------------
Please separate with empty line.


================
Comment at: llvm/lib/Target/ARC/InstPrinter/ARCInstPrinter.h:47
+
+#endif
----------------
Please add // LLVM_LIB_TARGET_ARC_INSTPRINTER_ARCINSTPRINTER_H


================
Comment at: llvm/lib/Target/ARC/MCTargetDesc/ARCMCAsmInfo.h:32
+
+#endif
----------------
Please add // LLVM_LIB_TARGET_ARC_MCTARGETDESC_ARCMCASMINFO_H


================
Comment at: llvm/lib/Target/ARC/MCTargetDesc/ARCMCTargetDesc.cpp:74
+ARCTargetStreamer::ARCTargetStreamer(MCStreamer &S) : MCTargetStreamer(S) {}
+ARCTargetStreamer::~ARCTargetStreamer() {}
+
----------------
{} -> = default;


================
Comment at: llvm/lib/Target/ARC/MCTargetDesc/ARCMCTargetDesc.h:41
+
+#endif
----------------
Please add // LLVM_LIB_TARGET_ARC_MCTARGETDESC_ARCMCTARGETDESC_H


https://reviews.llvm.org/D36331





More information about the llvm-commits mailing list