Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] GlobalValue type"
2010 Apr 21
0
[LLVMdev] GlobalValue type
Orgoton Baberek wrote:
> I tried to get the Type for a global value, but it always returns me a
> PointerType. This is ok, expect that I want to know what type is being pointed
> at. How do I do this?
>
You can utilize the doxygen docs
(http://llvm.org/doxygen/hierarchy.html) to find which methods of
classes give you the information you want.
For example, you can look up the
2016 Oct 30
2
RFC: PointerType should derive from Type rather than SequentialType
Hi all,
An oddity that has existed for a long time in the IR is that PointerType
derives from SequentialType. Per subject I propose to make PointerType
derive from Type for a couple of reasons:
- Values of type PointerType are unlike the other SequentialTypes (arrays
and vectors) in that they do not hold values of the element type. By moving
PointerType we can unify certain aspects of how the
2016 Oct 31
2
RFC: PointerType should derive from Type rather than SequentialType
Thanks David. I ended up trying this over the weekend (see
https://github.com/llvm-project/llvm-project/compare/
master...pcc:pointertype). It ended up being a net reduction in code size
so seems like a useful cleanup even independent of the typeless pointer
work, I'll see if I can send a patch to the list.
FWIW I think this directly helps towards the migration because we would
have a clearer
2016 Oct 31
0
RFC: PointerType should derive from Type rather than SequentialType
Seems pretty plausible to me - my only question would be whether it's worth
the churn to do this intermediate step before finishing off typeless
pointers (granted, I've stalled out on that for nearly a year, admittedly -
but good to have extra hands/incentives - there's still a fair bit of work
to do though, so understandable if it might not be useful to block progress
on other things
2012 Jun 03
1
[LLVMdev] Constant::getAllOnesValue(): expected behaviour or bug?
Hi,
I was playing with the Constant::getAllOnesValue() method and found that it doesn't handlesPointerTypes correctly. When receiving a "i32*" argument, it was returning with some big integer vector, such as <12113216 x i32>.
When you call this method passing a PointerType, the following code is executed:
00152 VectorType *VTy = cast<VectorType>(Ty);00153 return
2010 Apr 20
1
[LLVMdev] PHI nodes
Nick Lewycky <nicholas <at> mxc.ca> writes:
>
> Pedro Ferreira wrote:
> > Hello,
> >
> > I am trying to write a LLVM backend for a school project using only
> > custom code (as with the CBackend) and I'm having difficulties
> > handling the PHI nodes from LLVM asm code. Is there any pass we can do
> > before my custom Module Pass to
2020 May 21
3
[RFC] Refactor class hierarchy of VectorType in the IR
Hi John,
I’d like to address some points in your message.
> Practically speaking, this is going to break every out-of-tree frontend, backend, or optimization pass that supports SIMD types.
My understanding is that the policy in LLVM development is that we do not let considerations for downstream and out-of-tree codebases affect the pace of development. The C++ API is explicitly unstable.
2020 Mar 09
8
[RFC] Refactor class hierarchy of VectorType in the IR
Hi,
I am helping with the effort to implement scalable vectors in the codebase in order to add support for generating SVE code in the Arm backend. I would like to propose a refactor of the Type class hierarchy in order to eliminate issues related to the misuse of SequentialType::getNumElements(). I would like to introduce a new class FixedVectorType that inherits from
2009 Oct 20
1
[LLVMdev] Dereference PointerType?
Hi Daniel,
> Type *allocated_type = ptr_type->dereference(); // this is the
> operation that doesn't seem to exist.
Type *allocated_type = ptr_type->getElementType();
Ciao,
Duncan.
2009 May 21
3
[LLVMdev] Passing a pointer to a function
I recently began hacking around with my first LLVM pass. The big
picture is that I would like to insert function calls for each
instruction type, and pass some parameters based on the instruction
type. Then I will link the output to some C file that implements those
functions.
Things were going well until I started trying to make function calls
with a pointer as a parameter. For example, I would
2013 Feb 25
2
[LLVMdev] Queries regarding function's arguments data type
Hi all,
I am working on my Master's project in security and I am trying to iterate
over the argument list of the function. Basically I need to do following
things :
1. Check data type of each argument of the argument list of the function.
2. Based on its data type like character array or integer array, pointer,
int, char, take different action.
3. I have added following code to check its
2020 Apr 22
2
[Update][RFC] Refactor class hierarchy of VectorType in the IR
Hi,
I just wanted to give an update on the progress of this work. This morning I merged a patch to add the new vector types. I have added a FixedVectorType, as proposed below. I also added a ScalableVectorType. I found during my work that it is useful to be able to query isa<ScalableVectorType>(Ty). Additionally, I was concerned that it would become commonplace to take
2011 Mar 28
2
[LLVMdev] regarding function pointer pass
Hi,
I am a Mtech student at IIT,Bombay and presently studying llvm as a part
of my Seminar work.Currently,i am writing a simple pass that would detect
function pointer call,use and declarations in the src program.
I could detect function pointer calls using the getCalledFunction().
However,i am stuck in identifying function pointer declaration and use.
is there a way one can distinguish between
2009 Nov 10
4
[LLVMdev] BasicAliasAnalysis: constant does not alias with noalias parameter
Dan Gohman wrote:
> On Nov 4, 2009, at 6:43 AM, Hans Wennborg wrote:
>
>> Here is another change I'd like to suggest to the BasicAliasAnalysis.
>>
>> LLVM fails to remove the dead store in the following code:
>>
>> %t = type { i32 }
>>
>> define void @f(%t* noalias nocapture %stuff ) {
>> %p = getelementptr inbounds %t* %stuff, i32 0,
2020 May 05
2
[Update][RFC] Refactor class hierarchy of VectorType in the IR
Nicolai,
My plan is to remove getNumElements() as soon as possible. Hopefully within the next few weeks. I just made a patch on my machine that marks it deprecated, and it generates a ton of warnings. Given that some build bots build with -Werror, I don't think we can mark it deprecated unless all the usages are first removed.
It occurs to me now that it might be good to mark it
2009 Nov 12
0
[LLVMdev] BasicAliasAnalysis: constant does not alias with noalias parameter
After discussing with Nick Lewycky in the IRC channel, here comes a less
aggressive patch.
We were worried that a constant pointer could alias with a GlobalValue.
Also, if one pointer could be a GlobalValue and the other a GlobalAlias
with the GlobalValue as aliasee.
However, I was not able to produce a test where this happens wihout the
getUnderlyingObject() returning the same value.
It
2013 Feb 25
0
[LLVMdev] Queries regarding function's arguments data type
On 2/25/13 1:44 PM, teja tamboli wrote:
> Hi all,
>
> I am working on my Master's project in security and I am trying to
> iterate over the argument list of the function. Basically I need to do
> following things :
Interesting. Just out of curiosity, can you tell us what your project
is about?
>
> 1. Check data type of each argument of the argument list of the
2018 Feb 24
1
Parsing a bit code file
I am trying to parse LLVM IR from a bit code file. I went through the
following steps.
hello.cpp
#include <iostream>
int main() {
std::cout << "Hello world!" << "\n";
return 0;}
dump.cpp
#include <llvm/IR/Module.h>#include <llvm/IRReader/IRReader.h>#include
<llvm/IR/LLVMContext.h>#include <llvm/Support/SourceMgr.h>
using
2010 Jan 18
5
[LLVMdev] [patch] Union Types - work in progress
On Jan 16, 2010, at 11:15 AM, Talin wrote:
> OK here's the patch for real this time :)
>
> On Fri, Jan 15, 2010 at 4:36 PM, Talin <viridia at gmail.com> wrote:
> Here's a work in progress of the union patch. Note that the test
> "union.ll" does not work, so you probably don't want to check this
> in as is. However, I'd be interested in any
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:
>>