search for: gettargetdata

Displaying 20 results from an estimated 108 matches for "gettargetdata".

2006 May 13
1
[LLVMdev] TargetMachine::getTargetData
Hi, in LLVM CVS the above methods returns pointer to TargetData. It used to return a reference before. What is semantic of 0 return value? Or returning 0 is always a bug? If so, why pointer, and not reference is returned? Thanks, Volodya
2009 Feb 19
0
[LLVMdev] Possible DAGCombiner or TargetData Bug
...if (Value.getOpcode() == ISD::BIT_CONVERT && !ST->isTruncatingStore() && ST->isUnindexed()) { - unsigned Align = ST->getAlignment(); + unsigned OrigAlign = ST->getAlignment(); MVT SVT = Value.getOperand(0).getValueType(); - unsigned OrigAlign = TLI.getTargetData()-> + unsigned Align = TLI.getTargetData()-> getABITypeAlignment(SVT.getTypeForMVT()); if (Align <= OrigAlign && ((!LegalOperations && !ST->isVolatile()) || Does that look right to you? Dan On Wed, February 18, 2009 4:49 pm, David Greene wrote:...
2009 Feb 19
3
[LLVMdev] Possible DAGCombiner or TargetData Bug
...does not need a higher alignment than the original. if (Value.getOpcode() == ISD::BIT_CONVERT && !ST->isTruncatingStore() && ST->isUnindexed()) { unsigned Align = ST->getAlignment(); MVT SVT = Value.getOperand(0).getValueType(); unsigned OrigAlign = TLI.getTargetData()-> getABITypeAlignment(SVT.getTypeForMVT()); if (Align <= OrigAlign && ((!LegalOperations && !ST->isVolatile()) || TLI.isOperationLegalOrCustom(ISD::STORE, SVT))) return DAG.getStore(Chain, N->getDebugLoc(), Value.getOperand(0),...
2008 Dec 02
1
[LLVMdev] Kaleidoscope tutorial failed at Chapter 4...
...ge. (I am using visual studio 2005 ) However, when I tried to input some code in the command line window, the sample program crashed. And the Visual Studio 2005 debugger told me that "Access violation reading location 0x00000008." And then it jumped to the code: " const TargetData *getTargetData() const { return TD; }" Actually, these codes are suspicous: TheExecutionEngine = ExecutionEngine::create(TheModule); // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. OurFPM.add(new TargetData(*TheExecutionEngine->getTar...
2010 Feb 17
1
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...cent run: >> >> (gdb) run >> Starting program: /home/rovitotv/prog/llvm-tutorial/toy4 >> [Thread debugging using libthread_db enabled] >> ready> 4+5; >> >> Program received signal SIGSEGV, Segmentation fault. >> 0x080524f0 in llvm::ExecutionEngine::getTargetData (this=0x0) >>    at >> /home/rovitotv/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h:167 >> 167       const TargetData *getTargetData() const { return TD; } >> Missing separate debuginfos, use: debuginfo-install glibc-2.11-2.i686 >> libgcc-4.4.2-7.fc12.i686 libstd...
2009 Feb 20
2
[LLVMdev] Possible DAGCombiner or TargetData Bug
...= ISD::BIT_CONVERT && !ST->isTruncatingStore() && > ST->isUnindexed()) { > - unsigned Align = ST->getAlignment(); > + unsigned OrigAlign = ST->getAlignment(); > MVT SVT = Value.getOperand(0).getValueType(); > - unsigned OrigAlign = TLI.getTargetData()-> > + unsigned Align = TLI.getTargetData()-> > getABITypeAlignment(SVT.getTypeForMVT()); > if (Align <= OrigAlign && > ((!LegalOperations && !ST->isVolatile()) || > > Does that look right to you? Yes, and it fixes the problem....
2008 Aug 15
3
[LLVMdev] Problems understanding alias analysis validation logic
...ted by another pass, and never rerun. My understanding from reading the documentation is that when a pass gets invalidated, it should be rerun before any other passes that requires it. Here is a simple example of the problem I am seeing: PassManager passManager; passManager.add(new TargetData(getTargetData())); passManager.add(createAndersensPass()); passManager.add(createIPSCCPPass()); passManager.add(createGVNPass()); <----will use BasicAA not Andersens ... In this case, I would expect that the GVN pass would use the andersen AA results, but it doesn't; it uses the results from a Basic...
2007 Jan 22
2
[LLVMdev] addPassesToEmit(Whole)File changes?
...sestStaticTargetForModule( *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.add(data); target.addPassesToEmitFile(passes, *outStream, FileType, false); passes.run(*M); delete outStream; }
2008 Jan 25
1
[LLVMdev] Something about the andersens pass
...load the library as a module, and generate some functions that call the llvm-g++ compiled code. 3) I aggressively inline my generated code with a function pass manager, and end up with a monster function. 4) I run the following pass: { PassManager PM; PM.add(new TargetData(*EE->getTargetData())); PM.add(createInstructionCombiningPass()); PM.run(*qModule); } I then run another pass: PassManager PM; PM.add(new TargetData(*EE->getTargetData())); PM.add(createVerifierPass()); //PM.add(createAndersensPass()); // Seems to break dynamic casts in combo with load...
2010 Feb 17
0
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...> sample gdb output from a recent run: > > (gdb) run > Starting program: /home/rovitotv/prog/llvm-tutorial/toy4 > [Thread debugging using libthread_db enabled] > ready> 4+5; > > Program received signal SIGSEGV, Segmentation fault. > 0x080524f0 in llvm::ExecutionEngine::getTargetData (this=0x0) > at > /home/rovitotv/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h:167 > 167 const TargetData *getTargetData() const { return TD; } > Missing separate debuginfos, use: debuginfo-install glibc-2.11-2.i686 > libgcc-4.4.2-7.fc12.i686 libstdc++-4.4.2-7.fc12.i68...
2010 Feb 17
2
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...ression 4+5; I get a seg fault :-( Here is sample gdb output from a recent run: (gdb) run Starting program: /home/rovitotv/prog/llvm-tutorial/toy4 [Thread debugging using libthread_db enabled] ready> 4+5; Program received signal SIGSEGV, Segmentation fault. 0x080524f0 in llvm::ExecutionEngine::getTargetData (this=0x0) at /home/rovitotv/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h:167 167 const TargetData *getTargetData() const { return TD; } Missing separate debuginfos, use: debuginfo-install glibc-2.11-2.i686 libgcc-4.4.2-7.fc12.i686 libstdc++-4.4.2-7.fc12.i686 (gdb) bt #0 0x080524f0 in...
2010 Nov 15
6
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
...ot; after "Function *F = Function::Create(FT, Function::ExternalLinkage, Name, TheModule)". The passes it sets up are: // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData())); // Do simple "peephole" optimizations and bit-twiddling optzns. OurFPM.add(createInstructionCombiningPass()); // Reassociate expressions. OurFPM.add(createReassociatePass()); // Eliminate Common SubExpressions. OurFPM.add(createGVNPass()); // Simplify the control flow g...
2011 Mar 14
2
[LLVMdev] How to load a data from the address of unsiged long type
...; a = new BitCastInst(a, PointerType::get(XgetType(Int32Ty), 0), "", bb); Value* data = new LoadInst(addr, "", false, bb); Error: Bitcast requires types of same width 3. Code: Type const *intptr_type = cpu->dyncom_engine->exec_engine->getTargetData()->getIntPtrType(_CTX()); Value* ptr = new IntToPtrInst(a, intptr_type, "", bb); Value* data = new LoadInst(ptr, "", false, bb); Error: Segmentation fault Any person can give me some hints for my case? Thanks MK -- www.skyeye.org
2007 Jan 22
0
[LLVMdev] addPassesToEmit(Whole)File changes?
...some global data. The proper incantations can be found in tools/llc/llc.cpp. You should do something like this: // Build up all of the passes that we want to do to the module. FunctionPassManager Passes(new ExistingModuleProvider(M.get())); Passes.add(new TargetData(*Target.getTargetData())); // Ask the target to add backend passes as necessary. if (Target.addPassesToEmitFile(Passes, *Out, FileType, Fast)) { std::cerr << argv[0] << ": target does not support generation of this" << " file type!\n";...
2011 Mar 26
2
[LLVMdev] How to read memory data througn adress of unsigned long
...##### Value* data = new LoadInst(addr, "", false, bb); encounter segmentation fault. ######################## I also try to use IntToPtrInstr to do some transform as the following: ################################ Type const *intptr_type = cpu->dyncom_engine->exec_engine->getTargetData()->getIntPtrType(_CTX()); Value* ptr = new IntToPtrInst(v, intptr_type, "", bb); Value* data = new LoadInst(ptr, "", false, bb); ######################################## still encounter segmentation fault Any person can give me some hints for my case? Thanks...
2012 Jan 12
4
[LLVMdev] How to pass an array to a function using GenericValue
Hi, My application generates some LLVM assembly code which I then convert to IR code using ParseAssemblyString. If I have the following LLVM assembly code: define double @test() { ret double 1.230000e+02 } then, using ExecutionEngine::runFunction, I get a GenericValue return value which DoubleVal property is indeed equal to 123. So, all is fine there. However, if I have the
2011 Nov 04
2
[LLVMdev] Question on JIT optimizations
...e LLVM environment? Thank you for any help. And thank you for this great tool. Brent FunctionPassManager OurFPM(TheModule); // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData())); // Provide basic AliasAnalysis support for GVN. OurFPM.add(createBasicAliasAnalysisPass()); // Do simple "peephole" optimizations and bit-twiddling optzns. OurFPM.add(createInstructionCombiningPass()); // Reassociate expressions. OurFPM.add(createReassociatePass()); //...
2012 Feb 20
1
[LLVMdev] ARM opcode format
..."llvm/Transforms/Scalar.h" #include <memory> using namespace llvm; ... ... ... // Build up all of the passes that we want to do to the module. // PassManager PM; // Add the target data from the target machine, if it exists, or the module. //if (const TargetData *TD = Target.getTargetData()) // PM.add(new TargetData(*TD)); //else // PM.add(new TargetData(&mod)); // Override default to generate verbose assembly. //Target.setAsmVerbosityDefault(true); //if (RelaxAll) { // if (FileType != TargetMachine::CGFT_ObjectFile) // errs() << argv[0] //...
2009 Jun 17
3
[LLVMdev] Segmentation fault - Kaleidoscope
...ils using gdb: ********************************* [New Thread 0xb7ca96c0 (LWP 9948)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb7ca96c0 (LWP 9948)] 0x0804e914 in main () at /usr/local/include/llvm/ExecutionEngine/ExecutionEngine.h:142 142 const TargetData *getTargetData() const { return TD; } -- Juan Carlos -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090617/0657143f/attachment.html>
2010 Mar 18
1
[LLVMdev] Turning on/off sub-target features (e.g. Altivec on PowerPC)
...rt on (and off, I need both cases) from the code? Some info: Mono's utilizes LLVM in this way: LLVMInitializePowerPCTarget (); LLVMInitializePowerPCTargetInfo (); ExecutionEngine *EE = ExecutionEngine::createJIT ( ... ); fpm = new FunctionPassManager ( ... ); fpm->add(new TargetData(*EE->getTargetData())); and then uses ExecutionEngine object for compiling functions. -- Regards, Sergei Dyshel -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100318/5ad4ef49/attachment.html>