search for: getcloseststatictargetformodule

Displaying 8 results from an estimated 8 matches for "getcloseststatictargetformodule".

2008 Oct 07
2
[LLVMdev] Getting target machine specific information at run-time
...ich is still acceptable. I almost implemented this solution, but I have problems accessing the architecture dependent bits of the Module, i.e. TargetMachine objects specific for the current architecture, as selected by the --march option of the compiler. I tried using the getClosestTargetForJIT and getClosestStaticTargetForModule functions of the TargetMachineRegistry class. But all that was without success. I always get back only X86-based targets (which is the target architecture of my development machine) even though I explicitly select another target for cross-compilation by doing --march=sparc or --march=alpha. Coul...
2008 May 28
1
[LLVMdev] Asm output while executing
...ssertion `Fn->getAnnotation(MF_AID) == 0 && "Object already exists for this function!"' failed. ********** The code I use: /// The asm code output std::string Err; const llvm::TargetMachineRegistry::entry* MArch = llvm::TargetMachineRegistry::getClosestStaticTargetForModule(*_module,Err); std::string FeaturesStr; std::auto_ptr<llvm::TargetMachine>target(MArch->CtorFn(*_module,FeaturesStr)); assert(target.get() && "Could not allocate target machine!"); llvm::TargetMachine &Target = *target.get(); llvm::Fun...
2007 Jan 22
2
[LLVMdev] addPassesToEmit(Whole)File changes?
.... 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]; std::ostream *outStream = 0; PassManager passes; outStream = new std::ofstream( [filename fileSystemRepresentation] ); TargetData *data =new TargetData( *target.getTargetData()); passes...
2007 Jan 22
0
[LLVMdev] addPassesToEmit(Whole)File changes?
.... 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]; std::ostream *outStream = 0; PassManager passes; outStream = new std::ofstream( [filename fileSystemRepresentation] ); TargetData *data =new TargetData( *target.getTargetData()); passes...
2007 Nov 08
3
[LLVMdev] Newbie JITter
...<< "parse error: " << ParseErr.getMessage() << "\n"; return 1; } std::cout << "\nWe just constructed this LLVM module:\n\n" << *M; std::string MArchErr; const TargetMachineRegistry::entry* MArch = TargetMachineRegistry::getClosestStaticTargetForModule(*M, MArchErr); if (MArch == 0) { std::cerr << "error auto-selecting target for module '" << MArchErr << "'.\n"; return 1; } TargetMachine* target = MArch->CtorFn(*M, ""); assert(target && "Could not allocate...
2008 Oct 08
1
[LLVMdev] Getting target machine specific information at run-time
...ented this solution, but I have problems > > accessing the architecture dependent bits of the Module, i.e. TargetMachine > > objects specific for the current architecture, as selected by the --march > > option of the compiler. I tried using the getClosestTargetForJIT and > > getClosestStaticTargetForModule functions of the TargetMachineRegistry > > class. But all that was without success. I always get back only X86-based > > targets (which is the target architecture of my development machine) even > > though I explicitly select another target for cross-compilation by doing > >...
2007 Jan 22
0
[LLVMdev] addPassesToEmit(Whole)File changes?
...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]; > std::ostream *outStream = 0; > PassManager passes; > outStream = new std::ofstream( [filename fileSystemRepresentation] ); > TargetData *data =new TargetData( *ta...
2007 Nov 09
0
[LLVMdev] Newbie JITter
...t;< ParseErr.getMessage() << "\n"; > return 1; > } > > std::cout << "\nWe just constructed this LLVM module:\n\n" << *M; > > std::string MArchErr; > const TargetMachineRegistry::entry* MArch = > TargetMachineRegistry::getClosestStaticTargetForModule(*M, MArchErr); > if (MArch == 0) { > std::cerr << "error auto-selecting target for module '" << > MArchErr << "'.\n"; > return 1; > } > > TargetMachine* target = MArch->CtorFn(*M, ""); > assert(targe...