search for: addpassestoemitfilefinish

Displaying 12 results from an estimated 12 matches for "addpassestoemitfilefinish".

2009 Mar 08
2
[LLVMdev] addPassesToEmitFile
...resStr; llvm::TargetMachine* target(_arch->CtorFn(*_module, FeaturesStr)); assert(target && "Could not allocate target machine!"); std::ostringstream os; target->addPassesToEmitFile(*_passManager, os, llvm::TargetMachine::AssemblyFile, true); target->addPassesToEmitFileFinish(*_passManager, 0, true); However, in newer versions of llvm, like 2.5 that I'm testing now, I had to change the code to something like this: std::string Err; const llvm::TargetMachineRegistry::entry* _arch = llvm::TargetMachineRegistry::getClosestTargetForJIT(Err); std::string...
2009 Mar 08
0
[LLVMdev] addPassesToEmitFile
...ne* target(_arch->CtorFn(*_module, FeaturesStr)); >    assert(target && "Could not allocate target machine!"); > >    std::ostringstream os; > >    target->addPassesToEmitFile(*_passManager, os, > llvm::TargetMachine::AssemblyFile, true); >    target->addPassesToEmitFileFinish(*_passManager, 0, true); > > > > However, in newer versions of llvm, like 2.5 that I'm testing now, I > had to change the code to something like this: > > >    std::string Err; >    const llvm::TargetMachineRegistry::entry* _arch = > llvm::TargetMachineRegistry::ge...
2009 Mar 09
1
[LLVMdev] addPassesToEmitFile
...Fn(*_module, FeaturesStr)); > >    assert(target && "Could not allocate target machine!"); > > >    std::ostringstream os; > > >    target->addPassesToEmitFile(*_passManager, os, > > llvm::TargetMachine::AssemblyFile, true); > >    target->addPassesToEmitFileFinish(*_passManager, 0, true); > > > However, in newer versions of llvm, like 2.5 that I'm testing now, I > > had to change the code to something like this: > > >    std::string Err; > >    const llvm::TargetMachineRegistry::entry* _arch = > > llvm::TargetMachineRe...
2009 Jun 17
1
[LLVMdev] Undocumented API changes
...fe for executing threaded applications without first invoking llvm_start_multithreaded(). Please begin to update your client applications now if this affects you, as I will be throwing the switch in SVN sooner rather than later. 3. The change you should make: every call to addPassesToEmitFile, addPassesToEmitFileFinish, addPassesToEmitMachineCode, or addCommonCodeGenPasses should pass an optimization level enum rather than true / false for "Fast". The enum is in llvm/Target/TargetMachine.h: namespace CodeGenOpt { enum Level { Default, None, Aggressive }; } 4. The LLVM IR opcodes A...
2009 Jun 17
10
[LLVMdev] Segmentation fault - Kaleidoscope
On Jun 17, 2009, at 9:46 AM, Paul Melis wrote: > FWIW, I'm also suddenly experiencing segfaults in code that used to > work > a few days ago (I'm using svn). This may be unrelated to the problem > described below, but perhaps it's the same thing. > > In my case it seems that creating an ExecutionEngine has changed. I > used > to do > > Module* Mod
2009 Mar 17
0
[LLVMdev] Printing x86 ASM for Function
Dear Maxime, Nyx wrote: > Hello, > > I would like to know how to go about printing the x86 assembly output for a > compiled function (I'm using the JIT). I saw there is a X86IntelAsmPrinter > on doxygen. However, it takes several arguments I don't know how to fill in. > Is there a helper function to create such a pass? Once I have the pass > created, do I just add it
2009 Apr 30
0
[LLVMdev] Change in JIT
...you would pass a flag into the code generator to indicate whether you wanted "fast" code generation or normal code generation. Now, we have a finer-grained control over this. An enum value is passed instead of a boolean flag. The change you should make: every call to addPassesToEmitFile, addPassesToEmitFileFinish, addPassesToEmitMachineCode, or addCommonCodeGenPasses should pass an optimization level enum rather than true / false for "Fast". The enum is in llvm/Target/TargetMachine.h: namespace CodeGenOpt { enum Level { Default, None, Aggressive }; } The "Default" enum...
2007 Nov 08
3
[LLVMdev] Newbie JITter
...return 1; case FileModel::MachOFile: case FileModel::ElfFile: case FileModel::Error: std::cerr << "target does not support generation of this file type!\n"; return 1; case FileModel::AsmFile: break; } MachineCodeEmitter *MCE = 0; if (target->addPassesToEmitFileFinish(Passes, MCE, false)) { std::cerr << "target does not support generation of this file type! \n"; return 1; } std::cout << "\nWhich has this machine code form:"; Passes.doInitialization(); for (Module::iterator I = M->begin(), E = M->end()...
2009 Mar 16
2
[LLVMdev] Printing x86 ASM for Function
Hello, I would like to know how to go about printing the x86 assembly output for a compiled function (I'm using the JIT). I saw there is a X86IntelAsmPrinter on doxygen. However, it takes several arguments I don't know how to fill in. Is there a helper function to create such a pass? Once I have the pass created, do I just add it to a FunctionPassManager? Thank you for your time, -
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 Jun 17
0
[LLVMdev] Undocumented API changes
...than later. I don't believe that this is true anymore. However, the reason for this series of changes is to make LLVM multithread safe, so that you can have multiple threads JIT'ing at the same time etc. > 3. > The change you should make: every call to addPassesToEmitFile, > addPassesToEmitFileFinish, addPassesToEmitMachineCode, or > addCommonCodeGenPasses should pass an optimization level enum rather > than true / false for "Fast". The enum is in > llvm/Target/TargetMachine.h: This was made to give more control over optimization level. > 4. > The LLVM IR opcodes Add,...
2007 Nov 09
0
[LLVMdev] Newbie JITter
...ase FileModel::ElfFile: > case FileModel::Error: > std::cerr << "target does not support generation of this file > type!\n"; > return 1; > case FileModel::AsmFile: > break; > } > > MachineCodeEmitter *MCE = 0; > if (target->addPassesToEmitFileFinish(Passes, MCE, false)) { > std::cerr << "target does not support generation of this file type! > \n"; > return 1; > } > > std::cout << "\nWhich has this machine code form:"; > > Passes.doInitialization(); > > for (Mo...