search for: initializeallasmprinters

Displaying 20 results from an estimated 25 matches for "initializeallasmprinters".

2013 Dec 09
0
[LLVMdev] PTX generation examples?
...n load into the CUDA runtime. As for determining if PTX support is compiled into the LLVM binary you are using, you could register all targets and then check if you can create a Target for the "nvptx" or "nvptx64" triple: InitializeAllTargets(); InitializeAllTargetMCs(); InitializeAllAsmPrinters(); InitializeAllAsmParsers(); std::string Err; const Target *Tgt = TargetRegistry::lookupTarget("nvptx64", Err); if (Tgt) { // nvptx target is available } else { // nvptx target is not available } More information about the PTX target can be found at: http://llvm.or...
2013 Feb 18
1
[LLVMdev] [llvm-c] Proposal: Make LLVMInitializeNativeTarget and co. non-inline
...is why I propose to make them non-inline, normal functions that get declared in their current header and defined in lib/IR/Core.cpp. The list of functions affected by this is: void llvm::InitializeAllTargetInfos () void llvm::InitializeAllTargets () void llvm::InitializeAllTargetMCs () void llvm::InitializeAllAsmPrinters () void llvm::InitializeAllAsmParsers () void llvm::InitializeAllDisassemblers () bool llvm::InitializeNativeTarget () bool llvm::InitializeNativeTargetAsmPrinter () bool llvm::InitializeNativeTargetAsmParser () bool llvm::InitializeNativeTargetDisassembler ()
2018 Mar 19
1
How to link against all available targets - problems with NVPTX?
...I try to compile my program, I get linker errors: CMakeFiles/sxhc.dir/src/main.cpp.o: In function `llvm::InitializeAllTargets()': /home/bollu/.local/include/llvm/Config/Targets.def:27: undefined reference to `LLVMInitializeNVPTXTarget' CMakeFiles/sxhc.dir/src/main.cpp.o: In function `llvm::InitializeAllAsmPrinters()': /home/bollu/.local/include/llvm/Config/AsmPrinters.def:28: undefined reference to `LLVMInitializeNVPTXAsmPrinter' collect2: error: ld returned 1 exit status CMakeFiles/sxhc.dir/build.make:285: recipe for target 'sxhc' failed make[2]: *** [sxhc] Error 1 CMakeFiles/Makefile2:131:...
2013 Dec 06
2
[LLVMdev] PTX generation examples?
OK, fine -- an example of MCJIT that sets up for PTX JIT would also be helpful. On Dec 6, 2013, at 12:32 PM, Eli Bendersky <eliben at google.com> wrote: > > You'll have to switch to MCJIT for this purpose. Legacy JIT doesn't emit PTX. > > Eli -- Larry Gritz lg at larrygritz.com -------------- next part -------------- An HTML attachment was scrubbed... URL:
2013 Dec 09
1
[LLVMdev] PTX generation examples?
...> > As for determining if PTX support is compiled into the LLVM binary you are using, you could register all targets and then check if you can create a Target for the "nvptx" or "nvptx64" triple: > > InitializeAllTargets(); > InitializeAllTargetMCs(); > InitializeAllAsmPrinters(); > InitializeAllAsmParsers(); > > std::string Err; > const Target *Tgt = TargetRegistry::lookupTarget("nvptx64", Err); > if (Tgt) { > // nvptx target is available > } else { > // nvptx target is not available > } > > > More info...
2016 May 17
3
External function resolution: MCJIT vs ORC JIT
...{ std::vector<T> Vec; Vec.push_back(std::move(t)); return Vec; } /// /// THIS is the function I want my IR to call /// extern "C" { float sqr (float x) { return x*x; } } void simple () { llvm::InitializeAllTargets(); llvm::InitializeAllTargetMCs(); llvm::InitializeAllAsmPrinters(); llvm::InitializeAllAsmParsers(); llvm::LLVMContext Context; std::unique_ptr<llvm::TargetMachine> TM (llvm::EngineBuilder().selectTarget()); std::unique_ptr<llvm::DataLayout> DL; DL.reset (new llvm::DataLayout (TM->createDataLayout())); std::unique_ptr<ll...
2016 Mar 24
2
Help with pass manager
You may want to try adding this code (copy/pasted from llc.cpp): // Initialize targets first, so that --version shows registered targets. InitializeAllTargets(); InitializeAllTargetMCs(); InitializeAllAsmPrinters(); InitializeAllAsmParsers(); // Initialize codegen and IR passes used by llc so that the -print-after, // -print-before, and -stop-after options work. PassRegistry *Registry = PassRegistry::getPassRegistry(); initializeCore(*Registry); initializeCodeGen(*Registry); initializeLoopStr...
2013 Jan 07
0
[LLVMdev] How to output a .S *and* a .OBJ file?
...part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130107/06c571c4/attachment.html> -------------- next part -------------- // Initialize targets first, so that --version shows registered targets. InitializeAllTargets(); InitializeAllAsmPrinters(); InitializeAllAsmParsers(); Triple *TheTriple = NULL; if ( DoMingw ) { TheTriple = new Triple("i686-pc-mingw32"); } else { TheTriple = new Triple("i686-pc-win32"); } Assert(!TheTriple->getTriple().empty()) //TheTriple.setTriple(sys::getHostTriple()); 9...
2016 Mar 24
0
Help with pass manager
...6, at 6:07 PM, Mehdi Amini <mehdi.amini at apple.com> wrote: > > You may want to try adding this code (copy/pasted from llc.cpp): > > // Initialize targets first, so that --version shows registered targets. > InitializeAllTargets(); > InitializeAllTargetMCs(); > InitializeAllAsmPrinters(); > InitializeAllAsmParsers(); > > // Initialize codegen and IR passes used by llc so that the -print-after, > // -print-before, and -stop-after options work. > PassRegistry *Registry = PassRegistry::getPassRegistry(); > initializeCore(*Registry); > initializeCode...
2016 Mar 24
2
Help with pass manager
...to:mehdi.amini at apple.com>> wrote: > >> You may want to try adding this code (copy/pasted from llc.cpp): >> >> // Initialize targets first, so that --version shows registered targets. >> InitializeAllTargets(); >> InitializeAllTargetMCs(); >> InitializeAllAsmPrinters(); >> InitializeAllAsmParsers(); >> >> // Initialize codegen and IR passes used by llc so that the -print-after, >> // -print-before, and -stop-after options work. >> PassRegistry *Registry = PassRegistry::getPassRegistry(); >> initializeCore(*Registry...
2016 May 19
2
External function resolution: MCJIT vs ORC JIT
...; } > > > /// > /// THIS is the function I want my IR to call > /// > extern "C" { > float sqr (float x) { return x*x; } > } > > > void > simple () > { > llvm::InitializeAllTargets(); > llvm::InitializeAllTargetMCs(); > llvm::InitializeAllAsmPrinters(); > llvm::InitializeAllAsmParsers(); > llvm::LLVMContext Context; > std::unique_ptr<llvm::TargetMachine> TM (llvm::EngineBuilder().selectTarget()); > std::unique_ptr<llvm::DataLayout> DL; > DL.reset (new llvm::DataLayout (TM->createDataLayout()));...
2017 Apr 09
2
Possible stack corruption during call to JITSymbol::getAddress()
...ret_cast<int (*)()>(ptr); //int (*someFuncPtr)() = (int (*)())ptr; int returnValue = someFuncPtr(); std::cout << "Return value is: " << returnValue << "\n"; } int main(int argc, char **argv) { llvm::InitializeNativeTarget(); llvm::InitializeAllAsmPrinters(); try { runTest(); //NOTE: if LLVM is compiled without -DLLVM_USE_SANITIZER:STRING=Address, the last throw in runTest() does not cause //a SIGSEGV, however this throw will. //throw std::runtime_error("This should not crash but does anyway.");...
2016 Mar 24
0
Help with pass manager
...gt;> wrote: >> >>> You may want to try adding this code (copy/pasted from llc.cpp): >>> >>> // Initialize targets first, so that --version shows registered targets. >>> InitializeAllTargets(); >>> InitializeAllTargetMCs(); >>> InitializeAllAsmPrinters(); >>> InitializeAllAsmParsers(); >>> >>> // Initialize codegen and IR passes used by llc so that the -print-after, >>> // -print-before, and -stop-after options work. >>> PassRegistry *Registry = PassRegistry::getPassRegistry(); >>>...
2016 Mar 30
1
Help with pass manager
...>>>> You may want to try adding this code (copy/pasted from llc.cpp): >>>> >>>> // Initialize targets first, so that --version shows registered targets. >>>> InitializeAllTargets(); >>>> InitializeAllTargetMCs(); >>>> InitializeAllAsmPrinters(); >>>> InitializeAllAsmParsers(); >>>> >>>> // Initialize codegen and IR passes used by llc so that the -print-after, >>>> // -print-before, and -stop-after options work. >>>> PassRegistry *Registry = PassRegistry::getPassRegistr...
2020 May 16
2
Building A Project Against LLVM
...'ve managed to get 10.0.0 working now.. there were a couple things I had to adjust. The Kaleidoscope example had me doing this before creating the object file: llvm::InitializeAllTargetInfos(); llvm::InitializeAllTargets(); llvm::InitializeAllTargetMCs(); llvm::InitializeAllAsmParsers(); llvm::InitializeAllAsmPrinters(); It turns out I can get away with just this, since I'm not (yet) worried about targeting other machines: llvm::InitializeNativeTarget(); llvm::InitializeNativeTargetAsmPrinter(); Since "all" doesn't work anymore for some reason, I've managed to (through trial and error, gu...
2017 Apr 17
2
Possible stack corruption during call to JITSymbol::getAddress()
...int returnValue = someFuncPtr(); >> >> std::cout << "Return value is: " << returnValue << "\n"; >> >> } >> >> int main(int argc, char **argv) { >> >> llvm::InitializeNativeTarget(); >> llvm::InitializeAllAsmPrinters(); >> >> try { >> runTest(); >> >> //NOTE: if LLVM is compiled without -DLLVM_USE_SANITIZER:STRING=Address, >> the last throw in runTest() does not cause >> >> //a SIGSEGV, however this throw will. >> >>...
2016 May 20
0
External function resolution: MCJIT vs ORC JIT
...function I want my IR to call >> /// >> extern "C" { >> float sqr (float x) { return x*x; } >> } >> >> >> void >> simple () >> { >> llvm::InitializeAllTargets(); >> llvm::InitializeAllTargetMCs(); >> llvm::InitializeAllAsmPrinters(); >> llvm::InitializeAllAsmParsers(); >> llvm::LLVMContext Context; >> std::unique_ptr<llvm::TargetMachine> TM >> (llvm::EngineBuilder().selectTarget()); >> std::unique_ptr<llvm::DataLayout> DL; >> DL.reset (new llvm::DataLayout (...
2017 Apr 20
2
Possible stack corruption during call to JITSymbol::getAddress()
...std::cout << "Return value is: " << returnValue << "\n"; >>>> >>>> } >>>> >>>> int main(int argc, char **argv) { >>>> >>>> llvm::InitializeNativeTarget(); >>>> llvm::InitializeAllAsmPrinters(); >>>> >>>> try { >>>> runTest(); >>>> >>>> //NOTE: if LLVM is compiled without -DLLVM_USE_SANITIZER:STRING=Address, >>>> the last throw in runTest() does not cause >>>> >>>>...
2016 May 22
1
External function resolution: MCJIT vs ORC JIT
...nction I want my IR to call >> /// >> extern "C" { >> float sqr (float x) { return x*x; } >> } >> >> >> void >> simple () >> { >> llvm::InitializeAllTargets(); >> llvm::InitializeAllTargetMCs(); >> llvm::InitializeAllAsmPrinters(); >> llvm::InitializeAllAsmParsers(); >> llvm::LLVMContext Context; >> std::unique_ptr<llvm::TargetMachine> TM (llvm::EngineBuilder().selectTarget()); >> std::unique_ptr<llvm::DataLayout> DL; >> DL.reset (new llvm::DataLayout (TM->cr...
2017 May 01
1
Possible stack corruption during call to JITSymbol::getAddress()
...;< returnValue << "\n"; >>>>>> >>>>>> } >>>>>> >>>>>> int main(int argc, char **argv) { >>>>>> >>>>>> llvm::InitializeNativeTarget(); >>>>>> llvm::InitializeAllAsmPrinters(); >>>>>> >>>>>> try { >>>>>> runTest(); >>>>>> >>>>>> //NOTE: if LLVM is compiled without -DLLVM_USE_SANITIZER:STRING=Address, >>>>>> the last throw in runTest() does no...