[llvm-dev] What kind of testcases should be required to test IPRA?
Mehdi Amini via llvm-dev
llvm-dev at lists.llvm.org
Wed Jun 1 21:55:55 PDT 2016
Hi,
I'd start with the most simple test I can imagine:
target triple = "x86_64-unknown-unknown"
define void @bar1() {
ret void
}
define preserve_allcc void @foo() #0 {
call void @bar1()
call void @bar2()
ret void
}
define void @bar2() {
ret void
}
attributes #0 = { nounwind }
It is designed such that the calling convention on foo are more conservative than the calling convention on bar1 and bar2. That way running it through llc should force foo to preserve all the registers that are not preserved by bar1 and bar2.
I'd run it two times through llc: the first one without ipra to check that the spill occurs, and the second one with ipra and checking that the spill does not occur.
There are two calls to bar1 and bar2, defined before and after foo, so that we verify the effect of the CGSCC scheduling.
--
Mehdi
> On Jun 1, 2016, at 9:32 PM, vivek pandya <vivekvpandya at gmail.com> wrote:
>
> Dear Mentors,
>
> I will be writing test cases for IPRA for lit infrastructure.
>
> Following 2 basic test cases I have identified :
>
> Program that does not have recursive function call.
> Program that does have recursive calls.
>
> Please suggest some other test cases or provide some hints.
>
> Sincerely,
> Vivek
More information about the llvm-dev
mailing list