On Jun 28, 2013, at 10:32 AM, Eli Bendersky <[email protected]> wrote:

> On Fri, Jun 28, 2013 at 9:47 AM, Quentin Colombet <[email protected]> wrote:
> Hi Eli,
> 
> Just a thought, wouldn’t be better to add a hook in TargetSelectionDAGInfo 
> for pow, just like memset and memmove?
> Indeed, I guess that pow intrinsics may have special handling in some 
> optimizations and I am afraid we lose those benefits with the proposed patch.
> 
> What do you think?
> 
> Hi Quentin,
> 
> I suppose it can be useful, but IMHO it's an orthogonal issue to the Clang 
> change. Some targets (like PNaCl, and possibly others that split the 
> compilation to two distinct stages with bitcode in between) may decide that 
> the hardcoded pow-->intrinsic translation Clang currently does is not 
> necessarily desirable. The patch allows them to state so.
Make sense.

> It could probably be generalized even more by providing targets with a 
> stronger tool to state that they don't want intrinsics to be generated for 
> known lib calls.
That would be great and I guess it would be the next step.

I leave to the front-end specialist to comment on your patch :).

Thanks for your answer.

Cheers,

-Quentin 

> As for the SelDAG side, targets can probably already customize it by 
> "legalizing" ISD::FPOW etc. in a special way? In any case, for 
> split-compilation uses that's way too late :-)
> 
> Eli

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to