[llvm] r240584 - Revert "(HEAD -> master, origin/master, origin/HEAD) opt: Add option to strip or add llvm value names"

Matthias Braun matze at braunis.de
Wed Jun 24 13:04:26 PDT 2015


Author: matze
Date: Wed Jun 24 15:04:26 2015
New Revision: 240584

URL: http://llvm.org/viewvc/llvm-project?rev=240584&view=rev
Log:
Revert "(HEAD -> master, origin/master, origin/HEAD) opt: Add option to strip or add llvm value names"

Accidental commit

This reverts commit r240583.

Modified:
    llvm/trunk/tools/opt/opt.cpp

Modified: llvm/trunk/tools/opt/opt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/opt.cpp?rev=240584&r1=240583&r2=240584&view=diff
==============================================================================
--- llvm/trunk/tools/opt/opt.cpp (original)
+++ llvm/trunk/tools/opt/opt.cpp Wed Jun 24 15:04:26 2015
@@ -105,12 +105,6 @@ StripDebug("strip-debug",
            cl::desc("Strip debugger symbol info from translation unit"));
 
 static cl::opt<bool>
-StripValueNames("strip-value-names", cl::desc("Remove llvm value names"));
-
-static cl::opt<bool>
-NameValues("name-values", cl::desc("Give anonymous llvm values a name"));
-
-static cl::opt<bool>
 DisableInline("disable-inlining", cl::desc("Do not run the inliner pass"));
 
 static cl::opt<bool>
@@ -287,37 +281,6 @@ static TargetMachine* GetTargetMachine(T
                                         GetCodeGenOptLevel());
 }
 
-static void removeValueNames(Module &Mod) {
-  for (Function &F : Mod) {
-    for (BasicBlock &BB : F) {
-      BB.setName("");
-      for (Instruction &I : BB)
-        I.setName("");
-    }
-  }
-}
-
-static void nameValuesInFunction(Function &F) {
-  bool FirstBB = true;
-  for (BasicBlock &BB : F) {
-    if (!BB.hasName())
-      BB.setName(FirstBB ? "entry" : "BB");
-    FirstBB = false;
-
-    for (Instruction &I : BB) {
-      if (I.getType()->isVoidTy())
-        continue;
-      if (!I.hasName())
-        I.setName("v");
-    }
-  }
-}
-
-static void nameValues(Module &Mod) {
-  for (Function &F : Mod)
-    nameValuesInFunction(F);
-}
-
 #ifdef LINK_POLLY_INTO_TOOLS
 namespace polly {
 void initializePollyPasses(llvm::PassRegistry &Registry);
@@ -388,12 +351,6 @@ int main(int argc, char **argv) {
   if (StripDebug)
     StripDebugInfo(*M);
 
-  if (StripValueNames)
-    removeValueNames(*M);
-
-  if (NameValues)
-    nameValues(*M);
-
   // Immediately run the verifier to catch any problems before starting up the
   // pass pipelines.  Otherwise we can crash on broken code during
   // doInitialization().





More information about the llvm-commits mailing list