[PATCH] Consider error-reporting calls cold in BPI

Hal Finkel hfinkel at anl.gov
Sat Nov 9 05:44:06 PST 2013


----- Original Message -----
> 
> 
> 
> 
> On Fri, Nov 8, 2013 at 12:33 PM, Hal Finkel < hfinkel at anl.gov >
> wrote:
> 
> 
> 
> 
> > Okay, thanks! (Maybe this leaves me with InstCombine?) Does
> > anything
> > else use, or is expected to use, the cold attribute directly in
> > addition to BPI? If not, maybe leaving this in BPI is just as good
> > as anything else.
> 
> Chandler, please express an opinion. Would you want this in
> InstCombine? Thanks!
> Sorry, missed this email.
> 
> 
> I agree with your analysis that FunctionAttrs is the wrong place.
> Sorry for that.
> 
> 
> I think I would put this in SimplifyLibCalls much as Meador Inge has
> said now. That's where we make assumptions about library calls
> having special meaning, and this makes a lot of sense to me as being
> part of that. And this would in turn run inside of InstCombine.

Okay, I've attached a patch that adds this into SimplifyLibCalls. In this incarnation, I've added the functionality at the top-level of SimplifyLibCalls itself (which makes it different from all of the other simplifications). My rationale for this is that adding the cold hint should not depend on the builtin status of the functions. I'm not sure how much I like this. Thoughts?

Thanks again,
Hal

> 
> 
> -Chandler

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slc-err-rep.patch
Type: text/x-patch
Size: 7400 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131109/4a3bb351/attachment.bin>


More information about the llvm-commits mailing list