[PATCH] D66029: llvm-canon

Eugene Zelenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 9 16:42:56 PDT 2019


Eugene.Zelenko added inline comments.


================
Comment at: tools/llvm-canon/canonicalizer.cpp:1
+//===-- canonicalizer.cpp - Canonicalizer class -----------------*- C++ -*-===//
+//
----------------
*- C++ -* is not needed for .cpp files.


================
Comment at: tools/llvm-canon/canonicalizer.cpp:41
+    for (auto &F : M) {
+
+        nameFunctionArguments(F);
----------------
Please remove unnecessary empty line. Same below.


================
Comment at: tools/llvm-canon/canonicalizer.cpp:112
+void Canonicalizer::nameInstructions(SmallVector<Instruction *, 16> &Outputs) {
+
+    for (auto &I : Outputs) {
----------------
Please remove unnecessary empty line.


================
Comment at: tools/llvm-canon/canonicalizer.cpp:125
+    // Determine the type of instruction to name.
+
+    if (isInitialInstruction(I)) {
----------------
Please remove unnecessary empty line.


================
Comment at: tools/llvm-canon/canonicalizer.cpp:134
+    }
+
+}
----------------
Please remove unnecessary empty line.


================
Comment at: tools/llvm-canon/canonicalizer.cpp:172
+    });
+
+
----------------
Please remove unnecessary empty line.


================
Comment at: tools/llvm-canon/canonicalizer.cpp:251
+        }
+
+    }
----------------
Please remove unnecessary empty line.


================
Comment at: tools/llvm-canon/canonicalizer.cpp:264
+        });
+
+
----------------
Please remove unnecessary empty line.


================
Comment at: tools/llvm-canon/canonicalizer.cpp:271
+    Hash = hashing::detail::hash_16_bytes(Hash, I->getOpcode());
+
+
----------------
Please remove unnecessary empty line.


================
Comment at: tools/llvm-canon/canonicalizer.cpp:293
+
+
+    // Base instruction name.
----------------
Please remove unnecessary empty line.


================
Comment at: tools/llvm-canon/canonicalizer.cpp:328
+void Canonicalizer::foldInstructionName(Instruction *I) {
+
+    // If this flas is raised, fold all regular
----------------
Please remove unnecessary empty line.


================
Comment at: tools/llvm-canon/canonicalizer.cpp:332
+    if (!foldPreoutputs) {
+
+        // Don't fold if one of the users is an output instruction.
----------------
Please remove unnecessary empty line.


================
Comment at: tools/llvm-canon/canonicalizer.cpp:416
+    if (!Visited.count(Used)) {
+
+        Visited.insert(Used);
----------------
Please remove unnecessary empty line.


================
Comment at: tools/llvm-canon/canonicalizer.cpp:596
+
+}
+
----------------
Please add // namespace llvm


================
Comment at: tools/llvm-canon/canonicalizer.cpp:598
+
+
+
----------------
Please remove unnecessary empty lines.


================
Comment at: tools/llvm-canon/canonicalizer.h:44
+        : ModulePass(ID),
+        renameAll(false),
+        foldPreoutputs(false) {}
----------------
Please use default member initialization for this and next members.


================
Comment at: tools/llvm-canon/canonicalizer.h:99
+};
+}
+
----------------
Please add // namespace llvm


================
Comment at: tools/llvm-canon/canonicalizer.h:101
+
+#endif
----------------
Please add // LLVM_TOOLS_LLVM_CANON_CANONICALIZER_H


================
Comment at: tools/llvm-canon/llvm-canon.cpp:1
+//===-- llvm-canon.cpp - Canonicalizer ---------------------------*- C++ -*-===//
+//
----------------
C++ -* is not needed for .cpp files.


================
Comment at: tools/llvm-canon/llvm-canon.cpp:48
+
+
+int main(int argc, char **argv) {
----------------
Please remove unnecessary empty line.


================
Comment at: tools/llvm-canon/llvm-canon.cpp:81
+
+
+
----------------
Please remove unnecessary empty lines.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D66029





More information about the llvm-commits mailing list