Displaying 20 results from an estimated 800 matches similar to: "[LLVMdev] RFC: Patch"
2007 Sep 22
0
[LLVMdev] RFC: Patch
On Sep 21, 2007, at 5:11 PM, Bill Wendling wrote:
>
> My question is, is this liable to break something else down the line?
> Should it be modified to call the getNamedGlobal method only if it's
> an Objective-C property? Is this even the correct method for an
> Objective-C property?
There is a bigger question here. One invariant that is useful is
that there is only a
2007 Sep 22
0
[LLVMdev] RFC: Patch
Hi Bill, why not just add "true" to the getGlobalVariable call?
GlobalVariable *getGlobalVariable(const std::string &Name,
bool AllowInternal = false) const;
Ciao,
Duncan.
2012 Dec 05
0
[LLVMdev] how to get and modify a global variable inside a module
On 05/12/12 12:07, Dong Chen wrote:
> recently, i use LLVM API to write a program to read *.ll and excute it
> automatically.
> Further more, i want to change some global variables inside a module.
> i tried some functions provided by Module.h and ExecutionEngine.h but none
> were seemed to match my need.
> did someone have the experience or some advices?
> thank you ;)
You
2006 Mar 26
1
[LLVMdev] A question about Module::getGlobalVariable()
I want to find a global variable by name in some module ,
I find LLVM function Module::getGlobalVariable(string name,Type* ty);
My question is , is it necessary to specify the global variable type (second param) ?
Why not just
getGlobalVariable(string name).
I look up the source , and find that it depend on SymbolTable.find()
and SymbolTable only support find with type .is it True ? or I make
2012 Dec 05
4
[LLVMdev] how to get and modify a global variable inside a module
recently, i use LLVM API to write a program to read *.ll and excute it
automatically.
Further more, i want to change some global variables inside a module.
i tried some functions provided by Module.h and ExecutionEngine.h but none
were seemed to match my need.
did someone have the experience or some advices?
thank you ;)
--
View this message in context:
2005 Nov 02
1
[LLVMdev] Statically Initialized Arrays
On Nov 2, 2005, at 16:39, Chris Lattner wrote:
> 4. Replace the old GV with the new GV using code that looks like this:
>
> OldGV->replaceAllUsesWith(ConstantExpr::getCast(NewGV,
> OldGV->getType());
> OldGV->eraseFromParent();
>
> At the end of this, any instructions or other globals that referenced
> the temporary global will now reference the new one.
2012 Dec 05
3
[LLVMdev] how to get and modify a global variable inside a module
hi Duncan Sands,
i have tried the functions:
GlobalValue * getNamedValue (StringRef Name) const
GlobalVariable * getGlobalVariable (StringRef Name, bool
AllowInternal=false) const
GlobalVariable * getNamedGlobal (StringRef Name) const
but i think these functions just return the ID or something else (not the
Global Variable's main memory address, i am not sure)
here is the thing. i
2017 May 30
2
llvm::GlobalVariable usage (newbie question)
The docs are pretty vague about this. After digging into the examples I got
the following to work with JIT to gain a pointer to variable elsewhere in
the runtime, but I'd like to understand what is going on here, and if there
is a, um, nicer API that I'm missing?
llvm::Value* C::getGlobalVariable(const char* name,
llvm::Type* t)
{
2020 Jun 03
2
Fwd: I cannot change value of global variable in LLVM IR using IRBuilder
I don't think it's the same problem as you described. By printing I meant
calling printf function and passing my global variable as one of the
arguments.
My code:
Instruction* InstructionVisitor::incrementGlobalKey(Instruction* I) {
IRBuilder<> Builder(I->getContext());
Builder.SetInsertPoint(I->getNextNode());
GlobalVariable* key =
2020 Jun 03
2
Fwd: I cannot change value of global variable in LLVM IR using IRBuilder
Hi Everyone,
I'm quite new to LLVM and I want to update value of global variable in LLVM
IR. I created new global variable in ModulePass:
bool runOnModule(llvm::Module &M) {
IRBuilder<> Builder(M.getContext());
Instruction *I = &*inst_begin(M.getFunction("main"));
Builder.SetInsertPoint(I);
M.getOrInsertGlobal("globalKey",
2013 Jan 20
1
[LLVMdev] Get the value of a GlobalVariable
Hi,
I am executing a C program using JIT. When the program exits, the control
comes back to my program which initiates the JIT. Now, I want to read
the value(not the LLVM nomenclature) of a global variable (not the LLVM
nomenclature). I am able to get the global variable, using the following
command:
GlobalVariable *my_global = Mod->getNamedGlobal("MY_GLOBAL");
I want to know the
2012 Dec 10
2
[LLVMdev] how to get and modify a local variable's value through executionEngine?
hello guys,
recently, i successfully get and modify global variable by execution engine.
the functions i used are listed here:
int m=1;
EE->updateGlobalMapping(p->M->getGlobalVariable("x",true),&m);
EE->recompileAndRelinkFunction(EntryFn);
x is the global variable in the module.
but how to modify the local variable in the module?
--
View this message in context:
2015 Sep 14
2
JIT: Mapping global variable in JIT'ted code to variable in running program
Hi,
I think this is probably easiest to explain with code (I only provided the
essentials for clarity):
// begin file jit.cpp
int myglobal;
void printMyGlobal() {
printf("myglobal: %d\n", myglobal);
}
int main(int argc, char *argv[]) {
// This file, jit.cpp has been compiled to bitcode (clang -S -emit-llvm
jit.cpp)
// and is read into Module M here
Module *M = ...
2012 May 23
0
[LLVMdev] lli unable to resolve symbol _ZNKSt3__16locale9use_facetERNS0_2idE in bitcode
Ashok Nalkund wrote:
>
> Resending :(. Any pointers?
Fundamentally the issue is that the system linker is supposed to define
__dso_handle when linking, but since there is no system linker between
your build of the .bc files and running lli, nobody has defined it.
It seems reasonable to me that lli should define __dso_handle if it's
declared in the module.
You could module
2012 Sep 19
3
[LLVMdev] newbie question on getelementptr
Hi All,
I'm new to LLVM and I'm having a coding problem.
I'm creating a GlobalVariable that contains a StructType that contains a
Function. The function returns i32 and takes two i32's.
Here is my code:
GlobalVariable* retrieved = module->getGlobalVariable("myGV");
...
Constant* result = ConstantExpr::getGetElementPtr(retrieved, indices);
How do I get my Function
2019 Dec 19
2
Moving to ORCv2 - Where are my global constructors and destructors?
Heyho,
Recently I tried out the ORCv2 JIT, especially the LLJIT. I gotta say, that I really like the new interface and the way you use it! However there is one thing I'm missing. I wrote a small bit code file, which should force having a global constructor.
int wuff();
__declspec(noinline) int miau()
{
printf("Huhuhu");
return wuff();
}
const int x = miau();
When I
2006 Nov 28
2
[LLVMdev] question about the LLVM JIT
<cc'ing llvmdev>
On Tue, 28 Nov 2006, Eric van Riet Paap wrote:
> I'm working on using the LLVM JIT in PyPy and I hop you can give me a few
> hint.
ok
> I have some things working at and try to write C++ code for what I need
> from Python. The unittest I am working on at the moment is looks like
> this
>
> --- Python code...
> llglobalmul4 =
2011 May 07
2
[LLVMdev] nightly test suite failure: ms_struct-bitfield-init-1.c
On May 6, 2011, at 4:57 PM, Andrew Trick wrote:
> On May 6, 2011, at 1:29 AM, Jay Foad wrote:
>
>> This seems wrong -- if a test fails, it shouldn't stop the whole
>> "make", it should just get logged as a failure and continue.
>
> That's a frustrating aspect of the test-suite Makefiles. I don't know how to work around it without removing the test
2010 Jul 22
1
[LLVMdev] llvmv build failure
On Jul 22, 2010, at 2:53 PM, Eric Christopher wrote:
>
> On Jul 22, 2010, at 8:57 AM, Fariborz Jahanian wrote:
>
>>
>> Building llvm is failing for me today. I am using clang++ to build
>> (which has not changed).
>>
>> llvm[2]: Compiling EDMain.cpp for Debug+Asserts build (PIC)
>> EDMain.cpp:267:39: error: C-style cast from
2017 Jun 19
2
JIT, LTO and @llvm.global_ctors: Looking for advise
Hi Everyone,
We are looking for advise regarding the proper use of LTO in
conjunction with just-in time generated code. Our usage scenario goes
as follows.
1. Our front-end generates an LLVM module.
2. A small runtime support library is linked-in. The runtime
library is distributed as bitcode. It is generated using "clang++
-emit-llvm' and 'llvm-link'. This allows