similar to: [LLVMdev] Invalid getelementptr indices?

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Invalid getelementptr indices?"

2012 Jan 26
0
[LLVMdev] Invalid getelementptr indices?
On Jan 26, 2012, at 12:13 PM, Ryan Taylor wrote: > I am getting an "Invalid getelementptr indices" when running some IR code that has been succesfully compiled and output by llvm-gcc. The "opt" doesn't like it even though it's output produced by llvm-gcc. Anyone know what could be causing this? > > opt: myFunction.bc:3:31: error: invalid getelementptr indices
2012 Jan 27
1
[LLVMdev] Invalid getelementptr indices?
I have done a clean checkout of llvm, polly and clang (via directions from polly website). Everything built and installed. Does clang not compile without a "main" function? On Thu, Jan 26, 2012 at 12:29 PM, Chris Lattner <clattner at apple.com> wrote: > > On Jan 26, 2012, at 12:13 PM, Ryan Taylor wrote: > > > I am getting an "Invalid getelementptr
2011 Jul 20
3
[LLVMdev] print the memory address computed by getelementptr
Hi, I want to print the memory locations computed by getelementptr. As I understood, getelementptr does not access the memory, but it contains the address it computes. I want to print these addresses at runtime (or process them). So, I try to build a function that takes as argument a pointer and prints its value. And to call this function, by sending the gep instruction as a parameter.
2011 Jul 20
0
[LLVMdev] print the memory address computed by getelementptr
On 7/20/11 10:02 AM, Jimborean Alexandra wrote: > Hi, > > I want to print the memory locations computed by getelementptr. As I > understood, getelementptr does not access the memory, but it contains > the address it computes. I want to print these addresses at runtime > (or process them). So, I try to build a function that takes as > argument a pointer and prints its
2011 Jul 25
1
[LLVMdev] print the memory address computed by getelementptr
Hi again, Thank you, your suggestion worked well. I was looking for a pointer to void actually. But it seems that I do not get the memory address when passing the value of the GEP instruction.  For instance, when I print the address accessed by the second operandof the store instruction store %struct.linked* %tmp23.reload8, %struct.linked** %curr.037.reg2mem I obtain a memory address of the
2014 Nov 22
2
[LLVMdev] How to get the indices in an getelementptr Value?
Hi, all I am a LLVM user. I want to get every element in the next instruction: %0 = load i32* getelementptr inbounds (%struct.Args* @globalArg, i64 0, i32 2), align 4, !dbg !85, !clap !86 Now I can only get value "i32* getelementptr inbounds (%struct.Args* @globalArg, i64 0, i32 2)" through "getOperand(0)", but I can not get "%struct.Args* @globalArg", "i64
2014 Nov 22
2
[LLVMdev] How to get the indices in an getelementptr Value?
Hi Michael, Thank you very much. But idx_begin/idx_end iterators can only be used through a getelementptr instruction, right? However, I think value "i32* getelementptr inbounds (%struct.Args* @globalArg, i64 0, i32 2)" itself is not a getelementptr instruction, so? Or could you tell me how can I get a getelementptr instruction first from this value?
2009 Oct 26
2
R CMD check: Error in .C
Function/file names are hypothetical. Say I have written myfunction.R, which calls myfunction.c via .C("myfunction", ...). I've compiled successfully myfunction.c via R CMD SHLIB myfunction.c in the terminal. Then, in the R console: dyn.load("myfunction.so") source("myfunction.R") test <- myfunction() # works fine So everything is in order, myfunction works
2014 Nov 22
3
[LLVMdev] How to get the indices in an getelementptr Value?
On Sat, Nov 22, 2014 at 11:09 AM, Sanjoy Das <sanjoy at playingwithpointers.com > wrote: > Hi Qiuping, > > If I'm reading the IR correctly, what you have is a > GetElementPtrConstantExpr [1]. It subclasses from llvm::Constant. > If you want the same code to handle GetElementPtrConstantExpr *and* GetElementPtrInst, you can use GEPOperator. > > Thanks, > --
2012 Nov 23
1
Adding a function with default parameters into the Rcmdr menu
Hi everyone, I made some tests with Rcmdr, to add a function with default parameters : For example (very simple): myfunction<-function(var="314"){ print("hello") print(var) } if I run myfunction() directly i see : > myfunction() [1] "hello" [1] "314" it's ok. But if i edit de Rcmdr-menu.txt (in
2009 Jun 03
1
Using constrOptim() function
I have a function myFunction(beta,x) where beta is a vector of coefficients and x is a data frame (think of it as a matrix). I want to optimize the function myFunction() by ONLY changing beta, i.e. x stays constant, with 4 constraints. I have the following code (with a separate source file for the function): rm(list=ls()) source('mySourceFile')
2011 Jan 17
5
[LLVMdev] How to get the name and argument of a function
Hi everyone: The code I am analyzing is : int main() { int i = 0; printf("hello world!"); printf( "%d" , i ); } I want to get each place where printf is called, and the argument used during that call. so I write llvm pass code like: void Myfunction( Function & F){ for( Function::iterator b = F.begin() , be = F.end() ;
2012 Mar 13
2
beginner's loop issue
Dear All, I hope you don't mind helping me with this small issue. I haven't been using R in years and I'm trying to fill in a matrix with the output of a function (I'm probably using the Matlab logic here and it's not working). Here is my code: for (i in 1:length(input)){ out[i,1:3] <- MyFunction(input[i,1],input[i,2], input[i,3]) out[i,4:6] <-
2006 May 16
3
multiple plots in a function()
Dear all, I have the following problem: I have written a function genereating to plots, eg myfunction <- (data, some.parameters) { #some calculations etc . par (mfrow=c(1,2)) plot1(......) plot2(.....) } which works fine. But for analysing several variants, I tried a slope, eg: par (mfrow=c(5,5)) for ( i in 1:10) { myfunction(data, i) } Off
2016 Jul 19
4
RFC: inbounds on getelementptr indices for global splitting
Hi all, I'd like to propose an IR extension that allows the inbounds keyword to be attached to indices in a getelementptr constantexpr. By placing the inbounds keyword on an index, any pointer derived from the getelementptr outside of the bounds of the element referred to by that index, other than the pointer one past the end of the element, shall be treated as a poison value. The main
2011 Jun 10
4
running R commands asynchronously
I am interested in running R commands asynchronously. My first choice is in the same R session that I am currently in. Here, the goal would be to run something like RunAsynchSameSession(myfunction(), "outputname.rda") Once RunAsynchSameSession had started myfunction(), RunAsynchSameSession would complete immediately. myfunction would keep going. It is OK if execution of the
2006 Jun 28
2
hopefully my last question on lapply
Marc and many other people ( whose names escape me ) have been very helpful in explaining the use of lapply to me. In his last response, Marc explained that if tradevectors is a list of vectors of different lengths ( excuse my terminology ) then lapply(tradevectors,function(x) G[x]*B[x] ) will go through each component of the list as if it was a vector and apply the element by element
2011 Oct 28
3
program never enters browser mode when I add browser()
Dear All I have a program that breaks at the following lines of code: bigfunction = { ... object1 = myfunction(x) object2 = strsplit(object1, ",")[[1]] ... } where myfunction is defined elsewhere outside of bigfunction. The error I get is "error in strsplit() -- object1 not found". However, when I insert browser() into my code so that the above reads, bigfunction = {
2008 Jul 21
1
Howto Restart A Function with Try-Error Catch
Hi all, I have a function - let's call it "myfunction". This function is based on some random number generator. Now, once in a while the function will break/crash depending on the random number it generate inside the function. To avoid the problem, what I intend to do is the following: 1. Catch the try-error using class. 2. Redo the function if it returns "try-error" 3.
2007 Jun 30
2
Determining whether a function's return value is assigned
Dear all, Does R offer a means by which a function can determine whether its return value is assigned? I am using R 2.4.1 for Windows. Suppose what I am looking for is called "return.value.assigned". Then one might use it like this myfunction <- function () { # Create bigobject here if (return.value.assigned()) { bigobject } else {