开发者

What is meant by too many BB's in loop, can't vectorize?

In short, the situation is this: I have been trying to compile a C code with option gcc -O2 -ftree-vectorize -msse4 -ftree-vectorizer-verbose=10 -march=core2 -g -c. For certain nested for-loop constructs inside the code gcc complains

not vectorized: too many BBs in loop.

I apologize for my very limited understanding on compilers and vectorization.

Some initial searching fetched me this result in gcc's mailing list which says BB is an acronym for building block. From there checking GCC internals documentation I found out that gcc uses BB's to construct Control flow graph (CFG).

Can somebody please explain what is meant by BB's in th开发者_如何学运维e loop?

Also, I can't relate how too many BB's is actually making the gcc vectorization to fail?


BB means "basic block". See http://en.wikipedia.org/wiki/Basic_block for more explanation of what they are.

I imagine if there are too many basic blocks the control flow is such that it makes it impossible to vectorize the operation. See http://en.wikipedia.org/wiki/Vectorization_(parallel_computing) and in particular the section on "In the presence of control flow" to see why vectorization is affected.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜