llvm.org GIT mirror llvm / b953974
Make bugpoint dead-argument-hacking actually work, and actually test it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105551 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 9 years ago
2 changed file(s) with 9 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
119119
120120 typedef SmallVector UseVector;
121121
122 protected:
123 // DAH uses this to specify a different ID.
124 explicit DAE(void *ID) : ModulePass(ID) {}
125
122126 public:
123127 static char ID; // Pass identification, replacement for typeid
124128 DAE() : ModulePass(&ID) {}
129
125130 bool runOnModule(Module &M);
126131
127132 virtual bool ShouldHackArguments() const { return false; }
154159 /// by bugpoint.
155160 struct DAH : public DAE {
156161 static char ID;
162 DAH() : DAE(&ID) {}
163
157164 virtual bool ShouldHackArguments() const { return true; }
158165 };
159166 }
0 ; RUN: bugpoint %s -output-prefix %t -bugpoint-crashcalls -silence-passes
1 ; RUN: llvm-dis remove_arguments_test.ll.tmp-reduced-simplified.bc -o - | FileCheck %s
12
23 ; Test to make sure that arguments are removed from the function if they are
34 ; unnecessary.
45
56 declare i32 @test2()
67
8 ; CHECK: define void @test() {
79 define i32 @test(i32 %A, i32 %B, float %C) {
810 call i32 @test2()
911 ret i32 %1