[Review Request][PATCH] Add the function "vectorizeBasicBlock"

Hi Hal,

I add a function named "vectorizeBasicBlock" which allow users to
perform basic block vectoirzation inside their pass. But i am not sure
whether i missed something as no one use the function right now (But
it will be used by Polly sometimes later[1]).

In addition, we (tobi and me) also want to make the vectorizer being
configured command line flags. To achieve this, we are going to patch
the pass so that it do not read the options like ReqChainDepth,
SearchLimit, SplatBreaksChain, ... etc. from the command line option
directly, but read from an instance of the VectorizeConfig class,
where the VectorizeConfig class is designed to provide the vectorize
related parameters to to the BBVectorize pas.

After this, people can pass target specific vectorize configuration to
the BBVectorize pass in tools like LLC. And original
createBBVectorizePass function can create a VectorizeConfig that read
the configuration from the commandline options and pass it to the
BBVectorizePass, hence users can still control the behaviour of the
pass with command like option.

Any comment or suggestion is appreciated.

best regards
ether

[1]http://llvm.org/bugs/show_bug.cgi?id=12404

0001-Add-a-the-function-vectorizeBasicBlock-which-allow-u.patch (3.44 KB)

Ether,

Sounds great! Please keep in mind that, eventually, we'll also want to
configure those options from TLI (or something similar). The patch
looks good to me.

-Hal

Hi Hal,

Ether,

Sounds great! Please keep in mind that, eventually, we'll also want to
configure those options from TLI (or something similar). The patch

Thanks a lot for reminding this and this is what i want, in fact i
have a private backend targeting FPGA and i only want to vectorize the
load/store instructions.

looks good to me.

I am going to commit tomorrow.

best regards
ether