search for: apifile

Displaying 6 results from an estimated 6 matches for "apifile".

2010 Feb 25
2
[LLVMdev] Programmatic compilation of C++ file into bitcode
...p?). Replying to myself again... After sifting through many of the existing transforms, I discovered that new command-line parameters can be added to opt simply by declaring them in the transform code, such as in this example from Internalize.cpp: static cl::opt<std::string> APIFile("internalize-public-api-file", cl::value_desc("filename"), cl::desc("A file containing list of symbol names to preserve")); So, the calling program can simply pass the name of a file to opt as a parameter, and it will then know exactly where the analyzer will...
2017 Oct 26
2
LLVM v6.0 Internalize and GlobalDCE PASS can not work together?
...ld be inserted into ExternalNames by default: Index: lib/Transforms/IPO/Internalize.cpp =================================================================== --- lib/Transforms/IPO/Internalize.cpp  (revision 316540) +++ lib/Transforms/IPO/Internalize.cpp  (working copy) @@ -61,6 +61,7 @@      if (!APIFile.empty())        LoadFile(APIFile);      ExternalNames.insert(APIList.begin(), APIList.end()); +    ExternalNames.insert("main");    }    bool operator()(const GlobalValue &GV) { 在 2017年10月25日 21:20, Hal Finkel 写道: > Hi, Leslie, > > When you use internalize, you need to...
2010 Feb 25
0
[LLVMdev] Programmatic compilation of C++ file into bitcode
On Feb 25, 2010, at 11:16 AM, Trevor Harmon wrote: > Is there perhaps some structured mechanism for retrieving the output > of an LLVM pass? That is, something better than just parsing the > output of "opt"... On rereading the opt documentation, I see: "In a few cases, it will ... generate a file with the analysis output, which is usually done when the output is meant
2010 Feb 26
0
[LLVMdev] Programmatic compilation of C++ file into bitcode
...> > After sifting through many of the existing transforms, I discovered > that new command-line parameters can be added to opt simply by > declaring them in the transform code, such as in this example from > Internalize.cpp: > > static cl::opt<std::string> > APIFile("internalize-public-api-file", cl::value_desc("filename"), > cl::desc("A file containing list of symbol names to preserve")); > > So, the calling program can simply pass the name of a file to opt as a > parameter, and it will then know exactly where...
2010 Feb 25
2
[LLVMdev] Programmatic compilation of C++ file into bitcode
On Feb 25, 2010, at 1:04 AM, Duncan Sands wrote: > You can add your static analysis to llvm-gcc as an LLVM pass. > If you write it as an LLVM pass then you can also use it from > "opt", which would be convenient. Thanks, that sounds like a good approach. It appears I can get a Module instance simply by inheriting from ModulePass. There's one problem, however. I will at
2017 Oct 25
3
LLVM v6.0 Internalize and GlobalDCE PASS can not work together?
Hi LLVM developers, $ cat hello.c #include <stdio.h> void foo() { } int main(int argc, char *argv[]) {   for (int i = 0; i < 10; i++) {     printf("%d\n", i);   }   return 0; } $ /opt/llvm-svn/bin/clang --version Fedora clang version 6.0.0 (trunk 316308) (based on LLVM 6.0.0svn) Target: x86_64-redhat-linux Thread model: posix InstalledDir: /opt/llvm-svn/bin $