Displaying 4 results from an estimated 4 matches for "__toplevel".
2009 Dec 14
4
[LLVMdev] inttoptr weirdness
..., then do another load (to
load the address of the array), add 4 bytes to get the array[1]
element, and then store at that pointer the number 10.
Here's my original output:
@"compile-test::*testObj*" = external constant i8* ; <i8**> [#uses=1]
define void @"compile-test::__toplevel-main"() {
entry:
store i8* null, i8** @"compile-test::*testObj*"
%1 = load i8** @"compile-test::*testObj*" ; <i8*> [#uses=1]
%2 = ptrtoint i8* %1 to i32 ; <i32> [#uses=1]
%3 = add i32 %2, 8 ; <i32> [#uses=1]
%4 = inttoptr i32 %3 to i8* ; <i8*&g...
2009 Dec 14
0
[LLVMdev] inttoptr weirdness
...of the array), add 4 bytes to get the array[1]
> element, and then store at that pointer the number 10.
>
> Here's my original output:
>
> @"compile-test::*testObj*" = external constant i8* ; <i8**> [#uses=1]
>
> define void @"compile-test::__toplevel-main"() {
> entry:
> store i8* null, i8** @"compile-test::*testObj*"
I'm surprised this store got optimized out, even though LLVM can
optimize away the subsequent load. Writing to an external global
variable is a visible side-effect, and unless there's other und...
2009 Dec 14
2
[LLVMdev] inttoptr weirdness
On Dec 14, 2009, at 2:21 PM, Jeffrey Yasskin wrote:
>>
>> @"compile-test::*testObj*" = external constant i8* ;
>> <i8**> [#uses=1]
>>
>> define void @"compile-test::__toplevel-main"() {
>> entry:
>> store i8* null, i8** @"compile-test::*testObj*"
>
> I'm surprised this store got optimized out, even though LLVM can
> optimize away the subsequent load. Writing to an external global
> variable is a visible side-effect, and u...
2009 Dec 15
0
[LLVMdev] inttoptr weirdness
...4, 2009, at 3:50 PMPST, Chris Lattner wrote:
> On Dec 14, 2009, at 2:21 PM, Jeffrey Yasskin wrote:
>>>
>>> @"compile-test::*testObj*" = external constant i8* ;
>>> <i8**> [#uses=1]
>>>
>>> define void @"compile-test::__toplevel-main"() {
>>> entry:
>>> store i8* null, i8** @"compile-test::*testObj*"
>>
>> I'm surprised this store got optimized out, even though LLVM can
>> optimize away the subsequent load. Writing to an external global
>> variable is a vis...