[PATCH] Check Dest Register Liveness using MRI in CondOpt pass

Pete Cooper peter_cooper at apple.com
Wed Apr 22 10:03:45 PDT 2015

> On Apr 22, 2015, at 8:04 AM, Chad Rosier <mcrosier at codeaurora.org> wrote:
> Pete,
> I’ve pinged Zhaoshi and Ana using our internal emails.  Hopefully, they can provide some feedback shortly.
Thanks Chad.  Sounds good.

> Chad
> From: Pete Cooper [mailto:peter_cooper at apple.com] 
> Sent: Tuesday, April 21, 2015 6:51 PM
> To: mcrosier at codeaurora.org
> Cc: zhaoshiz at codeaurora.org; apazos at codeaurora.org; Tim Northover; Jiangning Liu; sdmitrouk at accesssoftek.com; llvm-commits
> Subject: [PATCH] Check Dest Register Liveness using MRI in CondOpt pass
> Hi Chad
> http://reviews.llvm.org/D6048 <http://reviews.llvm.org/D6048> (everyone CCed here was CCed on it) added register liveness checking to the CondOpt pass.  It does this with
>> if (I->getOperand(0).isDead())
> However, this requires that some kind of liveness has been run beforehand, so the pass had to require live intervals.  Looking at the pass manager dump, we then invalidated live intervals shortly after CondOpt because other passes don’t preserve it.
> Attached is a patch which removes the dependency on LiveIntervals by checking if the def has any uses.  If it has no uses then it was going to be marked dead anyway, so this is equivalent to your original code.  I’ve verified that this passes ‘make check’ and specifically stepped through the examples in combine-comparisons-by-cse.ll in lldb to ensure the behavior was the same.
> When building a bitcode containing all of llc with/without this change, it results in one less run of LiveIntervals per MF and saves 4s out of 80s total compile time.
> Thanks,
> Pete

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150422/de0d4953/attachment.html>

More information about the llvm-commits mailing list