similar to: [LLVMdev] PassManager vs FunctionPassManager

Displaying 20 results from an estimated 6000 matches similar to: "[LLVMdev] PassManager vs FunctionPassManager"

2007 Jun 21
0
[LLVMdev] PassManager vs FunctionPassManager
On Jun 21, 2007, at 4:13 PM, Dan Gohman wrote: > Right now, addPassesToEmitFile requires a FunctionPassManager. If I'm > working with code that uses a plain PassManager and want it to > generate > code, are there any options better than doing this: That's what FPPassManager does (include/llvm/PassManagers.h) . Function pass manager itself is a module level pass.
2007 Jun 25
1
[LLVMdev] PassManager vs FunctionPassManager
On Thu, Jun 21, 2007 at 04:37:14PM -0700, Devang Patel wrote: > > On Jun 21, 2007, at 4:13 PM, Dan Gohman wrote: > > > Right now, addPassesToEmitFile requires a FunctionPassManager. If I'm > > working with code that uses a plain PassManager and want it to > > generate > > code, are there any options better than doing this: > > That's what
2009 Jul 26
2
[LLVMdev] Pass Scheduling Information without using opt
Hey Daniel, thanks for the response. > I believe all you need to do is call llvm::llvm_shutdown(). > I am not sure that this is what I need. When and how should I call llvm_shutdown()? After the FunctionPassManager is done, the calling ModulePass still performs quite a few actions on the transformed code and also calls the FunctionPassManager on different functions. However, I need
2009 Jul 27
2
[LLVMdev] Pass Scheduling Information without using opt
Daniel Dunbar wrote: > Ah, in this case llvm_shutdown isn't what you are looking for. I've > never looked at the Statistic implementation so I can't be any help > here, but if you poke around starting with "llvm/ADT/Statistic.h" you > may find a way to do what you want. I looked into that already, but Statistic.h only gives me the possibility to implement tracking
2009 Jul 26
0
[LLVMdev] Pass Scheduling Information without using opt
On Sun, Jul 26, 2009 at 1:48 PM, Ralf Karrenberg<Chareos at gmx.de> wrote: > Hey Daniel, > > thanks for the response. > >> I believe all you need to do is call llvm::llvm_shutdown(). >> > I am not sure that this is what I need. When and how should I call > llvm_shutdown()? At the end of the program, this just arranges for LLVM's "managed statics"
2011 Sep 25
1
[LLVMdev] reusing FunctionPassManager with different Modules
Thanks. The reason I ask is because I'm looking at some code that does just that. A single FunctionPassManager is constructed with a dummy Module and createStandardFunctionPasses is called on it. The FunctionPassManager cached and run on Functions in other Modules. So far I haven't noticed any problems but I guess that is because the passes added by createStandardFunctionPasses don't
2020 Apr 04
2
Running opt O1 outside of llvm
Hi, I would like to run the -O1 pass sequence followed by -reg2mem from an out of tree project which uses llvm. I am using the following code snippet to do so but in some cases, my method is also vectorising the code, which doesn't happen when running the same sequence(-S -O1 -reg2mem) through opt. Can someone please help me find what I am missing? Thanks, Akash. *
2015 Dec 20
3
How to run InternalizePass
I'm working on a whole program optimizer that uses LLVM as a library, and one of the things I want to do is eliminate dead global functions and variables even when they are not local to a module. (This understandably doesn't happen by default because the optimizer has to assume it could be compiling a library rather than a program.) I've actually written a function to do this, but
2008 May 28
1
[LLVMdev] Asm output while executing
Hello, I'm trying to catch assembly output and do some formatting for its presentation while being executed. I face a problem, which is clear from the error, although I have no clue on how to do it otherwise. If generating the code for its asm output and then for jit execution I get: ********** static llvm::MachineFunction& llvm::MachineFunction::construct(const llvm::Function*, const
2009 Jul 21
3
[LLVMdev] Handling of built-in functions
The issue is that there is no runtime function. I'm not sure we're in the same page but just in case we aren't I'm trying to provide support for built-in functions at compilation time. Some functions can be expressed in LLVM and others only in the target language. For the first group I'm trying to inline the implementation in a module pass added in addPassesToEmitFile. For the
2007 Jan 22
2
[LLVMdev] addPassesToEmit(Whole)File changes?
Hi folks, just installed the new llvm 1.9 build and noticed that my code no longer worked. It seems something has changed with addPassesToEmitFile(). First, the arguments to that method changed so that it no longer takes a PassManager, but only a FunctionPassManager. Instead there is a addPassesToEmitWholeFile() method, but that is marked as optional, and when I change my code to
2009 Jul 16
3
[LLVMdev] Handling of built-in functions
Hi, I'm trying to add support in my back end for certain functions that are seen as built-in by the target. Some of these functions can be implemented in a) LLVM, and some in b) the native target language. My approach to case a) is to write the built-in function implementation in C, compile it to LLVM using Clang, link it to the module that uses it and finally add a pass to inline it.
2014 Jan 15
2
[LLVMdev] Loop unrolling a function
The loop rotation pass does modify the function, which I'm guessing means that a FunctionPassManager can be used to run LoopPasses (this is not obvious to me after looking through the FunctionPassManager code). Unfortunately none of the other passes I'm using (ScalarEvolution, LCSSA, IndVarSimplify, and LoopUnroll) appear to have an effect. I verified that the function can be loop
2013 Jan 29
0
[LLVMdev] Running a Local Buildbot
Hello We are migrating from 2.9 to 3.2 Here is some code that does not compile any more llvm::PassManager *pm; llvm::FunctionPassManager *fpm; module = llvm::ParseBitcodeFile(mb,context,&err_str); if (!module) { error() <<"Failed to load module from bitcode file: " <<err_str <<endl; exit(1); } pm = new PassManager();
2009 Jul 21
0
[LLVMdev] Handling of built-in functions
If you add an ASM node, you won't be able to JIT the result. I don't know if you care about that or not, but ASM nodes aren't supported by the execution engine. (If you do want to JIT, you could always dump the machine code to memory and link its location to a global using ExecutionEngine::addGlobalMapping), and then JIT whatever needs to call it. Obviously, it won't get inlined
2008 Dec 19
2
[LLVMdev] strange behaviour after extracting optimization pass code
Hi, I am expieriencing strange behaviour of llvm's optimization passes and I don't understand what I am doing wrong. Basically all I've done is extracting code for optimization of a llvm-function in a llvm-module and put it into a separate function for better readability. The original code looks like follows (and works as expected): ----------------------------- std::string
2009 Jul 20
2
[LLVMdev] Handling of built-in functions
Hi Daniel, Thanks for the reply. If I understand correctly, your suggestion is to have the backend call a library that handles the built-in functions. Would the calls need to be lowered and redirected (e.g. by a big switch statement or a jump table) to the corresponding function in the library? Thanks, Javier On 7/20/2009 12:11 AM, Daniel Dunbar wrote: > Hi Javier, > > I'm not
2007 Jan 22
0
[LLVMdev] addPassesToEmit(Whole)File changes?
On Sun, 21 Jan 2007, Marcel Weiher wrote: > just installed the new llvm 1.9 build and noticed that my code no > longer worked. It seems something has changed with > addPassesToEmitFile(). First, the arguments to that method changed so > that it no longer takes a PassManager, but only a > FunctionPassManager. Instead there is a addPassesToEmitWholeFile() > method, but that is
2006 Jan 10
0
[LLVMdev] passmanager, significant rework idea...
On Mon, 9 Jan 2006, Saem Ghani wrote: > The patch below basically hammers out some ideas as to where I'd like > to take the passmanager in LLVM. I've tried thinking things through, > but I'm still a n00b, so some criticism would be more than welcome. =) > > Starting from line 191 down. If you're wondering why I created a > patch, well that's because I found
2010 Aug 11
4
[LLVMdev] Optimization pass questions
I have a whole slew of questions about optimization passes. Answers to any or all would be extremely helpful: How important are doInitialization/doFinalization? I can't detect any difference if I use them or not. Why does the function pass manager have doInitialization/doFinalization, but the global pass manager doesn't? If I am applying the function passes to many functions, do I