[PATCH] D33562: MachineLICM: Add new condition for hoisting of caller preserved registers

Lei Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 31 11:55:21 PDT 2017


lei added inline comments.


================
Comment at: test/CodeGen/PowerPC/licm-tocReg.ll:1
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s
+
----------------
MatzeB wrote:
> lei wrote:
> > MatzeB wrote:
> > > - Can you write a .mir test that is better targetted at the problem?
> > > - Please add a sentence or two to describe what you are testing.
> > When I tried to create a .mir test I get machine verifier errors.  Since there are no passes invoked that identify the TOC access in the function, we don't reserve X2.
> > The problem is that MachineFunctionInfo isn't saved/dumped as part of emitting .mir.  So any passes that rely on a previously populated MFI run the risk of failing.  Specifically, this is an issue with TOC access which is what I'm trying to test.  The proper solution would be to emit MFI data .mir, but that is beyond the scope of this patch.  
> > 
> > Would an IR test with -stop-before/-stop-after checks be a reasonable compromise?
> That's unfortunate. In that case I'd rather leave the test as is (this is about late MachineLICM so there's not that many passes coming after it anyway that could destabilize the test).
> My point about documenting the test a bit still stands though (for example add a comment, which of the instructions was hoisted out of the loop and which call was blocking it before this patch).
Will do


https://reviews.llvm.org/D33562





More information about the llvm-commits mailing list