[PATCH] Allow BB duplication threshold to be adjusted through JumpThreading's ctor
hfinkel at anl.gov
Mon Sep 29 17:10:05 PDT 2014
----- Original Message -----
> From: "Michael Liao" <michael.liao at intel.com>
> To: "michael liao" <michael.liao at intel.com>, nrotem at apple.com, hfinkel at anl.gov
> Cc: spatel at rotateright.com, llvm-commits at cs.uiuc.edu
> Sent: Monday, September 29, 2014 6:34:36 PM
> Subject: Re: [PATCH] Allow BB duplication threshold to be adjusted through JumpThreading's ctor
> Hi Hal
> Yeah, "noduplicate" could prevent duplicating of barrier calls but
> patch wants to address the potential issue on processors with
> control flow, commonly found in GPUs, e.g. AMD/NVIDIA ones. The
> scenario is that, if BB is duplicated to exploit more jump threading,
> targets with divergent CF may execute more instructions if the
> condition is a divergent one.
> For updating that threshold from TTI, yeah, if we are interested in
> that case. I could come another patch considering both TTI and
> user-specified threshold.
I suppose that I don't understand what you mean by "if we are interested." Generally speaking, ctor parameters are useful only for clients who are not using the standard optimization pipeline, and we'd like the standard optimization pipeline to generally work well for a wide range of targets. Thus, a TTI interface is preferred.
>From a cost modeling perspective, how can you tell whether the instruction duplication will be worthwhile. Can this be something like 2*(instruction costs) <= (branch cost)?
> - Michael
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
More information about the llvm-commits