diff options
author | Matthias Braun <matze@braunis.de> | 2015-06-24 20:04:26 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2015-06-24 20:04:26 +0000 |
commit | da1b637c8d88b018331d418a0447abea32581ff9 (patch) | |
tree | 518dcf2413ca74a71366161c75842bc45e6b4e9b | |
parent | a7f3f03329b99b39bb4052ff26914a811a03208f (diff) | |
download | bcm5719-llvm-da1b637c8d88b018331d418a0447abea32581ff9.tar.gz bcm5719-llvm-da1b637c8d88b018331d418a0447abea32581ff9.zip |
Revert "(HEAD -> master, origin/master, origin/HEAD) opt: Add option to strip or add llvm value names"
Accidental commit
This reverts commit r240583.
llvm-svn: 240584
-rw-r--r-- | llvm/tools/opt/opt.cpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp index 197dc4c7fa9..55426e7b274 100644 --- a/llvm/tools/opt/opt.cpp +++ b/llvm/tools/opt/opt.cpp @@ -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(Triple TheTriple, StringRef CPUStr, 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(). |