[llvm-commits] [llvm] r105552 - in /llvm/trunk: test/BugPoint/remove_arguments_test.ll tools/bugpoint/ExtractFunction.cpp
Dan Gohman
gohman at apple.com
Mon Jun 7 13:28:38 PDT 2010
Author: djg
Date: Mon Jun 7 15:28:37 2010
New Revision: 105552
URL: http://llvm.org/viewvc/llvm-project?rev=105552&view=rev
Log:
Run dead type elimination after dead argument elimination.
Modified:
llvm/trunk/test/BugPoint/remove_arguments_test.ll
llvm/trunk/tools/bugpoint/ExtractFunction.cpp
Modified: llvm/trunk/test/BugPoint/remove_arguments_test.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/BugPoint/remove_arguments_test.ll?rev=105552&r1=105551&r2=105552&view=diff
==============================================================================
--- llvm/trunk/test/BugPoint/remove_arguments_test.ll (original)
+++ llvm/trunk/test/BugPoint/remove_arguments_test.ll Mon Jun 7 15:28:37 2010
@@ -2,12 +2,16 @@
; RUN: llvm-dis remove_arguments_test.ll.tmp-reduced-simplified.bc -o - | FileCheck %s
; Test to make sure that arguments are removed from the function if they are
-; unnecessary.
+; unnecessary. And clean up any types that that frees up too.
+
+; CHECK: target triple
+; CHECK-NOT: struct.anon
+%struct.anon = type { i32 }
declare i32 @test2()
; CHECK: define void @test() {
-define i32 @test(i32 %A, i32 %B, float %C) {
+define i32 @test(i32 %A, %struct.anon* %B, float %C) {
call i32 @test2()
ret i32 %1
}
Modified: llvm/trunk/tools/bugpoint/ExtractFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/ExtractFunction.cpp?rev=105552&r1=105551&r2=105552&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint/ExtractFunction.cpp (original)
+++ llvm/trunk/tools/bugpoint/ExtractFunction.cpp Mon Jun 7 15:28:37 2010
@@ -116,13 +116,14 @@
std::vector<const PassInfo*> CleanupPasses;
CleanupPasses.push_back(getPI(createGlobalDCEPass()));
- CleanupPasses.push_back(getPI(createDeadTypeEliminationPass()));
if (MayModifySemantics)
CleanupPasses.push_back(getPI(createDeadArgHackingPass()));
else
CleanupPasses.push_back(getPI(createDeadArgEliminationPass()));
+ CleanupPasses.push_back(getPI(createDeadTypeEliminationPass()));
+
Module *New = runPassesOn(M, CleanupPasses);
if (New == 0) {
errs() << "Final cleanups failed. Sorry. :( Please report a bug!\n";
More information about the llvm-commits
mailing list