similar to: [LLVMdev] how to get TargetData?

Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] how to get TargetData?"

2010 May 28
0
[LLVMdev] how to get TargetData?
For those targets supported by LLVM, you can get their TargetData by creating TargetMachine first (take X86 as example): ==== BEGIN CODE SNIPPET ==== const std::string TripleStr = "i686-unknown-linux"; // hard coded for example const std::string FeatureStr = ""; // hard coded for example std::string Err; const Target* T; TargetMachine* TM = NULL; const
2010 May 28
0
[LLVMdev] how to get TargetData?
Victor Zverovich wrote: > Dear all > > I am trying to get the size of an LLVM pointer type. > getPrimitiveSizeInBits() returns 0 for it and the documentation for > isSized() suggest to use TargetData. > I figured out from Kaleidoscope example that one can get a pointer to > TagetData object through the execution engine but it seems to be an > overkill. > What is the
2004 Dec 03
1
[Fwd: [LLVMdev] GetElementPtr for packed types and VS build]
This needs to be applied as well. Thanks, Reid. -----Forwarded Message----- > From: Morten Ofstad <morten at hue.no> > To: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu> > Subject: [LLVMdev] GetElementPtr for packed types and VS build > Date: Wed, 01 Dec 2004 15:10:49 +0100 > > As I was working with packed types it became apparent that I sometimes >
2009 Jun 29
1
[LLVMdev] Type get size
I am trying to get the address ranges that are allocated by the global variable list of a module. I cannot seem to find an easy way to get the size of a global variable. That is, if the C source looks like: int a[3]; then printing the description of the type of this global looks like: [3 x i32]* Is there some nice way to get "3 words" or "12 bytes" from the above example?
2009 Nov 04
2
[LLVMdev] DenseMap iterator constness fix
Good catch! I meant "for iterator" of course. Attached is a corrected patch together with an old patch for clang just to keep them together. Could someone commit these, please? Thanks, Victor 2009/11/4 Jeffrey Yasskin <jyasskin at google.com> > + // Otherwise this is a copy constructor for const_iterator. > > Do you mean "for iterator"? > > Otherwise,
2009 Nov 09
0
[LLVMdev] DenseMap iterator constness fix
Reminding about the patches... Is there a problem with them or simply nobody have looked at them since? Victor 2009/11/4 Victor Zverovich <victor.zverovich at googlemail.com> > Good catch! I meant "for iterator" of course. Attached is a corrected patch > together with an old patch for clang just to keep them together. > Could someone commit these, please? > >
2015 Jul 08
3
[LLVMdev] The Trouble with Triples
> Another very annoying fact is that the Clang driver re-parses triples many > times, and sometimes they change the triple based on a CPU, and then end > up with a different CPU. I’ve recently been tasked with cleaning this up. Before starting on this full gusto, I want to make sure I’m not stepping on any toes or duplicating work. The rough plan is as follows; 1. Replace the call to
2012 Oct 24
3
[LLVMdev] TargetData class?
Micah, can you document this in the release notes? On Wed, Oct 24, 2012 at 4:34 PM, Eli Friedman <eli.friedman at gmail.com> wrote: > On Wed, Oct 24, 2012 at 4:11 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: >> Has this been removed/replaced? Couldn't find anything in the release notes. > > Renamed DataLayout. > > -Eli >
2014 May 13
4
[LLVMdev] Problems in instrumentation
Hi everyone, I have some trouble in instrumenting load instructions. I want to instrument load instructions as follow: Firstly, I judge whether the loaded pointer(*any type is possible*) is NULL. If so, I want to explicitly allocate the corresponding address space of its type to the pointer. For example, in source code level I want to translate the next statement *p = 1; into the next
2012 Oct 25
1
[LLVMdev] TargetData class?
LGTM for this bit. On Oct 25, 2012 7:52 AM, "Villmow, Micah" <Micah.Villmow at amd.com> wrote: > Here is my patch for it: > Index: ReleaseNotes.html > =================================================================== > --- ReleaseNotes.html (revision 166627) > +++ ReleaseNotes.html (working copy) > @@ -669,6 +669,9 @@ > "TargetTransformInfo"
2009 Nov 04
2
[LLVMdev] DenseMap iterator constness fix
Hi Jeffrey, You are right that the generated copy constructor is used for const_iterator. I have added a comment clarifying this. Also I have added the tests you suggested and corrected the comparison operators. Please find attached the updated patches. Best regards, Victor 2009/11/3 Jeffrey Yasskin <jyasskin at google.com> > +template <bool, typename True, typename False> >
2012 Feb 15
2
[LLVMdev] Wrong AliasAnalysis::getModRefInfo result
Just want to test out the LLVM's AliasAnalysis::getModRefInfo API. The input C code is very simple: void foo(int *a, int *b) { for(int i=0; i<10; i++) b[i] = a[i]*a[i]; } int main() { int a[10]; int b[10]; for(int i=0; i<10; i++) a[i] = i; foo(a,b); return 0; } Obviously, for "foo", it only reads from array "a" and only writes to array
2012 Oct 25
0
[LLVMdev] TargetData class?
Here is my patch for it: Index: ReleaseNotes.html =================================================================== --- ReleaseNotes.html (revision 166627) +++ ReleaseNotes.html (working copy) @@ -669,6 +669,9 @@ "TargetTransformInfo" provides a number of low-level interfaces. LSR and LowerInvoke already use the new interface. </p> +<p> The TargetData structure
2009 Nov 04
2
[LLVMdev] DeadStoreElimination: do better without TargetData
The attached patch makes DeadStoreElimination able to remove stores in store-store dependencies when the operand types are equal, even if there is no TargetData available. / Hans -------------- next part -------------- A non-text attachment was scrubbed... Name: DeadStoreElimination.patch Type: text/x-patch Size: 812 bytes Desc: not available URL:
2009 Jun 15
4
[LLVMdev] runtime library for jitted code
Albert Graef <Dr.Graef at t-online.de> writes: > Victor Zverovich wrote: >> I am considering a possibility of using LLVM JIT for an algebraic >> modelling language. I have already done some prototyping following the >> Kaleidoscope tutorial and currently thinking of how to connect the >> jitted code to a runtime library (for this language) which I would like
2009 Nov 04
0
[LLVMdev] DenseMap iterator constness fix
+ // Otherwise this is a copy constructor for const_iterator. Do you mean "for iterator"? Otherwise, looks good to me. If you can commit this, please do. Otherwise, someone else should as I'm not going to be around tomorrow. On Wed, Nov 4, 2009 at 12:27 AM, Victor Zverovich <victor.zverovich at googlemail.com> wrote: > Hi Jeffrey, > You are right that the generated
2009 Oct 20
3
[LLVMdev] Dereference PointerType?
Hello, I'm wondering if it's possible to dereference a PointerType. I have an AllocaInst and although I can find the number of elements allocated, (using Instruction::getOperand(0)), I can't find a way to get the size of each element. What I'd like to do is: AllocaInst *alloca; PointerType *ptr_type = dynamic_cast<PointerType*>(alloca); assert(ptr_type); Type
2009 Jun 16
0
[LLVMdev] runtime library for jitted code
Hi, The question about the name mangling gave me an idea that it can be used to automate registration of DLL functions. Instead of manually creating Function objects specifying a return type and argument types which is error-prone and time-consuming one can get a list of functions exported from a DLL using Windows API, demangle each name and construct a Function object from it. Is there any
2011 Mar 08
2
[LLVMdev] TargetData::getPreferredAlignment(const GlobalVariable *GV) is strange ...
Hello everybody, I am somewhat confused by the following method within the LLVM, especially the lines "confusion starts" -> "confusion ends" are hard to follow. Maybe the idea is that if there are such big data structures one does not waste much memory anyway if they are aligned to a 16-byte boundary. However, my assembler complains here because it only supports 1-, 2-,
2010 Apr 05
2
[LLVMdev] llvm gold plugin example
Hi all, Following the example from http://llvm.org/docs/GoldPlugin.html#example1 gives the following error on Ubuntu Karmic: /usr/bin/ld: error: a.a: no archive symbol table (run ranlib) /usr/bin/ld: /usr/lib/crt1.o:../sysdeps/i386/elf/start.S:115: error: undefined reference to 'main' /usr/bin/ld: b.o: in function foo1:b.c(.text+0x4): error: undefined reference to 'foo2'