search for: gvar

Displaying 20 results from an estimated 28 matches for "gvar".

Did you mean: gva
2020 Jun 03
2
Fwd: I cannot change value of global variable in LLVM IR using IRBuilder
...ble in ModulePass: bool runOnModule(llvm::Module &M) { IRBuilder<> Builder(M.getContext()); Instruction *I = &*inst_begin(M.getFunction("main")); Builder.SetInsertPoint(I); M.getOrInsertGlobal("globalKey", Builder.getInt64Ty()); GlobalVariable* gVar = M.getNamedGlobal("globalKey"); gVar->setLinkage(GlobalValue::InternalLinkage); gVar->setAlignment(Align(8)); gVar->setInitializer(Builder.getInt64(0)); gVar->setConstant(false); for (Function &F : M.functions()) { InstructionVisitor visitor(D...
2005 Aug 14
1
Panel data handling (lags, growth rates)
...ode and propose improvements. Second, it'll be great if some package-owner can adopt these orphans :-) and make them available to the R community. The two functions follow: library(Hmisc) # Am using Lag() in this. # Task: For a supplied list of variables (the list `lagvars'), # make new columns in a dataset denoting lagged values. # You must supply `unitvar' which identifies the unit that's # repeatedly observed. # You must supply the name of the time variable `timevar' # and you must tell a list of the lags that int...
2013 Apr 07
1
[LLVMdev] How to get the Instruction where one function use the global variable.
Hi, all I try to get the Instructions where one function use the global variable. for (llvm::Module::global_iterator gvar_iter = M.global_begin(); gvar_iter != M.global_end(); gvar_iter++) { llvm::GlobalVariable *gvar = &*gvar_iter; llvm::errs() << "const global var: " << gvar->getName() << "\n"; for ( llvm::GlobalVariable::use_iterator iter = g...
2020 Jun 03
2
Fwd: I cannot change value of global variable in LLVM IR using IRBuilder
...&M) { > > IRBuilder<> Builder(M.getContext()); > > Instruction *I = &*inst_begin(M.getFunction("main")); > > Builder.SetInsertPoint(I); > > M.getOrInsertGlobal("globalKey", Builder.getInt64Ty()); > > GlobalVariable* gVar = M.getNamedGlobal("globalKey"); > > gVar->setLinkage(GlobalValue::InternalLinkage); > > gVar->setAlignment(Align(8)); > > gVar->setInitializer(Builder.getInt64(0)); > > gVar->setConstant(false); > > > > for (Function &am...
2012 Nov 09
2
[LLVMdev] [NVPTX] llc -march=nvptx64 -mcpu=sm_20 generates invalid zero align for device function params
Hi Dmitry, > I'm attaching a patch that should fix the issue mentioned above. It > simply makes the same check seen in the same file for global > variables: > > emitPTXAddressSpace(PTy->getAddressSpace(), O); > if (GVar->getAlignment() == 0) > O << " .align " << (int) TD->getPrefTypeAlignment(ETy); > else > O << " .align " << GVar->getAlignment(); it's not quite the same because your patch uses the ABI alignment, while in this snippet...
2013 Mar 05
4
[LLVMdev] Convert C variable to LLVM IR Variable
Hi everyone, I am doing some work with LLVM IR, I need to use LLVM IR to do operation on C variables. Code emission is done by LLVM JIT. That variable is C thread local , for example __thread int* gvar; I think some methods to convert that variable to LLVM IR, (1) use external function I know LLVM IR is able to call an external function, so I can write codes that look like: int* load() { return gvar; } %x = call load(); // LLVM IR so gvar is converted to %x This method takes a lot of...
2012 Nov 09
0
[LLVMdev] [NVPTX] llc -march=nvptx64 -mcpu=sm_20 generates invalid zero align for device function params
...>: > Hi Dmitry, > > >> I'm attaching a patch that should fix the issue mentioned above. It >> >> simply makes the same check seen in the same file for global >> variables: >> >> emitPTXAddressSpace(PTy->getAddressSpace(), O); >> if (GVar->getAlignment() == 0) >> O << " .align " << (int) TD->getPrefTypeAlignment(ETy); >> else >> O << " .align " << GVar->getAlignment(); > > > it's not quite the same because your patch uses the ABI alignme...
2012 Nov 09
3
[LLVMdev] [NVPTX] llc -march=nvptx64 -mcpu=sm_20 generates invalid zero align for device function params
...; >>> I'm attaching a patch that should fix the issue mentioned above. It >>> >>> simply makes the same check seen in the same file for global >>> variables: >>> >>> emitPTXAddressSpace(PTy->getAddressSpace(), O); >>> if (GVar->getAlignment() == 0) >>> O << " .align " << (int) TD->getPrefTypeAlignment(ETy); >>> else >>> O << " .align " << GVar->getAlignment(); >> >> >> it's not quite the same because your...
2012 Nov 09
0
[LLVMdev] [NVPTX] llc -march=nvptx64 -mcpu=sm_20 generates invalid zero align for device function params
...aching a patch that should fix the issue mentioned above. It >>>> >>>> simply makes the same check seen in the same file for global >>>> variables: >>>> >>>> emitPTXAddressSpace(PTy->**getAddressSpace(), O); >>>> if (GVar->getAlignment() == 0) >>>> O << " .align " << (int) TD->getPrefTypeAlignment(ETy); >>>> else >>>> O << " .align " << GVar->getAlignment(); >>>> >>> >>> >>>...
2012 Nov 09
0
[LLVMdev] [NVPTX] llc -march=nvptx64 -mcpu=sm_20 generates invalid zero align for device function params
Dear all, I'm attaching a patch that should fix the issue mentioned above. It simply makes the same check seen in the same file for global variables: emitPTXAddressSpace(PTy->getAddressSpace(), O); if (GVar->getAlignment() == 0) O << " .align " << (int) TD->getPrefTypeAlignment(ETy); else O << " .align " << GVar->getAlignment(); Could you please review and commit? Do you think it needs a test case? Thanks, - D. dmikushin at hp2:~/forge/...
2011 Feb 04
1
GWAF package: lme.batch.imputed(): object 'kmat' not found
...d_release.0.fhsR.gz', pedfile='pedfile.csv', phen='phen1', covar=c('covar1','covar2'), kinmat='imputed_fhs.kinship.RData', outfile='imputed.FHS.IBC.GWAF.LME.output.0.txt' )) Gives the error messages: Error in coxme.varcheck(ncluster, varlist, n, gvars, groups, sparse, rescale, : object 'kmat' not found Error in lme.cov.out$theta : $ operator is invalid for atomic vectors Might anyone know why? Thank you for your time! Jim --------------------------------------------------- > R.Version() $platform [1] "x86_64-apple-darwin9...
2011 Jan 12
4
[LLVMdev] How to define a global variable?
...; ModuleID = 'repl-module' %0 = type opaque @x = external global %0* define %0* @0() { entry: store %0* inttoptr (i64 4316154480 to %0*), %0** @x ret %0* inttoptr (i64 4316154480 to %0*) } LLVM ERROR: Could not resolve external global address: x ----- C++ code ----- GlobalVariable *gvar = new GlobalVariable(*module, id_ty, false, GlobalVariable::ExternalLinkage, 0, str.str()); Value *valv = gen_expr(val); builder.CreateStore(valv, gvar, false); ... engine->getPointerToFunction(thunk);
2012 Jul 11
2
[LLVMdev] [NVPTX] llc -march=nvptx64 -mcpu=sm_20 generates invalid zero align for device function params
Hello, FYI, this is a bug http://llvm.org/bugs/show_bug.cgi?id=13324 When compiling the following code for sm_20, func params are by some reason given with .align 0, which is invalid. Problem does not occur if compiled for sm_10. > cat test.ll ; ModuleID = '__kernelgen_main_module' target datalayout = "e-p:64:64-i64:64:64-f64:64:64-n1:8:16:32:64" target triple =
2011 Apr 15
1
no solution yet, please help: extract p-value from mixed model in kinship package
...error > message******************************************** > Error message: Error in lmekin(yvar ~ mydata[, 3], data = mydata, random = ~1 | id, varlist = list(kmat))$coefficients[2, : incorrect number of dimensions In addition: Warning message: In coxme.varcheck(ncluster, varlist, n, gvars, groups, sparse, rescale, : Diagonal of variance matrix is not constant #**************************************ultimate target: to put in loop******************************* > Ultimately I want to put into the loop: > > for(i in 3:length(mydata)) { > > P <- vector (mode=&quo...
2010 May 12
2
Reading R code help--Beginner
...manuals and making some slow going progress. I am working with some source code from a Global Vector Auto -Regressive program written by Ranier Puhr from the R-forge group. I need help interpreting the processes of the following code. I am going to post in parts since it's pretty long: GVAR <- function (data, tw = NULL, p, q = p, r = NULL, weight, case, exo.var = FALSE, d = NULL, endo = NULL, ord = NULL, we = NULL, method = "max.eigen") # data ... timeseries data as list (each entry is a matrix of a subsystem of variables, # if exo.var=TRU...
2012 Oct 02
0
[LLVMdev] [RFC] OpenMP Representation in LLVM IR
...2* @a, i32* @b) > > !1 = metadata !{metadata !”OMP_REDUCTION”, metadata !”+”} > > > An Example > ---------- > Here is a more complex example, demonstrating LLVM IR representation > of a directive with several clauses of different types. > > C/C++ > ----- > int a, gVar; > int main() { > int lVar; > #pragma omp parallel default(shared), private(gVar, a), if(lVar) > { > ... > } > return (0); > } > > LLVM IR > ------- > @a = global i32 0, align 4 > @gVar = global i32 0, align 4 > define i32 @main () nounwind...
2012 Jan 17
0
[LLVMdev] ValueMapper question: no type mapping for GlobalValue?
...members, "MyType"); // create my initializer vector<Constant *> memberVals(1); memberVals[0] = Constant::getNullValue(Type::getInt32Ty(context)); Constant *init = ConstantStruct::get(type, memberVals); // create a global in the first module GlobalVariable *gvar = new GlobalVariable(*mod1, type, false, // isConstant GlobalValue::ExternalLinkage, init, "my_global_var" ); Linker *linker = new Linker("linker-name", &quo...
2012 Sep 28
11
[LLVMdev] [RFC] OpenMP Representation in LLVM IR
...void (metadata, ...)* @llvm.omp.compound(metadata !1, i32* @a, i32* @b) !1 = metadata !{metadata !”OMP_REDUCTION”, metadata !”+”} An Example ---------- Here is a more complex example, demonstrating LLVM IR representation of a directive with several clauses of different types. C/C++ ----- int a, gVar; int main() { int lVar; #pragma omp parallel default(shared), private(gVar, a), if(lVar) { ... } return (0); } LLVM IR ------- @a = global i32 0, align 4 @gVar = global i32 0, align 4 define i32 @main () nounwind uwtable ssp { %lVar = alloca i32, align 4 call void @llvm.omp.directi...
2012 Oct 03
0
[LLVMdev] [RFC] OpenMP Representation in LLVM IR
...t; i32* @b) > > !1 = metadata !{metadata !”OMP_REDUCTION”, metadata !”+”} > > > An Example > ---------- > Here is a more complex example, demonstrating LLVM IR representation > of a directive with several clauses of different types. > > C/C++ > ----- > int a, gVar; > int main() { > int lVar; > #pragma omp parallel default(shared), private(gVar, a), if(lVar) > { > ... > } > return (0); > } > > LLVM IR > ------- > @a = global i32 0, align 4 > @gVar = global i32 0, align 4 > define i32 @main () nounwind uwt...
2012 Jan 13
2
[LLVMdev] ValueMapper question: no type mapping for GlobalValue?
=?ISO-8859-1?Q?Rafael_=C1vila_de_Esp=EDndola?= wrote: > > I can reproduce this consistently, but only under an extremely large pile of > > code :-) I haven't tried to strip it down to minimal a test case yet, but I > > will. One salient difference with the code you've provided is that in my > > code, @a is a struct type. However, changing the example to use a