search for: testobjclass

Displaying 2 results from an estimated 2 matches for "testobjclass".

2009 Dec 14
4
[LLVMdev] inttoptr weirdness
...back to pointers). However, I've found some oddities. While I have no problems generating IR, when I run it through the optimizer (opt -O3), it generates what appears to be totally wrong code. Here's my test case: I have a global called *testObj*. It would look like this in C: struct TestObjClass { int32 dummy1, dummy2; int32* m_array; } extern TestObjClass* testObj; and I'm trying to access: testObj->m_array[1] = 10 Theoretically, this should be a load to get the pointer to testObj (since it's a global), I should add 8 bytes, then do another load (to load the address of...
2009 Dec 14
0
[LLVMdev] inttoptr weirdness
...e found some oddities.  While I have no problems > generating IR, when I run it through the optimizer (opt -O3), it > generates what appears to be totally wrong code. > > Here's my test case: > > I have a global called *testObj*.  It would look like this in C: > > struct TestObjClass > { >  int32 dummy1, dummy2; >  int32* m_array; > } > > extern TestObjClass* testObj; > > and I'm trying to access: > > testObj->m_array[1] = 10 > > Theoretically, this should be a load to get the pointer to testObj > (since it's a global), I should...