[llvm-commits] [Review Request][Patch]Introduce the VectorizeConfig class.
tobias at grosser.es
Thu Apr 5 07:42:41 PDT 2012
On 04/05/2012 04:33 PM, Hongbin Zheng wrote:
> hi Hal and tobi,
> This patch introduce VectorizeConfig class, which allow us control the
> behavior of the BBVectorize pass. The VectorizeConfig class provides a
> default contructor which reads the configurations from the original
> command line options. So when we want to override some parameter in
> the VectorizeConfig, we can write code like:
> // Construct the configuration with default ctor, which reads the
> configurations from the original command line options
> VectorizeConfig C;
> // Disable vectorize floating-point math intrinsics
> C.NoMath = true;
> Any suggestion or comment?
I like the idea.
> -BasicBlockPass *createBBVectorizePass();
> +BasicBlockPass *createBBVectorizePass(VectorizeConfig C = VectorizeConfig());
What about making the VectorizeConfig 'const' and passed by reference &C?
I leave the review itself to Hal.
More information about the llvm-commits