2010/1/4 Devang Patel <devang.patel at gmail.com>:> A separate VectorizationPass that requires dependence analysis is the
> way to go.
Hi Devang,
With all the holiday break stuff I forgot about this thread. I got to
a dead end...
The docs [1] explain how to write a function pass and mention a loop
pass as a type of function pass, but the registration doesn't work the
same way, I had to do some hacking and never got it to show up in the
'opt' list.
I also got to a loop in the call (the code is quite extensive and I
still have limited time to dig in). I got that by writing a loop pass
and putting it on the pass vector it'd be called by the loop pass, but
I couldn't figure it out how to add it to the loop vector.
If I got what you saying, I should created a separate function pass
(registered the way the docs say or adding it to LinkAllPasses, I
don't know), depending on LoopDependenceAnalysis (somewhere there was
a way to determine dependency, I have to check out again), that would
do the same as LoopPass (find all loops, run a vectorization loop pass
on each).
If that's so, why not extend LoopPass and register it directly on the
vector? I imagine the dependency wouldn't be as easy but at least
there would be less duplicated code... or I just didn't understand
much of it... what's way more likely... ;)
--
cheers,
--renato
[1] http://llvm.org/docs/WritingAnLLVMPass.html
http://systemcall.org/
Reclaim your digital rights, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm