search for: mo_globaladdress

Displaying 7 results from an estimated 7 matches for "mo_globaladdress".

2004 Jun 17
2
[LLVMdev] MachineOperand: GlobalAddress vs. ExternalSymbol
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 MO_GlobalAddress be called MO_GlobalValue, for consistency? Second, MO_ExternalSymbol is used for storing name of external variable/function, right? Why...
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 > MO_GlobalAddress be called MO_GlobalValue, for consistency? I think that it could be reasonable to make this change, but it is also reaso...
2011 Mar 03
2
[LLVMdev] MachineOperand type
...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 MO_GlobalAddress? Are these two types orthogonal? I found that memset and memcpy are MO_ExternalSymbol and printf and fprintf and so on are MO_GlobalAddress. Thanks a lot in advance. Any advice will be greatly appreciated. Bin
2015 Jun 16
2
[LLVMdev] Replacing a Reg MachineOperand with a non-Reg MachineOperand?
...)' 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 ChangeToGlobalAddress(const GlobalValue *GV): >>> >>> ... >>> OpKind = MO_GlobalAddress; >>> Contents.OffsetedInfo.Val.GV = GV; >>> >>> and then I use the function like this: >>> >>> >>> MI->getOperand(1).ChangeToGlobalAddress(MII->getOperand(1).getOperand.getGlobal()); >>> >>> The operand ends up being repl...
2015 Jun 16
2
[LLVMdev] Replacing a Reg MachineOperand with a non-Reg MachineOperand?
...9;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 ChangeToGlobalAddress(const GlobalValue *GV): > > ... > OpKind = MO_GlobalAddress; > Contents.OffsetedInfo.Val.GV = GV; > > and then I use the function like this: > > > MI->getOperand(1).ChangeToGlobalAddress(MII->getOperand(1).getOperand.getGlobal()); > > The operand ends up being replaced with the global; however, it's also > adding a large...
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
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. > MO_ExternalSymbol should only be used for functions that might not > actu...