[LLVMdev] Modifying LoopUnrollingPass

yaduveer singh yaduveer99 at gmail.com
Tue May 12 23:55:31 PDT 2015


Hi Renato,

Thanks for the help.

I am trying to follow the AST way. I tried seeing the AST contents by using
following command:

*clang -Xclang -ast-dump -fsyntax-only loop.c*

This is giving me some AST output( I believe so) but I am having two issue:

1. I am not able to put this output in a file as Its showing following
error:

*yaduveer at yaduveer-Inspiron-3542:~/RP$ clang -Xclang -ast-dump
-fsyntax-only loop1d.c | llvm-dis -o ast.txt*
*llvm-dis: Invalid bitcode signature*
*clang: error: unable to execute command: Broken pipe*
*clang: error: clang frontend command failed due to signal (use -v to see
invocation)*
*clang version 3.6.0 (trunk 225627) (llvm/trunk 225626)*
*Target: x86_64-unknown-linux-gnu*
*Thread model: posix*
*clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ <http://llvm.org/bugs/> and include the crash
backtrace, preprocessed source, and associated run script.*
*clang: note: diagnostic msg: *
**********************

*PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:*
*Preprocessed source(s) and associated run script(s) are located at:*
*clang: note: diagnostic msg: /tmp/loop1d-71cd19.c*
*clang: note: diagnostic msg: /tmp/loop1d-71cd19.sh*
*clang: note: diagnostic msg: *

**********************

2. I don't know whether this AST output is correct or not as I am seeing
very large output  compared to my small input program( file loop1d.c).


Could you please advise me on following queries:

a) Is there some way so that I can get dependency analysis of AST and
 Basic Blocks.
b) How can I modify an existing pass by writing a new Pass just like
 "Hello" pass but the dependencies involved in that pass must not show
error like "reclaration" ( As I tried with "LoopUnrollPass" in beginning.)

Regards,
Yaduveer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150513/129df94c/attachment.html>


More information about the llvm-dev mailing list