search for: createstandardltopasses

Displaying 19 results from an estimated 19 matches for "createstandardltopasses".

2011 Jan 06
2
[LLVMdev] Marking a function prototype as being "persistent"
...asically a historical anachronism coming from > the way GCC used to work. Thanks for explaining. Why not redefine it from historical anachronism to architectural flag, that indicates you may generate more code with the same functions and globals later? And then, you could pass the same flag to createStandardLTOPasses, and that would skip the GlobalDCE passes. >> Even then, my runtime function prorotypes are still being stripped away by the GlobalDCE added by createStandardLTOPasses. > > Sure, and why not? Unused prototypes are not used for anything, they won't > turn up in the generated c...
2011 Jan 07
0
[LLVMdev] Marking a function prototype as being "persistent"
...anachronism coming from >> the way GCC used to work. > > Thanks for explaining. > > Why not redefine it from historical anachronism to architectural flag, that indicates you may generate more code with the same functions and globals later? And then, you could pass the same flag to createStandardLTOPasses, and that would skip the GlobalDCE passes. LTO is for doing optimizations that are only valid when the module contains everything that is needed to build the final executable. So adding a flag to say "not everything is there after all" makes no sense to me. >>> Even then, my r...
2010 Feb 10
3
[LLVMdev] adding switches to llvm-ld to disable certain optimizations.
Hi, I need to add switches like -disable-mem2reg, disable-gvn to llvm-ld. Currently CreateStandardLTOPasses takes in only DisableInternalize and DisableInliner switches. Is modifying this API okay for these new switches, or is it doable in some other ways ? - Sanjiv
2010 Feb 10
3
[LLVMdev] adding switches to llvm-ld to disable certain optimizations.
Chris Lattner wrote: > On Feb 9, 2010, at 7:39 PM, Sanjiv Gupta wrote: > > >> Hi, >> I need to add switches like -disable-mem2reg, disable-gvn to llvm-ld. >> Currently CreateStandardLTOPasses takes in only DisableInternalize and >> DisableInliner switches. >> >> Is modifying this API okay for these new switches, or is it doable in >> some other ways ? >> > > Why do you want this? > > -Chris > Mem2Reg isn't really useful for a si...
2011 Jan 07
1
[LLVMdev] Marking a function prototype as being "persistent"
...es no sense to me. And indeed, everything is there when I call LTO. The flag is not "not everything is there after all", but "don't damage your inputs". > >>>> Even then, my runtime function prorotypes are still being stripped away by the GlobalDCE added by createStandardLTOPasses. >>> >>> Sure, and why not? Unused prototypes are not used for anything, they won't >>> turn up in the generated code for example. >> >> They are not used this time. But why can't I generate additional code in the same module after having run LTO? &...
2010 Feb 10
0
[LLVMdev] adding switches to llvm-ld to disable certain optimizations.
On Feb 9, 2010, at 7:39 PM, Sanjiv Gupta wrote: > Hi, > I need to add switches like -disable-mem2reg, disable-gvn to llvm-ld. > Currently CreateStandardLTOPasses takes in only DisableInternalize and > DisableInliner switches. > > Is modifying this API okay for these new switches, or is it doable in > some other ways ? Why do you want this? -Chris
2010 Mar 05
0
[LLVMdev] Last chance to get anything into llvm-c and ocaml bindings
...I wanted to llvm-c and the > ocaml bindings for the soon to be released 2.7. Does anyone need any > other functions exposed before the code freeze on the 7th? > Hi Erick, Can you make the following functions available in llvm-c. createStandardFunctionPasses createStandardModulePasses createStandardLTOPasses Thanks in advance, George
2010 Mar 06
1
[LLVMdev] Last chance to get anything into llvm-c and ocaml bindings
On Fri, Mar 5, 2010 at 5:53 AM, George Giorgidze <giorgidze at gmail.com> wrote: > > Hi Erick, > > Can you make the following functions available in llvm-c. > > createStandardFunctionPasses > createStandardModulePasses > createStandardLTOPasses > > Thanks in advance, George This is a little tricky, so I need some advice from the community. First off, I'm not sure where it's appropriate to put these. For llvm-c, most files live in a header named after the library that includes the functions, and we don't have a correspon...
2010 Mar 04
4
[LLVMdev] Last chance to get anything into llvm-c and ocaml bindings
I've pretty much finished exposing all I wanted to llvm-c and the ocaml bindings for the soon to be released 2.7. Does anyone need any other functions exposed before the code freeze on the 7th?
2011 Jan 06
2
[LLVMdev] Marking a function prototype as being "persistent"
...e support functions. Apparently, this depends on the oddly-named UnitAtATime parameter. Set it to false. Try again. Suggestion: what about a comment explaining what "UnitAtATime" means :-) Even then, my runtime function prorotypes are still being stripped away by the GlobalDCE added by createStandardLTOPasses. So my question is: what is the correct, officially recommended way to reference runtime functions so that global DCE won't get rid of them? Or am I supposed to re-create the corresponding Function instances for every translation? Thank you in advance for enlightening me Christophe
2011 Apr 18
0
[LLVMdev] Registering a custom opt pass as a default one
...er, llvm-gcc or clang works on one source file at a time, so it won't do your step 2) automatically for you. What you want is link time optimization. See http://llvm.org/docs/LinkTimeOptimization.html and http://llvm.org/docs/GoldPlugin.html If you add your pass in gold plugin by modifying createStandardLTOPasses() then I believe it will do what you intend to do. - Devang
2011 Mar 22
2
[LLVMdev] LLVM optimization passes crash when running on second thread
...r> passManager( new llvm::PassManager ); if ( optimize ) { llvm::createStandardFunctionPasses( passManager.get(), 2 ); llvm::createStandardModulePasses( passManager.get(), 2, false, true, true, true, false, llvm::createFunctionInliningPass() ); llvm::createStandardLTOPasses( passManager.get(), true, true, false ); } passManager->run( *module ); - If I *don't* comment out the optimization passes (inside the if statement above) LLVM crashes with what appears to be a stack overflow; I've attached the stack trace below. - The code above is in th...
2011 Mar 22
0
[LLVMdev] LLVM optimization passes crash when running on second thread
...ew llvm::PassManager ); >        if ( optimize ) >        { >          llvm::createStandardFunctionPasses( passManager.get(), 2 ); >          llvm::createStandardModulePasses( passManager.get(), 2, false, true, true, true, false, llvm::createFunctionInliningPass() ); >          llvm::createStandardLTOPasses( passManager.get(), true, true, false ); >        } >        passManager->run( *module ); > - If I *don't* comment out the optimization passes (inside the if statement above) LLVM crashes with what appears to be a stack overflow; I've attached the stack trace below. > - The c...
2011 Apr 18
2
[LLVMdev] Registering a custom opt pass as a default one
Hi all, we're working on compile-time instrumentation for ThreadSanitizer (a data race detector, see http://code.google.com/p/data-race-test and http://code.google.com/p/data-race-test/wiki/CompileTimeInstrumentation), which is implemented as an opt plugin that is ran for each client C/C++ module we compile. To build a binary consisting of several modules the following steps are performed:
2011 Jan 06
0
[LLVMdev] Marking a function prototype as being "persistent"
...you are generating them, rather than first generating all functions and other globals and only then optimizing. It's basically a historical anachronism coming from the way GCC used to work. > Even then, my runtime function prorotypes are still being stripped away by the GlobalDCE added by createStandardLTOPasses. Sure, and why not? Unused prototypes are not used for anything, they won't turn up in the generated code for example. > So my question is: what is the correct, officially recommended way to reference runtime functions so that global DCE won't get rid of them? Or am I supposed to re-c...
2011 Jan 27
1
[LLVMdev] Missing some passes in llvm-ld
Hi All, It seems that I can't force some passes to run in llvm-ld as what I can do with opt. $ ~/opt/bin/llvm-ld -reassociate llvm-ld: Unknown command line argument '-reassociate. Try: 'opt/bin/llvm-ld -help' llvm-ld definitely linked with scalaropts, and RegisterPass<ReassociatePass> is in the library. Running with these passes with opt definitely work, but it'll
2010 Feb 10
0
[LLVMdev] adding switches to llvm-ld to disable certain optimizations.
On Feb 10, 2010, at 8:57 AM, Sanjiv Gupta wrote: > Chris Lattner wrote: >> On Feb 9, 2010, at 7:39 PM, Sanjiv Gupta wrote: >> >> >>> Hi, >>> I need to add switches like -disable-mem2reg, disable-gvn to llvm-ld. >>> Currently CreateStandardLTOPasses takes in only DisableInternalize and >>> DisableInliner switches. >>> >>> Is modifying this API okay for these new switches, or is it doable in >>> some other ways ? >>> >> >> Why do you want this? >> >> -Chris >> &gt...
2010 Jan 22
1
[LLVMdev] debugging a pass for LTO
Thank you very much for your suggestions. That's very helpful. However, since I'm trying to compile several somewhat large projects, I assume generating bitcode for each single file and linking them together might be painful (I don't want to modify too much the project makefiles). So I hope my pass can be used just with simple compilation command like "llvm-gcc
2009 Dec 05
2
[LLVMdev] use-def chain questions
...s result to see if any instruction prior to it is define statement, but I am not sure if there is already better way to do that. (2) another question I am using the gold-plugin to compile large applications, it works very well, then, I want to add a pass into include/llvm/Support/StandardPasses.h: createStandardLTOPasses, Since I want to add a new phase and disable some existing phase, is there any way to pass some flag to do that, now my complication model is: export PREFIX=/home/tianwei/llvm/llvm-gcc-bin/ export CC="$PREFIX/bin/llvm-gcc -use-gold-plugin" export CXX="$PREFIX/bin/llvm-g++ -use-gold...