search for: cgft_assemblyfile

Displaying 20 results from an estimated 29 matches for "cgft_assemblyfile".

2016 Feb 22
2
raw_pwrite_stream to string or stdout?
TargetMachine::CGFT_AssemblyFile is exactly what I am trying to write out. Frank On 02/22/2016 11:06 AM, Rafael EspĂ­ndola wrote: > On 19 February 2016 at 16:16, Frank Winter via llvm-dev > <llvm-dev at lists.llvm.org> wrote: >> TargetMachine::addPassesToEmitFile(..) >> requires as its 2nd argument an raw...
2016 Feb 19
3
raw_pwrite_stream to string or stdout?
TargetMachine::addPassesToEmitFile(..) requires as its 2nd argument an raw_pwrite_stream. Is it possible to create such a thing which either writes into a standard string or streams to outs() ? Thanks,
2016 May 04
2
raw_pwrite_stream on a non-fixed-size buffer?
...et access to the assembler of a jit-compiled function/module using llvm 3.8 and later. In 3.8 the interface to addPassesToEmitFile has changed and my old method doesn't work any more. In principle one gets the asm with targetMachine->addPassesToEmitFile( PM , *OS , llvm::TargetMachine::CGFT_AssemblyFile ) where *OS is a raw_pwrite_stream. The problem is that I only find use cases of raw_pwrite_stream where the derived class raw_svector_ostream is initialized on a SmallString, like SmallString<128> Str; raw_svector_ostream OS(Str); However, the assembler of the modules could be arbitrary...
2016 Aug 09
2
[LTO] Bypass the integrated assembler ...
Hi Guys , We enabled the LTO on our code base and found that LTO uses the integrated/builtin assembler to emit the final optimized code .O (FileType= CGFT_ObjectFile) . Can we bypass this semantic ,for something like you emit .S file (FileType=CGFT_AssemblyFile), Then we pass this .S file to our native assembler and the linker .....any switch/ options do so ? i.e something like as we have "-no-integrated-as" for clang driver . Currently ,we thought of hacking the LTOCodeGenerator.cpp for the same . The bottom-line is that ,we need to u...
2012 Apr 29
0
[LLVMdev] [PATCH][RFC] Add llvm.codegen Intrinsic To Support Embedded LLVM IR Code Generation
...ace. I mainly asked Yabin to provide a version that addresses concerns raised by Justin, to give further reviewers an up to date version to look at. With your comment, you actually pointed out a bug. Instead of: Target->addPassesToEmitFile(PM, FOS, TargetMachine::CGFT_AssemblyFile, CodeGenOpt::Default) We should use: bool UseVerifier = true; Target->addPassesToEmitFile(PM, FOS, TargetMachine::CGFT_AssemblyFile, UseVerifier) Though, I don't think that is the problem you where talki...
2012 Apr 29
3
[LLVMdev] [PATCH][RFC] Add llvm.codegen Intrinsic To Support Embedded LLVM IR Code Generation
On Apr 29, 2012, at 6:37 AM, Tobias Grosser wrote: > > OK, I get what you mean. The intrinsic is currently targeted at the > OpenCL/CUDA model. It is the most widely used. Stuff like cell sounds > interesting, but probably needs further thoughts. Even with OpenCL/CUDA, > this intrinsic works currently only for PTX code generation, but I hope > we can gain support for other
2013 Jan 07
0
[LLVMdev] How to output a .S *and* a .OBJ file?
...t; target(TheTarget->createTargetMachine(TheTriple->getTriple(),"","",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(...
2016 Aug 09
2
[LTO] Bypass the integrated assembler ...
...;> wrote: > Hi Guys , > > We enabled the LTO on our code base and found that LTO uses the > integrated/builtin assembler to emit the final optimized code .O > (FileType= CGFT_ObjectFile) . > > Can we bypass this semantic ,for something like you emit .S file > (FileType=CGFT_AssemblyFile), > > Then we pass this .S file to our native assembler and the linker > .....any switch/ options do so ? > > i.e something like as we have "-no-integrated-as" for clang driver . > > Currently ,we thought of hacking the LTOCodeGenerator.cpp for the same . &gt...
2016 Mar 23
2
Help with pass manager
...lt; "warning: ignoring -mc-relax-all because filetype != obj"; { raw_pwrite_stream *outstream = &objoutstream->os(); SmallVector<char, 0> filebuf; std::unique_ptr<raw_svector_ostream> BOS; if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { BOS = make_unique<raw_svector_ostream>(filebuf); outstream = BOS.get(); } AnalysisID StartBeforeID = nullptr; AnalysisID StartAfterID = nullptr; AnalysisID StopAfterID = nu...
2019 Aug 16
2
[ORC] [mlir] Dump assembly from OrcJit
...Probably not. std::string outStr; { llvm::legacy::PassManager pm; llvm::raw_string_ostream stream(outStr); llvm::buffer_ostream pstream(stream); targetMachine->addPassesToEmitFile(pm, pstream, nullptr, llvm::TargetMachine::CGFT_AssemblyFile); pm.run(*m); } llvm::errs() << "Assembly:\n" << outStr << "\n"; Thanks! Diego _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> https://lists.llvm.or...
2016 Mar 24
2
Help with pass manager
...bj"; >> >> { >> raw_pwrite_stream *outstream = &objoutstream->os(); >> >> SmallVector<char, 0> filebuf; >> std::unique_ptr<raw_svector_ostream> BOS; >> if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { >> BOS = make_unique<raw_svector_ostream>(filebuf); >> outstream = BOS.get(); >> } >> >> AnalysisID StartBeforeID = nullptr; >> AnalysisID Start...
2016 Mar 24
0
Help with pass manager
...ax-all because filetype != obj"; > > { > raw_pwrite_stream *outstream = &objoutstream->os(); > > SmallVector<char, 0> filebuf; > std::unique_ptr<raw_svector_ostream> BOS; > if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { > BOS = make_unique<raw_svector_ostream>(filebuf); > outstream = BOS.get(); > } > > AnalysisID StartBeforeID = nullptr; > AnalysisID StartAfterID = nullptr; >...
2016 Mar 24
2
Help with pass manager
...gt;>>> raw_pwrite_stream *outstream = &objoutstream->os(); >>>> >>>> SmallVector<char, 0> filebuf; >>>> std::unique_ptr<raw_svector_ostream> BOS; >>>> if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { >>>> BOS = make_unique<raw_svector_ostream>(filebuf); >>>> outstream = BOS.get(); >>>> } >>>> >>>> AnalysisID StartBeforeID = nu...
2016 Mar 24
0
Help with pass manager
...>>> { >>> raw_pwrite_stream *outstream = &objoutstream->os(); >>> >>> SmallVector<char, 0> filebuf; >>> std::unique_ptr<raw_svector_ostream> BOS; >>> if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { >>> BOS = make_unique<raw_svector_ostream>(filebuf); >>> outstream = BOS.get(); >>> } >>> >>> AnalysisID StartBeforeID = nullptr; >>>...
2016 Mar 24
2
Help with pass manager
...te_stream *outstream = &objoutstream->os(); >>>>>> >>>>>> SmallVector<char, 0> filebuf; >>>>>> std::unique_ptr<raw_svector_ostream> BOS; >>>>>> if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { >>>>>> BOS = make_unique<raw_svector_ostream>(filebuf); >>>>>> outstream = BOS.get(); >>>>>> } >>>>>> >>>>>&g...
2016 Mar 24
0
Help with pass manager
...raw_pwrite_stream *outstream = &objoutstream->os(); >>>>> >>>>> SmallVector<char, 0> filebuf; >>>>> std::unique_ptr<raw_svector_ostream> BOS; >>>>> if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { >>>>> BOS = make_unique<raw_svector_ostream>(filebuf); >>>>> outstream = BOS.get(); >>>>> } >>>>> >>>>> AnalysisI...
2012 Mar 01
2
[LLVMdev] Is there any way to print assembly code of a function compiled by ExecutionEngine?
Hello! I'm using LLVM's JIT in my project. Is there any way to view assembly code of functions it generates without disassembling them from the memory?
2016 Feb 22
2
raw_pwrite_stream to string or stdout?
...e that raw_fd_ostream is not seekable, and hence will not be suitable as addPassesToEmitFile output stream. 2016-02-22 18:27 GMT+02:00 Rafael EspĂ­ndola <llvm-dev at lists.llvm.org>: > On 22 February 2016 at 11:16, Frank Winter <fwinter at jlab.org> wrote: > > TargetMachine::CGFT_AssemblyFile is exactly what I am trying to write > out. > > I see. > > For that I think we should be able to just change outs() to return a > raw_fd_ostream. It is already implemented with one anyway. > > Cheers, > Rafael > _______________________________________________ > LLVM...
2016 Mar 24
2
Help with pass manager
...utstream->os(); >>>>>>>> >>>>>>>> SmallVector<char, 0> filebuf; >>>>>>>> std::unique_ptr<raw_svector_ostream> BOS; >>>>>>>> if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { >>>>>>>> BOS = make_unique<raw_svector_ostream>(filebuf); >>>>>>>> outstream = BOS.get(); >>>>>>>> } >>>>>>>>...
2016 Mar 24
0
Help with pass manager
...ream = &objoutstream->os(); >>>>>>> >>>>>>> SmallVector<char, 0> filebuf; >>>>>>> std::unique_ptr<raw_svector_ostream> BOS; >>>>>>> if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { >>>>>>> BOS = make_unique<raw_svector_ostream>(filebuf); >>>>>>> outstream = BOS.get(); >>>>>>> } >>>>>>> >&g...