Displaying 5 results from an estimated 5 matches for "__anontoplevel".
2017 Jun 04
2
[newbie] trouble with global variables and CreateLoad/Store in JIT
...LLVM 4.0.0
Just so I'm not leaving anything out, what follows are IR dumps of the
sample functions using either the direct store / load, or the setGlobal
getGlobal
functions. As far as I can tell they should do exactly the same thing...
; Does NOT do the right thing
define { i8*, i32 } @"__anonToplevel/2"() {
entry:
%.unpack = load i8*, i8** getelementptr inbounds ({ i8*, i32 }, { i8*,
i32 }* @foo, i32 0, i32 0), align 4
%0 = insertvalue { i8*, i32 } undef, i8* %.unpack, 0
%.unpack1 = load i32, i32* getelementptr inbounds ({ i8*, i32 }, { i8*,
i32 }* @foo, i32 0, i32 1), align 4
%1 =...
2017 Jun 05
2
[newbie] trouble with global variables and CreateLoad/Store in JIT
....EmitCall1("debugPointer", ptr);
Here is the compile-time output showing types of the value and the pointer:
val type:
{ i8*, i32 }
ptr type:
{ i8*, i32 }*
Here is the IR dump for the function (after a couple of passes), right
before it's fed to the JIT:
define { i8*, i32 } @"__anonToplevel/0"() prefix { i8*, i32 } (i32)*
@"XEP:__anonToplevel/0" {
entry:
%0 = call { i8*, i32 } @debugPointer({ i8*, i32 }* nonnull @foo)
%1 = call { i8*, i32 } @debugInt(i32 ptrtoint ({ i8*, i32 }* @foo to i32))
store i8* @FixnumClass, i8** getelementptr inbounds ({ i8*, i32 }, { i8*,...
2017 Jun 06
2
[newbie] trouble with global variables and CreateLoad/Store in JIT
...you JIT'ing on? I noticed that it is a 32-bit
target, and I suspect that the 32-bit support in the JIT infrastructure
isn't as well tested / commonly used as the 64-bit code, possibly
explaining why this sort of bug could sneak through.
-- Sean Silva
>
> define { i8*, i32 } @"__anonToplevel/0"() prefix { i8*, i32 } (i32)*
> @"XEP:__anonToplevel/0" {
> entry:
> %0 = call { i8*, i32 }* @identity({ i8*, i32 }* nonnull @foo)
> %1 = call { i8*, i32 } @debugPointer({ i8*, i32 }* %0)
> %2 = getelementptr { i8*, i32 }, { i8*, i32 }* %0, i32 0, i32 0
>...
2017 Jun 06
2
[newbie] trouble with global variables and CreateLoad/Store in JIT
...spect that the 32-bit support in the JIT
>> infrastructure isn't as well tested / commonly used as the 64-bit code,
>> possibly explaining why this sort of bug could sneak through.
>>
>> -- Sean Silva
>>
>>
>>>
>>> define { i8*, i32 } @"__anonToplevel/0"() prefix { i8*, i32 } (i32)*
>>> @"XEP:__anonToplevel/0" {
>>> entry:
>>> %0 = call { i8*, i32 }* @identity({ i8*, i32 }* nonnull @foo)
>>> %1 = call { i8*, i32 } @debugPointer({ i8*, i32 }* %0)
>>> %2 = getelementptr { i8*, i32 }...
2017 Jun 07
2
[newbie] trouble with global variables and CreateLoad/Store in JIT
...tructure isn't as well tested / commonly used as the 64-bit code,
>>>> possibly explaining why this sort of bug could sneak through.
>>>>
>>>> -- Sean Silva
>>>>
>>>>
>>>>>
>>>>> define { i8*, i32 } @"__anonToplevel/0"() prefix { i8*, i32 } (i32)*
>>>>> @"XEP:__anonToplevel/0" {
>>>>> entry:
>>>>> %0 = call { i8*, i32 }* @identity({ i8*, i32 }* nonnull @foo)
>>>>> %1 = call { i8*, i32 } @debugPointer({ i8*, i32 }* %0)
>>>&g...