[PATCH] D20769: [IPRA] Interprocedural Register Allocation - Analysis Passes

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 5 10:55:20 PDT 2016


mehdi_amini added inline comments.

================
Comment at: test/CodeGen/Generic/reg-usage-info.ll:2
@@ +1,3 @@
+; RUN: llc -enable-ipra -debug-only=ip-regalloc -o /dev/null 2>&1 < %s  | FileCheck %s
+; REQUIRES: asserts
+; CHECK: Function Name : fib
----------------
vivekvpandya wrote:
> mehdi_amini wrote:
> > vivekvpandya wrote:
> > > mehdi_amini wrote:
> > > > I don't like that we can't pass the test in release mode. I suggested that the dump occurs in `doFinalization()` for the analysis pass (i.e. `PhysicalRegisterUsageInfo`).  You need to implement a proper cl::opt that controls a dump there, that could be used in release mode.
> > > Aren't we refering 
> > > ```RegUsageInfoCollector```  
> > > as analysis pass, 
> > > ```RegisterUsageInfo``` 
> > > is there for keeping data around.
> > Technically in LLVM the analysis is the pass that you require and query the result from (i.e. a pass you're using as `getAnalysis()`). But yeah terminology can be fuzzy.
> SO What is your suggestion? Which file should be changed?
I think I already told you: the way analysis are tested at the IR level is using the `-analyze` flag in `opt`. Since we don't have `-analyze` in llc, the closest I can imagine is to implement the analysis (in the LLVM sense) with the "print(...)" method as other analyses, and call it in `doFinalization()` when a cl::opt flag is set.


http://reviews.llvm.org/D20769





More information about the llvm-commits mailing list