Displaying 20 results from an estimated 30000 matches similar to: "[RFC] Allow allocas to produce a non-0 address space pointer"
2015 Aug 27
4
RFC: alloca -- specify address space for allocation
On 08/26/2015 07:02 PM, Chandler Carruth via llvm-dev wrote:
>
> Without a better understanding of both the motivation and the
> resulting consequences such as what I've outlined in my questions
> above, it is very hard for me to feel comfortable with this kind of
> change.
>
For my use case, some of the assumptions about addrspace(0) don't make
any sense, so having
2016 Jul 19
2
[RFC] Make Lanai backend non-experimental
> On Jul 19, 2016, at 09:52, David Chisnall via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> The IR disruptions for CHERI aren’t that major (the main thing is that we allow alloca’s in different address spaces, but that’s not too difficult to upstream), but it does fail to tick one box that you didn’t list:
We would like this feature upstreamed
-Matt
-------------- next part
2015 Aug 27
2
RFC: alloca -- specify address space for allocation
On 27 Aug 2015, at 07:40, Chandler Carruth via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> On Wed, Aug 26, 2015 at 8:25 PM Matt Arsenault <Matthew.Arsenault at amd.com> wrote:
> On 08/26/2015 07:02 PM, Chandler Carruth via llvm-dev wrote:
>>
>> Without a better understanding of both the motivation and the resulting consequences such as what I've outlined
2017 Dec 15
3
[RFC] Add TargetTransformInfo::isAllocaPtrValueNonZero and let ValueTracking depend on TargetTransformInfo
> On Dec 14, 2017, at 20:28, Hal Finkel via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Would that address your use case? Or can you have null dereferenceable pointers in that address space, just not ones from alloca?
I would like to clarify what “null” means exactly. One related thing I would like in the future is for the DataLayout to specify what numeric value is the
2009 Nov 11
4
[LLVMdev] Adding function call in LLVM IR using IRBuilder causes assertion error
Hi,
I'm trying to add function calls in the LLVM IR using the IRBuilder
class. I've read both tutorials about functions but I still get
assertion errors. I allocate memory for all function arguments and pass
them as explained in the tutorial.
My code is (this function is supposed to add a call to f in bb at pos):
void addCallSite(Function *f, BasicBlock *bb, BasicBlock::iterator pos)
2010 Jul 07
1
[LLVMdev] Alloca and GlobalVariable
I just added support for arrays to the front-end for a trading-specific DSL that I'm implementing using LLVM and ran into a minor bump.
Internally, I have been treating variables the same whether they end up being GlobalVariables or stack variables allocated with Alloca. I store the Value* I get from CreateAlloca or the Value* I get when I create a new GlobalVariable into my symbol table when
2010 May 28
2
[LLVMdev] Retrieving Underlying Type from AllocaInst
Is there a recommended way to retrieve the original type from an AllocaInst object?
For example, I am creating alloca instructions using the IRBuilder interface like:
alloca = builder.CreateAlloca( Type::getDoubleTy( context ), 0, variableName.c_str() );
and I place the alloca into a symbol table.
Later when I am generating instructions for an assignment operation, I want to check the type of
2009 Nov 11
0
[LLVMdev] Adding function call in LLVM IR using IRBuilder causes assertion error
CreateAlloca(Type) returns an object of type Type*, the memory that
can hold an object of type Type. You probably don't want to be
creating allocas just before calling the function since 1) if that
call winds up in a loop they'll grow your stack frame without bound,
and 2) the memory they point to is initially uninitialized. Where did
the tutorial tell you to do that?
In general, when I
2010 May 28
2
[LLVMdev] Retrieving Underlying Type from AllocaInst
Thanks Nick,
Unfortunately, that is indeed what I asked for but not what I really am looking for.
My naive approach is to store symbol table entries as Value* objects so I can allocate global variables and alloca variables and place them into the symbol table and the rest of the code didn't need to know which kind they were, in general. Loads and Stores of these types (as well as other
2010 May 28
0
[LLVMdev] Retrieving Underlying Type from AllocaInst
Curtis Faith wrote:
> Is there a recommended way to retrieve the original type from an
> AllocaInst object?
>
> For example, I am creating alloca instructions using the IRBuilder
> interface like:
>
> alloca = builder.CreateAlloca( Type::getDoubleTy( context ), 0,
> variableName.c_str() );
>
> and I place the alloca into a symbol table.
>
> Later when I am
2018 Mar 31
2
[Dwarf] Register a local variable in DIBuilder and locate it later with a DwarfContext
Hi,
First, considering I'm using an IRBuilder and a DIBuilder to build my
program, how can I automatically bind the CreateAlloca with my named local
variable inside the DIBuilder ? Is it automatic with the Twine name of
CreateAlloca ? And/Or should I use DIBuilder::createAutoVariable and how ?
Then, I'm wondering how to locate back my local variable in memory
(register or stack) once i
2018 Apr 01
2
[Dwarf] Register a local variable in DIBuilder and locate it later with a DwarfContext
Hi Paul,
How can i make this call to intrinsic from the c++ code ?
I'm not working with the IR language, but directly in C++ with
IRBuilder::CreateAlloca.
My goal is that one :
- Generate machine code with an instance of the class 'IRBuilder'
- Emit 'ObjFile' class instance with MCJIT
- Create a DwarfContext instance directly from the emitted ObjFile object
2010 May 28
0
[LLVMdev] Retrieving Underlying Type from AllocaInst
You should be able to use the second alternative that Nick proposed:
cast<PointerType*>(pointer_value->getType())->getElementType()
Reid
On Fri, May 28, 2010 at 9:37 AM, Curtis Faith <curtis at curtisfaith.com> wrote:
> Thanks Nick,
> Unfortunately, that is indeed what I asked for but not what I really am
> looking for.
> My naive approach is to store symbol table
2018 Apr 01
0
[Dwarf] Register a local variable in DIBuilder and locate it later with a DwarfContext
Binding the alloca to the debug-info metadata is not automatic. You need to emit an intrinsic function call to llvm.dbg.declare to bind the two together.
If you are simply trying to emit DWARF for your program, the rest of the processing should already be in place for that. If you are trying to do something else, you would need to describe that so we understand what you need.
--paulr
From:
2018 Apr 02
0
[Dwarf] Register a local variable in DIBuilder and locate it later with a DwarfContext
"IR" often refers to the general concept/semantics, not only the textual
format in .ll files (there are 3 main forms - bitcode, textual IR, and the
in-memory representation (llvm::Module, etc - constructed using IRBuilder)).
A great place to start is to look at what Clang does to produce debug info
- it uses IRBuilder, for instance. So you could look at how Clang uses the
IRBuilder when
2015 Mar 10
4
[LLVMdev] noob IR builder question
I am trying to get a handle on IR builder, at least some basics. I ran through a tutorial here: Create a working compiler with the LLVM framework, Part 1 <http://www.ibm.com/developerworks/library/os-createcompilerllvm1/>, and it worked well enough. I have some simple code that creates a hello world IR. I am trying to now bring in some concepts from the Kaleidoscope tutorial, namely
2008 Feb 16
3
[LLVMdev] linux/x86-64 codegen support
See the bug for a reduction and the gimple trees. validate_arglist
definately is rejecting the arglist in EmitBuiltinAlloca.
(try:
bool TreeToLLVM::EmitBuiltinAlloca(tree exp, Value *&Result) {
tree arglist = TREE_OPERAND(exp, 1);
if (!validate_arglist(arglist, INTEGER_TYPE, VOID_TYPE)) {
debug_tree(arglist);
return false;
}
Value *Amt = Emit(TREE_VALUE(arglist), 0);
Amt =
2017 Oct 11
2
How to create an alloca variable of type i64 in LLVM IR?
To create a stack based (local) 64 bit integer in LLVM IR, I used:
Value *var = builder.CreateAlloca(Type::getInt64Ty(Ctx));
I wish to pass this variable to a function "void foo(unsigned long)". I
created the signature of function foo() as follows:
Constant *func = M->getOrInsertFunction("foo",
Type::getVoidTy(Ctx),Type::getInt64Ty(Ctx), NULL);
To pass the newly created
2009 Aug 23
1
[LLVMdev] Having JIT resolve extern "C" functions declared in executible
2009/8/22 Bill Wendling <isanbard at gmail.com>:
> I think you might have to provide an empty list if your function doesn't
> take parameters. Maybe using an irbuilder would help?
It does take one parameter. Here's the important bits:
// My Function
extern "C"
void print(double X) {
printf("%f\n", X);
}
// Args type
std::vector<const Type*>
2013 Jul 05
2
[LLVMdev] Enabling vectorization with LLVM 3.3 for a DSL emitting LLVM IR
Le 5 juil. 2013 à 04:11, Tobias Grosser <tobias at grosser.es> a écrit :
> On 07/04/2013 01:39 PM, Stéphane Letz wrote:
>> Hi,
>>
>> Our DSL can generate C or directly generate LLVM IR. With LLVM 3.3, we can vectorize the C produced code using clang with -O3, or clang with -O1 then opt -O3 -vectorize-loops. But the same program generating LLVM IR version cannot be