search for: globalifunc

Displaying 12 results from an estimated 12 matches for "globalifunc".

2020 Sep 10
2
[IR] Modelling of GlobalIFunc
> * Calling getBaseObject() on a GlobalIFunc returns its resolver function. I still don't understand how it can happen looking to the code ( https://github.com/llvm/llvm-project/blob/master/llvm/lib/IR/Globals.cpp#L430). I believe it should return nullptr (the same as if you call it from GlobalAlias that refers to GlobalIFunc). I don...
2020 Sep 07
3
[IR] Modelling of GlobalIFunc
I was working on https://reviews.llvm.org/D81911 to try and fix https://bugs.llvm.org/show_bug.cgi?id=46340 . Through the review process we happened upon a design limitation or perhaps a potential mis-modelling of GlobalIFunc in the IR object hierarchy, which leads to some problems in LTO flows. To summarize, as it currently stands (and in the hopes of faithfully representing the conclusions of that discussion): * Calling getBaseObject() on a GlobalAlias whose aliasee is a GlobalIFunc currently returns null. * Calling...
2016 Oct 25
4
RFC: Absolute or "fixed address" symbols as immediate operands
...alternative representation based on a suggestion from Eli. > > Introduce a new type of GlobalValue called GlobalConstant. GlobalConstant would fit into the GlobalValue hierarchy like this: > GlobalValue > GlobalConstant > GlobalPointer > GlobalIndirectSymbol > GlobalAlias > GlobalIFunc > GlobalObject > Function > GlobalVariable > GlobalValue would no longer be assumed to be of pointer type. The getType() overload that takes a PointerType, as well as getValueType() would be moved down to GlobalPointer. (A nice side benefit of this is that it would help flush out cases...
2016 Oct 25
3
RFC: Absolute or "fixed address" symbols as immediate operands
...on a suggestion from Eli. >> >> Introduce a new type of GlobalValue called GlobalConstant. GlobalConstant would fit into the GlobalValue hierarchy like this: >> GlobalValue >> GlobalConstant >> GlobalPointer >> GlobalIndirectSymbol >> GlobalAlias >> GlobalIFunc >> GlobalObject >> Function >> GlobalVariable >> GlobalValue would no longer be assumed to be of pointer type. The getType() overload that takes a PointerType, as well as getValueType() would be moved down to GlobalPointer. (A nice side benefit of this is that it would help...
2020 Aug 10
3
resolve the name of an ifunc resolver function
Hi, I just spent 4 hours trying to find a way to get the name of the resolver function of a ifunc definition ... :-( and with all that time I didnt event get far: for (GlobalIFunc &IF : M.ifuncs()) { StringRef ifunc_name = IF.getName(); Constant *r = IF.getResolver(); But how do I get to the (Function*) or function name of the resolver from there? I tried everything with the Constant which seems to be a ConstantExpr type ... .... Example test program below: #inclu...
2020 Aug 21
3
[RFC][LLVM] New Constant type for representing function PLT entries
...ecific bits, in essence, it's some dso-local function that's functionally equivalent to the actual resolved function at runtime. The address may or may not be equal to that of the resolved function. Maybe it would make sense to introduce a GlobalValue to represent this, along the lines of GlobalIFunc? I guess the end result isn't a lot different from the original proposal: you still end up with a Constant that represents the PLT entry. But I think it would fit more smoothly into existing optimizations that understand GlobalValues. And it would make it clear that importing one from anothe...
2016 Oct 24
3
RFC: Absolute or "fixed address" symbols as immediate operands
...duce a new type of GlobalValue called GlobalConstant. > GlobalConstant would fit into the GlobalValue hierarchy like this: > > * GlobalValue > o GlobalConstant > o GlobalPointer > + GlobalIndirectSymbol > # GlobalAlias > # GlobalIFunc > + GlobalObject > # Function > # GlobalVariable > > GlobalValue would no longer be assumed to be of pointer type. The > getType() overload that takes a PointerType, as well as getValueType() > would be moved down to GlobalPointer. (A nic...
2016 Oct 11
5
RFC: Absolute or "fixed address" symbols as immediate operands
Hi all, I wanted to summarise some discussion on llvm-commits [0,1] as an RFC, as I felt it demanded wider circulation. Our support for references to absolute symbols is not very good. The symbol will be resolved accurately in non-PIC code, but suboptimally: the symbol reference cannot currently appear as the immediate operand of an instruction, and the code generator cannot make any assumptions
2020 Aug 22
3
[RFC][LLVM] New Constant type for representing function PLT entries
...: llvm-dev <llvm-dev at lists.llvm.org> > > > Subject: [EXT] Re: [llvm-dev] [RFC][LLVM] New Constant type for > > > representing function PLT entries > > > > > Maybe it would make sense to introduce a GlobalValue to represent this, > > along the lines of GlobalIFunc? I guess the end result isn't a lot different > > from the original proposal: you still end up with a Constant that represents > > the PLT entry. But I think it would fit more smoothly into existing > > optimizations that understand GlobalValues. And it would make it clear...
2016 Oct 25
2
RFC: Absolute or "fixed address" symbols as immediate operands
...Introduce a new type of GlobalValue called GlobalConstant. GlobalConstant >> would fit into the GlobalValue hierarchy like this: >> >> GlobalValue >> >> GlobalConstant >> GlobalPointer >> >> GlobalIndirectSymbol >> >> GlobalAlias >> GlobalIFunc >> >> GlobalObject >> >> Function >> GlobalVariable >> >> GlobalValue would no longer be assumed to be of pointer type. The >> getType() overload that takes a PointerType, as well as getValueType() would >> be moved down to GlobalPointer. (A nic...
2017 Apr 04
3
RFC: Adding a string table to the bitcode format
On Tue, Apr 4, 2017 at 12:36 PM, Duncan P. N. Exon Smith < dexonsmith at apple.com> wrote: > > On 2017-Apr-04, at 12:12, Peter Collingbourne <peter at pcc.me.uk> wrote: > > On Mon, Apr 3, 2017 at 8:13 PM, Mehdi Amini <mehdi.amini at apple.com> wrote: > >> >> On Apr 3, 2017, at 7:08 PM, Peter Collingbourne <peter at pcc.me.uk> wrote: >>
2020 Aug 21
5
[RFC][LLVM] New Constant type for representing function PLT entries
I do have concerns about the amount of object level modeling that we want to do in the IR though. While it isn't the highest level IR we've managed to mostly avoid these kinds of features/complications in the past. I'm definitely interested in hearing some alternate implementations here and there rather than a full set of constants for relocations. Keeping the IR abstract enough over