[llvm] r181927 - Implement PPC counter loops as a late IR-level pass

Hal Finkel hfinkel at anl.gov
Thu May 16 09:55:06 PDT 2013


----- Original Message -----
> Hal Finkel <hfinkel at anl.gov> wrote on 16.05.2013 16:55:10:
> 
> > > Does this maybe need anything special to detect libgcc helper
> > > function calls?
> >
> > In PPCCTRLoops.cpp:
> >
> >       } else if (isa<UIToFPInst>(J) || isa<SIToFPInst>(J) ||
> >                  isa<FPToUIInst>(J) || isa<FPToSIInst>(J)) {
> >         CastInst *CI = cast<CastInst>(J);
> >         if (CI->getSrcTy()->getScalarType()->isPPC_FP128Ty() ||
> >             CI->getDestTy()->getScalarType()->isPPC_FP128Ty())
> >           return MadeChange;
> >
> > Is seems like this needs to be expanded to also pick up f64 cases
> > when in 32-bit mode. Thanks!
> 

This should be fixed by r182023, please verify.

> Couldn't there also be cases where whether or not a helper call is
> needed depends on the particular ISA level?  It seems fragile to
> have to replicate that decision logic exactly ...

Yes, and the logic tests for several of those (this is why the pass gets a TLI object pointer).

> 
> Isn't there way to check more generically whether a certain IR
> statement is going to get expanded into a helper call?
> 

I wish that there were, but I don't think that there is.

Thanks again,
Hal

> Bye,
> Ulrich
> 
> 



More information about the llvm-commits mailing list