Displaying 20 results from an estimated 22 matches for "initializeallasmparsers".
2013 Dec 09
0
[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 information about the PTX target can be found at:
http://llvm.org/docs/NVPTXUsage.html
On...
2013 Feb 18
1
[LLVMdev] [llvm-c] Proposal: Make LLVMInitializeNativeTarget and co. non-inline
...ne, 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 ()
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:
2017 Nov 28
2
TargetSelect.h and layering
...nitions in TargetSelect.h out of line to
flush out/prove the dependencies were right).
A few problems:
It seems there are users of TargetSelect.h that want pretty much every
granular split of the functionality possible. For example:
* Some executables only depend on the asm parsers and only call
InitializeAllAsmParsers (similarly for any other All*) - see the various
AllTargetsAsmParsers and similar rules in cmake/modules/LLVM-Config.cmake
* Some executables depend only on the native target support
InitializeNativeTarget* functions - see the JIT tests and the "native" and
"nativecodegen" rules...
2013 Dec 09
1
[LLVMdev] PTX generation examples?
...X 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 b...
2016 May 17
3
External function resolution: MCJIT vs ORC JIT
...ec.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<llvm::ExecutionEngine> EE;
typed...
2016 May 21
1
Using an MCStreamer Directly to produce an object file?
...So, I'd like to be able to use a MCStreamer object directly to make some
output file, and object ".o" would be just fine to start with.
I seem to be able to create an aarch64 target without too much issue:
llvm::InitializeAllTargetInfos();
llvm::InitializeAllTargetMCs();
llvm::InitializeAllAsmParsers();
llvm::InitializeAllDisassemblers();
std::string Error;
std::string TripleName("aarch64-unknown-linux-gnu");
Triple TheTriple(Triple::normalize(TripleName));
const Target *TheTarget = TargetRegistry::lookupTarget(TripleName,
Error);
if (!TheTarget) {
std::cerr <<...
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);
initializeLoopStrengthReducePass(*Registry);...
2013 Jan 07
0
[LLVMdev] How to output a .S *and* a .OBJ file?
...tachment 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 std::string Err;
const Tar...
2016 Mar 24
0
Help with pass manager
...i.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);
> initializeCodeGen(*Registry);
> initializeL...
2016 Mar 24
2
Help with pass manager
...te:
>
>> 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(*Regis...
2016 May 19
2
External function resolution: MCJIT vs ORC JIT
...he 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<llvm::Executio...
2016 Mar 24
0
Help with pass manager
...ay 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 Mar 30
1
Help with pass manager
...is 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(*Regist...
2020 May 16
2
Building A Project Against LLVM
I'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 manag...
2016 May 20
0
External function resolution: MCJIT vs ORC JIT
...> 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:...
2016 May 22
1
External function resolution: MCJIT vs ORC JIT
...t; 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_p...
2016 May 23
0
Using an MCStreamer Directly to produce an object file?
2016 Mar 24
0
Help with pass manager
Update:
Sorry my bad. I built llvm and tried it with debugging version.
It was an assertion (IR/LegacyPassManager.cpp:764) saying that it expects all immutable passes to be initialized.
> On Mar 24, 2016, at 2:00 AM, Lorenzo Laneve <lore97drk at icloud.com> wrote:
>
> I’m using LLVM 3.8.0, and no, it’s the precompiled version
> That’s why it doesn’t give me enough info for
2016 Mar 24
2
Help with pass manager
I’m using LLVM 3.8.0, and no, it’s the precompiled version
That’s why it doesn’t give me enough info for debug
> On 24 Mar 2016, at 1:53 AM, Mehdi Amini <mehdi.amini at apple.com> wrote:
>
> This code path is not likely to crash usually. Did you build LLVM yourself? Which version are you using and can you reduce the test case to be "minimal" so that someone can