[PATCH] make reciprocal estimate code generation more flexible by adding command-line options

hfinkel at anl.gov hfinkel at anl.gov
Wed May 20 13:45:14 PDT 2015


================
Comment at: include/llvm/Target/TargetRecip.h:66
@@ +65,3 @@
+
+  bool ParseGlobalParams(const std::string &Arg);
+  void ParseIndividualParams(const std::vector<std::string> &Args);
----------------
function names should start with a lower-case letter.

================
Comment at: lib/Target/TargetRecip.cpp:49
@@ +48,3 @@
+
+static bool ParseRefinementStep(const StringRef &In, size_t &Position,
+                                uint8_t &Value) {
----------------
Function names start with a lower-case letter.

================
Comment at: lib/Target/TargetRecip.cpp:112
@@ +111,3 @@
+void TargetRecip::ParseIndividualParams(const std::vector<std::string> &Args) {
+  static const char DISABLED_PREFIX = '!';
+  unsigned NumArgs = Args.size();
----------------
DisabledPrefix (this is not a macro, don't name it like one)

================
Comment at: lib/Target/TargetRecip.cpp:132
@@ +131,3 @@
+
+    RecipIter Iter  = RecipMap.find(Val);
+    if (Iter == RecipMap.end()) {
----------------
Extra space?

================
Comment at: lib/Target/TargetRecip.cpp:136
@@ +135,3 @@
+      Iter = RecipMap.find(Val.str() + 'f');
+      if (Iter == RecipMap.end())
+        report_fatal_error("Invalid option for -recip.");
----------------
Please also try with the 'd' suffix.

http://reviews.llvm.org/D8982

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






More information about the llvm-commits mailing list