search for: codegenfiletyp

Displaying 13 results from an estimated 13 matches for "codegenfiletyp".

Did you mean: codegenfiletype
2014 Jan 26
2
[LLVMdev] [llmdev] fail to process llvm generated assembly on windows/mingw32
...argetMachine(triple); targetMachine.setAsmVerbosityDefault(true); targetMachine.setFunctionSections(true); targetMachine.setDataSections(true); targetMachine.getOptions().setNoFramePointerElim(true); output.reset(); targetMachine.emit(module, output, CodeGenFileType.AssemblyFile); module.dispose(); context.dispose(); byte[] asm = output.toByteArray(); output.reset(); asm = output.toByteArray(); BufferedOutputStream oOut = new BufferedOutputStream(new FileOutputStream(oFile)); targetMachine.assemble(as...
2013 Jan 07
0
[LLVMdev] How to output a .S *and* a .OBJ file?
...,"","",Options,Reloc::Default,CodeModel::Default,OLvl)); assert(target.get() && "Could not allocate target machine!"); TargetMachine &Target = *target.get(); /* TargetMachine::CGFT_AssemblyFile TargetMachine::CGFT_ObjectFile */ TargetMachine::CodeGenFileType FileType_S = TargetMachine::CGFT_AssemblyFile; TargetMachine::CodeGenFileType FileType_OBJ = TargetMachine::CGFT_ObjectFile; //if ( DoCompileObj ) { //} else if ( DoCompileS ) { OwningPtr<tool_output_file> Out_S(GetOutputStream(FileType_S, TheTarget->getName(), TheTriple->get...
2017 Jul 05
3
MSP430 code generation from LLVM IR
...251683 6 libsystem_c.dylib 0x00007fffa095a420 abort + 129 7 ldc2 0x0000000107d246c0 LLVMInstallFatalErrorHandler + 0 8 ldc2 0x0000000105efd2a7 codegenModule(llvm::TargetMachine&, llvm::Module&, llvm::raw_fd_ostream&, llvm::TargetMachine::CodeGenFileType) + 391 9 ldc2 0x0000000105f00ab9 (anonymous namespace)::writeObjectFile(llvm::Module*, char const*) + 377 10 ldc2 0x0000000105efcc05 writeModule(llvm::Module*, char const*) + 10517 11 ldc2 0x0000000105ee6162 ldc::CodeGenerator::writeAndF...
2013 Jun 21
2
[LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
...vm::Pass*) + 983 9 llc 0x00000000016f2990 10 llc 0x00000000016f0e91 llvm::PassManager::add(llvm::Pass*) + 39 11 llc 0x00000000011c119b llvm::LLVMTargetMachine::addPassesToEmitFile(llvm::PassManagerBase&, llvm::formatted_raw_ostream&, llvm::TargetMachine::CodeGenFileType, bool, void const*, void const*) + 1705 12 llc 0x00000000008c08b5 13 llc 0x00000000008bf8cd main + 237 14 libc.so.6 0x00007f986687576d __libc_start_main + 237 15 llc 0x00000000008bf229 ===== What my modulePass does is to print all of the function name in...
2007 Jan 22
2
[LLVMdev] addPassesToEmit(Whole)File changes?
...global data. I am currently installing older versions to see if that will work, but of course I will need to get it to work with the newest llvm version at some point. Any pointers? Thanks! Marcel This is my current code: -(void)dumpAssemblerToFile:(NSString*)filename { TargetMachine::CodeGenFileType FileType = TargetMachine::AssemblyFile; std::string err1; Module *M=(Module*)module; const TargetMachineRegistry::Entry* entry= TargetMachineRegistry::getClosestStaticTargetForModule( *M, err1 ); TargetMachine &target=*entry->CtorFn( *M, "" ); [self generateMethodLists];...
2012 Dec 07
0
[LLVMdev] Interprocedural Register Allocation
...s*) + 47 8 llc 0x0000000000f3d7df llvm::TargetPassConfig::addMachinePasses() + 719 9 llc 0x0000000000e5a3af 10 llc 0x0000000000e5994c llvm::LLVMTargetMachine::addPassesToEmitFile(llvm::PassManagerBase&, llvm::formatted_raw_ostream&, llvm::TargetMachine::CodeGenFileType, bool, void const*, void const*) + 92 11 llc 0x00000000005f6002 main + 4946 12 libc.so.6 0x00007f020a98a76d __libc_start_main + 237 13 llc 0x00000000005f4bd1 Stack dump: 0. Program arguments: llc --debug -cgregalloc=cg Aborted (core dumped) I am not really sure, w...
2012 Nov 02
2
[LLVMdev] Interprocedural Register Allocation
On Oct 31, 2012, at 1:41 PM, Madhusudan C.S <madhusudancs at gmail.com> wrote: > I have spent last 4 weeks trying to figure out how to implement > Interprocedural Register Allocation. I must admit that I was really > overwhelmed with LLVM's codebase while trying to figure this out :) > There is so much to know! I think I have reached a point where I > have some sort of
2007 Jan 22
0
[LLVMdev] addPassesToEmit(Whole)File changes?
...global data. I am currently installing older versions to see if that will work, but of course I will need to get it to work with the newest llvm version at some point. Any pointers? Thanks! Marcel This is my current code: -(void)dumpAssemblerToFile:(NSString*)filename { TargetMachine::CodeGenFileType FileType = TargetMachine::AssemblyFile; std::string err1; Module *M=(Module*)module; const TargetMachineRegistry::Entry* entry= TargetMachineRegistry::getClosestStaticTargetForModule( *M, err1 ); TargetMachine &target=*entry->CtorFn( *M, "" ); [self generateMethodLists];...
2013 Jun 21
0
[LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
...0x00000000016f2990 > 10 llc 0x00000000016f0e91 llvm::PassManager::add(llvm::Pass*) > + 39 > 11 llc 0x00000000011c119b > llvm::LLVMTargetMachine::addPassesToEmitFile(llvm::PassManagerBase&, > llvm::formatted_raw_ostream&, llvm::TargetMachine::CodeGenFileType, bool, > void const*, void const*) + 1705 > 12 llc 0x00000000008c08b5 > 13 llc 0x00000000008bf8cd main + 237 > 14 libc.so.6 0x00007f986687576d __libc_start_main + 237 > 15 llc 0x00000000008bf229 > ===== > > What my modulePass does i...
2007 Jan 22
0
[LLVMdev] addPassesToEmit(Whole)File changes?
...I != E; ++I) if (!I->isExternal()) Passes.run(*I); Passes.doFinalization(); The doInitialization/doFinalization methods handle the global data. -Chris > This is my current code: > > -(void)dumpAssemblerToFile:(NSString*)filename > { > TargetMachine::CodeGenFileType FileType = TargetMachine::AssemblyFile; > std::string err1; > Module *M=(Module*)module; > const TargetMachineRegistry::Entry* entry= > TargetMachineRegistry::getClosestStaticTargetForModule( *M, err1 ); > TargetMachine &target=*entry->CtorFn( *M, "" ); > [...
2018 Sep 12
2
How to make LLVM go faster?
...lder->populateFunctionPassManager(FPM); // Set up the per-module pass manager. legacy::PassManager MPM; MPM.add(createTargetTransformInfoWrapperPass(target_machine->getTargetIRAnalysis())); PMBuilder->populateModulePassManager(MPM); // Set output pass. TargetMachine::CodeGenFileType ft; if (output_type != ZigLLVM_EmitLLVMIr) { switch (output_type) { case ZigLLVM_EmitAssembly: ft = TargetMachine::CGFT_AssemblyFile; break; case ZigLLVM_EmitBinary: ft = TargetMachine::CGFT_ObjectFile;...
2016 Mar 08
11
Deleting function IR after codegen
Hi all After codegen for a given function, the IR should no longer be needed. In the AsmPrinter we convert from MI->MCInstr, and then we never go back and look at the IR during the MC layer. I’ve prototyped a simple pass which can be (optionally) scheduled to do just this. It is added at the end of addPassesToEmitFile. It is optional so that clang can continue to leak the IR with
2012 Jul 16
3
[LLVMdev] RFC: LLVM incubation, or requirements for committing new backends
...gt; +} > + > +AMDGPUTargetMachine::~AMDGPUTargetMachine() > +{ > +} > + > +bool AMDGPUTargetMachine::addPassesToEmitFile(PassManagerBase &PM, > + formatted_raw_ostream &Out, > + CodeGenFileType FileType, > + bool DisableVerify, > + AnalysisID StartAfter, > + AnalysisID StopAfter) { > + // XXX: Hack here addPassesToEmitFile will fail, but this...