Depends on https://reviews.llvm.org/D55216.
https://reviews.llvm.org/D55216 implemented reducing function attributes
in bugpoint. However, these attributes are only reduced down to a single
element, so even in the case where function attributes were irrelevant
to the crash being reduced, there would still be one arbitrary attribute
left after the program had been reduced. For example, take the following
program, tested with the bugpoint-crashcalls pass:
define i32 @bar() #0 { ret i32 12 } define i32 @foo() #0 { %1 = call i32 @bar() ret i32 %1 } attributes #0 = { "one" "two" "three" }
This program would be "reduced" to having just one attribute:
define i32 @bar() #0 { ret i32 12 } define i32 @foo() #0 { %1 = call i32 @bar() ret i32 %1 } attributes #0 = { "two" }
However, clearly the attribute is irrelevant, and so a fully reduced
program would have no attributes.
Implememting reduction to zero attributes required changing ListReducer.
It now takes a "reduction limit" parameter in its initializer. When
given a limit of zero, it attempts to reduce down to zero attributes.
This results in a fully reduced program such as the one below (and such
as is tested in this commit's tests):
define i32 @bar() { ret i32 12 } define i32 @foo() { %1 = call i32 @bar() ret i32 %1 }