Invalid base register with fast-isel
Hal Finkel
hfinkel at anl.gov
Fri Jun 27 04:53:55 PDT 2014
----- Original Message -----
> From: "Ulrich Weigand" <Ulrich.Weigand at de.ibm.com>
> To: "Hal Finkel" <hfinkel at anl.gov>
> Cc: "llvm-commits" <llvm-commits at cs.uiuc.edu>
> Sent: Friday, June 27, 2014 6:47:29 AM
> Subject: Re: Invalid base register with fast-isel
>
> Hal Finkel <hfinkel at anl.gov> wrote on 27.06.2014 13:07:32:
>
> > > As far as I can see, that latter process took place long after
> > > FastISel, and with FastISel having no oppportunity to influence
> > > its choices ...
> > >
> > > Am I missing something here?
> >
> > You're right; but logically, the restriction does not belong on the
> > output from materializeFrameBaseRegister. Can you constrain the
> > register class on the store operand near the end of
> > PPCRegisterInfo::eliminateFrameIndex?
>
> Hmm, those instructions were not touched by eliminateFrameIndex
> either :-)
>
> LocalStackSlotPass::insertFrameReferenceRegisters allocates the
> base register here:
> BaseReg = Fn.getRegInfo().createVirtualRegister(RC);
>
> It then calls:
> // Tell the target to insert the instruction to initialize
> // the base register.
> // MachineBasicBlock::iterator InsertionPt =
> Entry->begin
> ();
> TRI->materializeFrameBaseRegister(Entry, BaseReg, FrameIdx,
> InstrOffset);
>
> and finally:
> // Modify the instruction to use the new base register rather
> // than the frame index operand.
> TRI->resolveFrameIndex(*I, BaseReg, Offset);
>
> So I guess the only chance to constrain the register are either
> materializeFrameBaseRegister or else resolveFrameIndex. Did you
> mean to refer to the latter?
Yes, indeed I did. Thanks for tracking this down!
-Hal
>
>
> Bye,
> Ulrich
>
>
--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
More information about the llvm-commits
mailing list