Displaying 12 results from an estimated 12 matches for "gettargetglobaladdress".
2016 Jan 15
2
Expanding a PseudoOp and accessing the DAG
...on model,
> compilation options, etc. to see if you need to have relocatable addresses,
> or not:
>
> SDValue XSTGISelLowering::LowerGlobalAddress(SDValue Addr, SelectionDAG
> &DAG) {
> ...
> if (NeedGRP) {
> SpecialTargetFlags = ...;
> SDValue TAddr = DAG.getTargetGlobalAddress(..., SpecialTargetFlags);
> return DAG.getNode(XSTGISD::ADDR_USE_GRP, ..., TAddr);
> }
>
> // Non-relocatable address:
> SDValue NAddr = DAG.getTargetGlobalAddress(...);
> return DAG.getNode(XSTGISD::ADDR_NORMAL, ..., NAddr);
>
> }
>
>
> -Krzysztof
>...
2016 Jan 13
2
Expanding a PseudoOp and accessing the DAG
On Wed, Jan 13, 2016 at 2:08 PM, Krzysztof Parzyszek via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> On 1/13/2016 2:26 PM, Phil Tomson via llvm-dev wrote:
>
>> I've got this PseudoOp defined:
>>
>> def SDT_RELADDR : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisInt<1>]>;
>> def XSTGRELADDR :
2007 Jun 29
0
[LLVMdev] How to call native functions from bytecode run in JIT?
...of range!"'
Right? But on OS X you don't have this messsage?
Here's a temporary fix until I find time to investigate on this:
In function PPCISelLowering::LowerCALL, comment the lines:
if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee))
Callee = DAG.getTargetGlobalAddress(G->getGlobal(),
Callee.getValueType());
This will force an indirect call, and won't use the jump-size limitation
of the bl instruction.
Let me know if this helps.
Cheers,
Nicolas
Jan Rehders wrote:
> Hi,
>
> attached is a small testcase I did. It builds two LLVM functions whic...
2009 Apr 20
0
[LLVMdev] A few questions from a newbie
...hen custom lower ISD::GlobalAddress, converting it to a wrapped
TargetGlobalAddress:
SDValue
BlackfinTargetLowering::LowerGlobalAddress(SDValue Op, SelectionDAG
&DAG)
{
DebugLoc DL = Op.getDebugLoc();
GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
Op = DAG.getTargetGlobalAddress(GV, MVT::i32);
return DAG.getNode(BfinISD::Wrapper, DL, MVT::i32, Op);
}
Now you can pattern match on the wrapper:
def : Pat<(BfinWrapper (i32 tglobaladdr:$addr)),
(LOAD32imm tglobaladdr:$addr)>;
If you think this is overly complicated, I agree.
Does anybody know why this is...
2007 Jun 27
2
[LLVMdev] How to call native functions from bytecode run in JIT?
Hi,
attached is a small testcase I did. It builds two LLVM functions
which both call two native functions get5 and get6. The native
functions are in the exe and in the dll. On OS X it works like a
charm. On Linux none of the two functions can be called.
Maybe someone can try them or have a look at it to see if there is
something obviously wrong
greetings,
Jan
-------------- next part
2009 Apr 20
2
[LLVMdev] A few questions from a newbie
Hello, I am learning to write a new backend for LLVM and have a few simple
questions.
1) What are the differences between 'constant' and 'targetconstant',
'globaladdress' and 'targetglobaladdress'? It is not clear from the document
when and which should be used.
2) On the processor I am working on, there is a 'move reg, mem_addr'
instruction.
When I try
2007 Jun 30
1
[LLVMdev] How to call native functions from bytecode run in JIT?
...I receive my bugzilla password
Greetings,
Jan
> Here's a temporary fix until I find time to investigate on this:
>
> In function PPCISelLowering::LowerCALL, comment the lines:
>
> if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee))
> Callee = DAG.getTargetGlobalAddress(G->getGlobal(),
> Callee.getValueType());
>
> This will force an indirect call, and won't use the jump-size
> limitation
> of the bl instruction.
>
> Let me know if this helps.
>
> Cheers,
> Nicolas
>
> Jan Rehders wrote:
>> Hi,
>>
>> a...
2009 Apr 20
2
[LLVMdev] A few questions from a newbie
...erting it to a wrapped
> TargetGlobalAddress:
>
> SDValue
> BlackfinTargetLowering::LowerGlobalAddress(SDValue Op, SelectionDAG
> &DAG)
> {
> DebugLoc DL = Op.getDebugLoc();
> GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
>
> Op = DAG.getTargetGlobalAddress(GV, MVT::i32);
> return DAG.getNode(BfinISD::Wrapper, DL, MVT::i32, Op);
> }
>
> Now you can pattern match on the wrapper:
>
> def : Pat<(BfinWrapper (i32 tglobaladdr:$addr)),
> (LOAD32imm tglobaladdr:$addr)>;
>
> If you think this is overly complicated,...
2008 Feb 15
1
[LLVMdev] LLVM2.2 x64 JIT trouble on VStudio build
...these are false
getTargetMachine().getCodeModel() != CodeModel::Large) // this is false
&& !Subtarget->GVRequiresExtraLoad(G->getGlobal(), // this is short circuited away
getTargetMachine(), true))
Callee = DAG.getTargetGlobalAddress(G->getGlobal(), getPointerTy()); // this is passed over because the test is false
// since it made it through the if (Global...., it skips down to
// Returns a chain & a flag for retval copy to use.
SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Flag);
Thanks!...
2008 Feb 15
0
[LLVMdev] LLVM2.2 x64 JIT trouble on VStudio build
On Feb 12, 2008, at 5:26 PM, Chuck Rose III wrote:
> Hola LLVMers,
>
> I’m debugging through some strangeness that I’m seeing on X64 on
> windows with LLVM2.2. I had to change the code so that it would
> engage the x64 target machine on windows builds, but I’ve otherwise
> left LLVM 2.2 alone. The basic idea is that I’ve got a function bar
> which is compiled by
2013 Sep 25
1
[LLVMdev] arm64 / iOS support
...;
+ LoFixup = AArch64II::MO_LO12;
+ }
+
+ // AArch64's small model demands the following sequence:
+ // ADRP x0, somewhere
+ // ADD x0, x0, #:lo12:somewhere ; (or LDR directly).
+ SDValue GlobalRef = DAG.getNode(AArch64ISD::WrapperSmall, dl, PtrVT,
+ DAG.getTargetGlobalAddress(GV, dl, PtrVT, 0,
+ HiFixup),
+ DAG.getTargetGlobalAddress(GV, dl, PtrVT, 0,
+ LoFixup),
+ DAG.getConstant(Alignm...
2008 Feb 13
3
[LLVMdev] LLVM2.2 x64 JIT trouble on VStudio build
Hola LLVMers,
I'm debugging through some strangeness that I'm seeing on X64 on windows with LLVM2.2. I had to change the code so that it would engage the x64 target machine on windows builds, but I've otherwise left LLVM 2.2 alone. The basic idea is that I've got a function bar which is compiled by VStudio and I'm creating another function foo via LLVM JIT which is going