Hi, I looked over the gllvm sources, looks interesting. There is no equivalent for gollvm, someone would need to contribute it. I don't see any fundamental reason why it would not work, but I am sure there would be challenges and wrinkles.
One thing to note is that gllvm is emitteding bitcode (*.bc) files, not LLVM IR dumps (*.ll). Thanks, Than On Mon, May 10, 2021 at 9:09 AM ZHOU PERTER <pupile...@gmail.com> wrote: > Hi Than, > Thanks for reply > For C or C++ code ,there is a tool wllvm > <https://github.com/travitch/whole-program-llvm> and go version gllvm > <https://github.com/SRI-CSL/gllvm> that can building whole-program > llvm-ir,so i wonder is there any same tool in gollvm > PETER > > 在2021年5月10日星期一 UTC+8 下午8:29:53<th...@google.com> 写道: > >> Hi, >> >> It wasn't clear from your email exactly what you are doing or what the >> error was you encountered (grepping in the gollvm/LLVM sources didn't turn >> up any error code similar to "unable to locate ParamAttr enum"), but I >> think it is safe to say that this isn't a supported use case for gollvm, at >> least I don't know of anyone who is doing this sort of thing already. >> >> Generating a *.ll IR file for each translation unit and then reading them >> all together sounds difficult, seems as though you would need some sort of >> very strong type unification in order to match up types that are >> common/shared among translation units. Have you tried doing this on C code, >> for example? >> >> Thanks, Than >> >> >> >> >> On Mon, May 10, 2021 at 8:09 AM ZHOU PERTER <pupi...@gmail.com> wrote: >> >>> Hi, >>> i want to use gollvm to produces a project llvm-ir >>> i use `go build -work -x . 1> transcript.txt 2>&1` and `egrep >>> '(WORK=|llvm-goc -c)' transcript.txt` >>> to ever `llvm-goc -c` command add `-S -emit-llvm` to produces .ll for >>> each .go file >>> then i use https://github.com/llir/llvm to transfer llvm ir to go >>> build-in struct,but llir only parse one file >>> for simple file it's ok >>> ``` >>> package main >>> import ( >>> "fmt" >>> ) >>> func main(){ >>> a := "hello_world" >>> fmt.Println(a) >>> } >>> but for multiple packages project the error `unable to locate ParamAttr >>> enum corresponding to "noundef"` occur when i only provide main.ll。 >>> any way to merger mutli .ll to one .ll or other method so that i can do >>> multiple packages project data flow analysis? >>> Thankss, >>> PERTER >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "golang-nuts" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to golang-nuts...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/golang-nuts/2c329707-bc0f-4603-9e98-199102280cecn%40googlegroups.com >>> <https://groups.google.com/d/msgid/golang-nuts/2c329707-bc0f-4603-9e98-199102280cecn%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/1f07839c-164b-4d9b-a19b-2fae422b786fn%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/1f07839c-164b-4d9b-a19b-2fae422b786fn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CA%2BUr55F4JjybJLPjOdaJqWUeDLJake_jr9%3DLaBXK_hR9F-BKkQ%40mail.gmail.com.