[llvm-dev] What kind of testcases should be required to test IPRA?

vivek pandya via llvm-dev llvm-dev at lists.llvm.org
Sat Jun 4 19:56:46 PDT 2016

Hello Mehdi Amini,

Sorry for slow progress this week but it was due to interesting mistake of
mine. I had build llvm with ipra enable by default and that build files
were on my path ! Due to that next time I tried to build llvm it was
terribly slow  (almost 1 hour for 10% build ). I spend to much time on
fixing this by playing around with environment variables, cmake options etc.
But I think this is a serious concern, we need to think verify this time
complexity other wise building a large software with IPRA enable would be
very time consuming.

I studied tets case suggest by you on phabricator, for RegUsageInfo passes
I am thinking to print clobbered registers and verify that with FileCheck
as expected clobbered register for a particular test-case. Is this approach

I did not find function call to CostModelAnalysis::print() , Is opt
-analyze making that call ?
I am not able to find similar option in llc. I can't use info printed with
dbgs() function as release build do not add -debug-only option to llc

For the testcase sent by you earlier I have modified it as following :
;;;;; ip-regallco-simple.ll
; RUN: llc < %s | FileCheck %s -check-prefix=NOIPRA
; RUN: llc < %s -enable-ipra | FileCheck %s
; NOIPRA: foo:
; NOIPRA: pushq %r10
; NOIPRA: pushq %r9
; NOIPRA: pushq %r8
; NOIPRA: callq bar1
; CHECK: foo:
; CHECK-NOT: pushq %r10
; CHECK-NOT: pushq %r9
; CHECK-NOT: pushq %r8
; CHECK: callq bar1
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}

Is this correct approach to verify spills?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160605/c436b6b3/attachment.html>

More information about the llvm-dev mailing list