Displaying 20 results from an estimated 600 matches similar to: "[LLVMdev] MachineOperand: GlobalAddress vs. ExternalSymbol"
2004 Jun 17
0
[LLVMdev] MachineOperand: GlobalAddress vs. ExternalSymbol
On Thu, 17 Jun 2004, Vladimir Prus wrote:
>
> Hi,
> here I am again with "why is this so" kind of a question. Among different
> types of MachineOperand there are MO_ExternalSymbol and MO_GlobalAddress.
>
> For MO_GlobalAddress, we can get usefull information from the getGlobal()
> method, which returns GlobalValue*. Wouldn'it it be better is
>
2011 Mar 03
2
[LLVMdev] MachineOperand type
Hi all,
I have a question about the types of MachineOperand. There are 12
different types of MachineOperand such as MO_Register, MO_Immediate and
so on. Some of the names are self-explanatory such as MO_Register and
MO_Immediate. Some of them are a little confusing such as MO_FrameIndex,
MO_ConstantPoolIndex and so on. For example, what is the different
between MO_ExternalSymbol and
2004 Jun 18
3
[LLVMdev] MachineOperand: GlobalAddress vs. ExternalSymbol
Chris Lattner wrote:
> > Second, MO_ExternalSymbol is used for storing name of external
> > variable/function, right? Why it's not possible to use MO_GlobalAddress,
> > where returned GlobalValue* has isExternal set to true? The
> > GlobalValue::getName would return the name of the symbol.
>
> Using the GlobalValue is certainly the preferred way if you have it.
2004 Jun 19
1
[LLVMdev] MachineOperand: GlobalAddress vs. ExternalSymbol
Chris Lattner wrote:
> > And why isn't it possible to just make those functions known to LLVM?
> > After all, *I think*, if this function is to be called, it should be
> > declared in assembler, and so you have to pass some information abou
> > those function to the code printer. (Of course, it's possible to just
> > directly print the declarations, but
2004 Jun 18
0
[LLVMdev] MachineOperand: GlobalAddress vs. ExternalSymbol
On Fri, 18 Jun 2004, Vladimir Prus wrote:
> > actually exist in the LLVM module for the function. In particular, this
> > would include any functions in a code-generator specific runtime library
> > and malloc/free. The X86 code generator compiles floating point modulus
> > into fmod calls, and 64-bit integer div/rem into runtime library calls.
>
> And why isn't
2004 Jun 19
2
[LLVMdev] MachineOperand: GlobalAddress vs. ExternalSymbol
On Fri, 2004-06-18 at 10:13, Chris Lattner wrote:
> Module::gbegin/gend iterate over the global variables, and ::begin/end
> iterate over the functions, some of which may be prototypes.
This confused Vladimir and I remember it confusing me when I was
reviewing LLVM core a few months ago. Would it be worthwhile to consider
naming these globals_begin/globals_end and
2004 Jun 19
0
[LLVMdev] MachineOperand: GlobalAddress vs. ExternalSymbol
On Fri, 18 Jun 2004, Reid Spencer wrote:
> On Fri, 2004-06-18 at 10:13, Chris Lattner wrote:
>
> > Module::gbegin/gend iterate over the global variables, and ::begin/end
> > iterate over the functions, some of which may be prototypes.
>
> This confused Vladimir and I remember it confusing me when I was
> reviewing LLVM core a few months ago. Would it be worthwhile to
2004 Jun 19
1
[LLVMdev] MachineOperand: GlobalAddress vs. ExternalSymbol
sure, that's reasonable. I'll make the patch but later this weekend ..
bigger fish to fry :)
Reid.
On Fri, 2004-06-18 at 22:44, Chris Lattner wrote:
> On Fri, 18 Jun 2004, Reid Spencer wrote:
> > On Fri, 2004-06-18 at 10:13, Chris Lattner wrote:
> >
> > > Module::gbegin/gend iterate over the global variables, and ::begin/end
> > > iterate over the
2015 Jun 16
2
[LLVMdev] Replacing a Reg MachineOperand with a non-Reg MachineOperand?
I'm not sure I understand what your problem is, but are you calling the
removeRegOperandFromUseList on the machine operand after changing it to GA?
You have to call removeRegOperandFromUseList before changing the operand's
type, as it expects a register operand.
2015-06-16 10:05 GMT-07:00 Ryan Taylor <ryta1203 at gmail.com>:
> @Alex: Thanks. setOffset(0) eliminated any previous
2015 Jun 16
2
[LLVMdev] Replacing a Reg MachineOperand with a non-Reg MachineOperand?
Hey Ryan,
You end with a large constant immediate offset value because the register
operand stores the register id in a union together with the offset that's
used by the global address operand.
Just add 'setOffset(0)' to your change method and that should solve your
problem.
2015-06-16 9:15 GMT-07:00 Ryan Taylor <ryta1203 at gmail.com>:
> So I have this for
2015 Jun 16
2
[LLVMdev] Replacing a Reg MachineOperand with a non-Reg MachineOperand?
Tom,
My current example is a global address; however, it could be any operand
in theory. The arch allows for direct mem op support for ex instructions,
so it could be any type of address or any type of imm or any type of
register.
For example, we are using intrinsics for some instructions since LLVM
does not support them. Table gen does not allow for matching to direct mem
op because the
2012 Jul 25
2
[LLVMdev] Purpose of MSP430Wrapper
Hello,
I'm considering creating an LLVM backend for a 16 bit processor and
modelling it around the (experimental) MSP430 back end.
When reviewing MSP430InstrInfo.td I see
def MSP430Wrapper : SDNode<"MSP430ISD::Wrapper", SDT_MSP430Wrapper>;
and can see in MSP430ISelLowering.cpp that
ISD::GlobalAddress:
ISD::BlockAddress:
ISD::ExternalSymbol
all get lowered to
2011 Mar 03
0
[LLVMdev] MachineOperand type
On Mar 3, 2011, at 2:30 PM, Bin Zeng wrote:
>>>
>>> Thanks a lot in advance. Any advice will be greatly appreciated.
>> GlobalAddress is used to refer to something that exists in IR, such as a global variable. ExternalSymbol is used to refer to something that isn't in the IR because it was synthesized by codegen, such as __addsi3.
>>
>> -Chris
>
>
2012 Jul 25
0
[LLVMdev] Purpose of MSP430Wrapper
On 25 Jul 2012, at 04:49, Paul Shortis wrote:
> Hello,
>
> I'm considering creating an LLVM backend for a 16 bit processor and
> modelling it around the (experimental) MSP430 back end.
>
> When reviewing MSP430InstrInfo.td I see
>
> def MSP430Wrapper : SDNode<"MSP430ISD::Wrapper", SDT_MSP430Wrapper>;
>
> and can see in MSP430ISelLowering.cpp
2005 Feb 20
3
[LLVMdev] HowToUseJIT: failed assertion on PPC/Mac OS X
I just got the CVS version of LLVM running tonight. On my PowerBook,
one of the examples (HowToUseJIT) has an assertion error when I try and
run it:
Running foo: JIT.cpp:217: failed assertion `!isAlreadyCodeGenerating &&
"Error: Recursive compilation detected!"'
However, when I compile and run the same program on x86 Linux, it runs
fine (Running foo: Result: 11). I
2005 Feb 20
0
[LLVMdev] HowToUseJIT: failed assertion on PPC/Mac OS X
On Feb 20, 2005, at 11:12, Evan Jones wrote:
> I can "fix" it by changing JITResolver::getFunctionStub to use
> F->isExternal() instead of F->hasExternalLinkage(). However, this then
> breaks when calling *real* external functions (native code).
I obviously should not post to mailing lists before I've eaten. With my
"fix" I get an assertion when taking an
2019 Jul 09
2
Manipulating global address inside GlobalAddress SDNode in (RISCV) LLVM backend
Hello,
Brief background: We are trying to support 64 bit pointers in RISCV 32 bit
backend
http://lists.llvm.org/pipermail/llvm-dev/2019-June/132805.html
To pass the legalizer we plan to break the 64 bit GlobalAddress into 32 bit
GlobalAddress having the other 32 bit glued to the node. We could not find
a direct way to convert the 64 bit GlobalAddress Node into a 32 bit node.
For a GlobalAddress
2019 Jul 11
2
Manipulating global address inside GlobalAddress SDNode in (RISCV) LLVM backend
>
> I don't think there's a real shortage of those, but I confess I'm not
> sure why that's related. You'd need a representation for the LUI and
> ADDI after instruction selection anyway.
Yeah at the end we need a representation for LUI and ADDI. We were trying
to break the 64 bit address from GlobalAddress node into two i32 register.
We will add custom load/store
2009 Apr 28
1
[LLVMdev] AddressSpace of a GlobalAddress
Every GlobalAddress has a GlobalValue, Every GlobalValue is a
PointerType, Every PointerType has an AddressSpace. So is it ok to add a
method getAddressSpace in GlobalAddressSDNode class itself?
Currently we have to do GSDN->getGlobal()->getType()->getAddressSpace().
- Sanjiv
2018 May 16
0
GlobalAddress lowering strategy
I've been looking at GlobalAddress lowering strategy recently and was
wondering if anyone had any ideas, insights, or experience to share.
## Background
When lowering global address, which is typically done in
FooTargetLowering::LowerGlobalAddress you have the option of folding
in the global offset into the global address or else emitting the base
globaladdress and a separate ADD node for the