search for: createmachinefunctionprinterpass

Displaying 20 results from an estimated 24 matches for "createmachinefunctionprinterpass".

2010 Mar 29
2
[LLVMdev] [PATCH] Before/After IR Dumps
...rupt the pass structure. The printer should be a > BasicBlockPass. However, BasicBlockPass is probably nearly dead, if you > want to remove it instead as a separate patch, that would also be great :) I'll see what I can do. > Your patch doesn't include the file that defines > createMachineFunctionPrinterPass, but I assume it's fine. Odd. This was a patch generated from a clean upstream. It built fine. I'll see if maybe I missed something. > After making these changes, please test the resultant patch against > mainline with just the patch applied and commit if it looks ok. Thanks &gt...
2010 May 28
4
[LLVMdev] Combining Branch Statements - Missing Optimization Pass?
...ss that I should add which should handle this case? Finally, I want to look at the machine code to see if perhaps this sort of thing is handled by the optimization passes during machine code emission but I can't figure out how to easily print out the machine code. Is there an easy way to add a createMachineFunctionPrinterPass pass to the ExecutionEngine's JIT so that it will print out the machine code after all the optimizations have been done and the code has been generated for MachineCodeEmission? Thank you in advance, Curtis define void @main() nounwind { bb.nph: br label %loop loop:...
2009 Mar 30
1
[LLVMdev] Print native code emitted by the JIT
Hi everybody, I'm toying with the Kaleidoscope example from the documentation (with llvm 2.5) and I want to print out on stderr, the native code (X86) emitted with the JIT. I have found the "createMachineFunctionPrinterPass" function. But when I add it to the FunctionPassManager ( OurFPM.add(createMachineFunctionPrinterPass(cerr, "")); ). I get an error at runtime : "MachineFunction.cpp:378: static llvm::MachineFunction& llvm::MachineFunction::get(const llvm::Function*): Assertion `mc &&amp...
2010 Mar 29
0
[LLVMdev] [PATCH] Before/After IR Dumps
...>> make this take a list of strings, which would allow you to collapse these >> to support -print-before=all and -print-after=all. > > Interesting idea. I'll think about it for a follow-on patch. Sure. >> Your patch doesn't include the file that defines >> createMachineFunctionPrinterPass, but I assume it's fine. > > Odd. This was a patch generated from a clean upstream. It built fine. I'll > see if maybe I missed something. I think it's just missing from the patch you sent, maybe it didn't get svn added. > >> After making these changes, plea...
2010 May 28
0
[LLVMdev] Combining Branch Statements - Missing Optimization Pass?
...is at curtisfaith.com> wrote: > Finally, I want to look at the machine code to see if perhaps this sort of > thing is handled by the optimization passes during machine code emission but > I can't figure out how to easily print out the machine code. Is there an > easy way to add a createMachineFunctionPrinterPass pass to the > ExecutionEngine's JIT so that it will print out the machine code after all > the optimizations have been done and the code has been generated for > MachineCodeEmission? > Thank you in advance, > Curtis You could always have your code save the module you're JITt...
2005 May 17
2
[LLVMdev] Register Allocation problem
...passes in emitting assembly I have this: " PM.add(createLowerGCPass()); PM.add(createLowerInvokePass()); PM.add(createLowerSwitchPass()); PM.add(createUnreachableBlockEliminationPass()); PM.add(create<MYTARGET>ISelSimple(*this)); if(PrintMachineCode) PM.add(createMachineFunctionPrinterPass(&std::cerr)); PM.add(createRegisterAllocator()); if(PrintMachineCode) PM.add(createMachineFunctionPrinterPass(&std::cerr)); PM.add(createPrologEpilogCodeInserter()); PM.add(create<MYTARGET>AsmPrinter(Out, *this)); PM.add(createMachineCodeDeleter()); &quo...
2010 Mar 26
0
[LLVMdev] [PATCH] Before/After IR Dumps
...FunctionPass(Banner, &O); +} + This will disrupt the pass structure. The printer should be a BasicBlockPass. However, BasicBlockPass is probably nearly dead, if you want to remove it instead as a separate patch, that would also be great :) Your patch doesn't include the file that defines createMachineFunctionPrinterPass, but I assume it's fine. After making these changes, please test the resultant patch against mainline with just the patch applied and commit if it looks ok. Thanks David, -Chris
2010 Mar 17
4
[LLVMdev] [PATCH] Before/After IR Dumps
On Monday 15 March 2010 13:45:14 David Greene wrote: > On Sunday 14 March 2010 18:32:35 Chris Lattner wrote: > > This is much better than the first iteration but still has many issues. I believe I've addressed all your points with this patch except I didn't use StringRef. It doesn't appear to be useful since createPrinterPass will be sent a const std::string & and will
2010 May 28
0
[LLVMdev] Combining Branch Statements - Missing Optimization Pass?
...should add which should handle this case? > > Finally, I want to look at the machine code to see if perhaps this sort of thing is handled by the optimization passes during machine code emission but I can't figure out how to easily print out the machine code. Is there an easy way to add a createMachineFunctionPrinterPass pass to the ExecutionEngine's JIT so that it will print out the machine code after all the optimizations have been done and the code has been generated for MachineCodeEmission? > > Thank you in advance, > > Curtis > > > > define void @main() nounwind { > bb.nph:...
2010 Mar 29
2
[LLVMdev] [PATCH] Before/After IR Dumps
On Monday 29 March 2010 12:08:45 Chris Lattner wrote: > >> Your patch doesn't include the file that defines > >> createMachineFunctionPrinterPass, but I assume it's fine. > > > > Odd. This was a patch generated from a clean upstream. It built fine. > > I'll see if maybe I missed something. > > I think it's just missing from the patch you sent, maybe it didn't get svn > added. Yep, that's wha...
2010 Mar 14
3
[LLVMdev] [PATCH] Before/After IR Dumps
...new pass, not returning an existing one. Please make it take a StringRef, not an std::string and eliminate the <string> #include from Pass.h. MachineFunctionPrinterPass.h doesn't need to #include MachineFunctionPass.h, just use a forward declaration. Also, please move the prototype of createMachineFunctionPrinterPass into include/llvm/CodeGen/Passes.h, eliminating the need for the header in the first place. This hunk looks unrelated, please remove it: +++ include/llvm/PassManager.h (working copy) @@ -18,6 +18,7 @@ #define LLVM_PASSMANAGER_H #include "llvm/Pass.h" +#include "llvm/Support/Pas...
2010 Mar 12
0
[LLVMdev] [PATCH] Before/After IR Dumps
On Friday 12 March 2010 08:13:05 Kalle Raiskila wrote: > David Greene wrote: > > Here's a rework using PassManager as Chris suggested. Comments? > > Tried this second patch with the svn version 97812 (the one the patch is > made against), but it doesn't compile: > "llvm/include/llvm/Pass.h:127: Error: expected unqualified-id before "&" >
2010 Mar 12
2
[LLVMdev] [PATCH] Before/After IR Dumps
David Greene wrote: > Here's a rework using PassManager as Chris suggested. Comments? Tried this second patch with the svn version 97812 (the one the patch is made against), but it doesn't compile: "llvm/include/llvm/Pass.h:127: Error: expected unqualified-id before "&" token" Seems raw_ostream is forward declared but not defined (adding a missing #include
2010 Mar 15
0
[LLVMdev] [PATCH] Before/After IR Dumps
...Please Ok. > make it take a StringRef, not an std::string and eliminate the <string> > #include from Pass.h. Ok. > MachineFunctionPrinterPass.h doesn't need to #include > MachineFunctionPass.h, just use a forward declaration. Also, please move Ok. > the prototype of createMachineFunctionPrinterPass into > include/llvm/CodeGen/Passes.h, eliminating the need for the header in the > first place. Ok. > This hunk looks unrelated, please remove it: Err...I need to override the virtual method. Believe me, I did NOT want to mess with this stuff. I wouldn't have touched it if I didn&...
2008 Mar 30
3
[LLVMdev] Being able to know the jitted code-size before emitting
Hi everyone, vmkit requires to know the size of a jitted method before emitting the method. This allows to allocate the correct size for the method. The attached patch creates this functionality when the flag SizedMemoryCode is on. In order to implement this functionality, i had to virtualize some MachineCodeEmitter functions. Is it OK to commit the patch? Thanks, Nicolas --------------
2008 Apr 01
2
[LLVMdev] Being able to know the jitted code-size before emitting
...ot; >> #include "llvm/CodeGen/Collector.h" >> #include "llvm/Target/TargetOptions.h" >> #include "llvm/Transforms/Scalar.h" >> @@ -257,7 +258,13 @@ >> >> if (addPreEmitPass(PM, Fast) && PrintMachineCode) >> PM.add(createMachineFunctionPrinterPass(cerr)); >> + >> + if (SizedMemoryCode) { >> + SizeEmitter * SE = new SizeEmitter(&MCE); >> + addSimpleCodeEmitter(PM, Fast, false, *SE); >> + } >> >> + >> addCodeEmitter(PM, Fast, PrintEmittedAsm, MCE); >> >> PM.add(createC...
2008 Mar 31
0
[LLVMdev] Being able to know the jitted code-size before emitting
...lvm/CodeGen/SizeEmitter.h" > #include "llvm/CodeGen/Collector.h" > #include "llvm/Target/TargetOptions.h" > #include "llvm/Transforms/Scalar.h" > @@ -257,7 +258,13 @@ > > if (addPreEmitPass(PM, Fast) && PrintMachineCode) > PM.add(createMachineFunctionPrinterPass(cerr)); > + > + if (SizedMemoryCode) { > + SizeEmitter * SE = new SizeEmitter(&MCE); > + addSimpleCodeEmitter(PM, Fast, false, *SE); > + } > > + > addCodeEmitter(PM, Fast, PrintEmittedAsm, MCE); > > PM.add(createCollectorMetadataDeleter()); > Index:...
2008 Apr 01
0
[LLVMdev] Being able to know the jitted code-size before emitting
..."llvm/CodeGen/Collector.h" >>> #include "llvm/Target/TargetOptions.h" >>> #include "llvm/Transforms/Scalar.h" >>> @@ -257,7 +258,13 @@ >>> >>> if (addPreEmitPass(PM, Fast) && PrintMachineCode) >>> PM.add(createMachineFunctionPrinterPass(cerr)); >>> + >>> + if (SizedMemoryCode) { >>> + SizeEmitter * SE = new SizeEmitter(&MCE); >>> + addSimpleCodeEmitter(PM, Fast, false, *SE); >>> + } >>> >>> + >>> addCodeEmitter(PM, Fast, PrintEmittedAsm, MCE); &gt...
2008 Apr 04
3
[LLVMdev] Being able to know the jitted code-size before emitting
...ctor.h" >>>> #include "llvm/Target/TargetOptions.h" >>>> #include "llvm/Transforms/Scalar.h" >>>> @@ -257,7 +258,13 @@ >>>> >>>> if (addPreEmitPass(PM, Fast) && PrintMachineCode) >>>> PM.add(createMachineFunctionPrinterPass(cerr)); >>>> + >>>> + if (SizedMemoryCode) { >>>> + SizeEmitter * SE = new SizeEmitter(&MCE); >>>> + addSimpleCodeEmitter(PM, Fast, false, *SE); >>>> + } >>>> >>>> + >>>> addCodeEmitter(PM,...
2008 Apr 05
2
[LLVMdev] Being able to know the jitted code-size before emitting
..."llvm/Target/TargetOptions.h" >>>>>> #include "llvm/Transforms/Scalar.h" >>>>>> @@ -257,7 +258,13 @@ >>>>>> >>>>>> if (addPreEmitPass(PM, Fast) && PrintMachineCode) >>>>>> PM.add(createMachineFunctionPrinterPass(cerr)); >>>>>> + >>>>>> + if (SizedMemoryCode) { >>>>>> + SizeEmitter * SE = new SizeEmitter(&MCE); >>>>>> + addSimpleCodeEmitter(PM, Fast, false, *SE); >>>>>> + } >>>>>> >>...