Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] How to get the left-hand operand of an instruction?"
2010 Apr 06
0
[LLVMdev] How to get the left-hand operand of an instruction?
Hi Qiuping yi,
> I am a new novice of LLVM, and I want know how to get the left-hand
> operand of an instruction?
>
> For example:
> how to get the %temp2 operand in the next instruction:
>
> %temp2 = malloc i8, i32 %n
there is no left-hand side, temp2 is just a name for the instruction.
Since the LLVM IR is in SSA form, registers have exactly one definition,
and thus there
2010 Apr 06
0
[LLVMdev] How to get the left-hand operand of an instruction?
Hi Duncan,
I have catched your reply and solved the problem. Thank you for the
elaborate reply.
Best Regards!
2010/4/6 Duncan Sands <baldrick at free.fr>
> Hi increaseing, please ask on the list rather than writing to me directly.
> That way others can answer, and the discussion is archived for the benefit
> of people with the same question in the future.
>
> Best
2009 Feb 11
2
error in my previous message
i'm sorry. i had an error in my previous code because i left out a
letter in the rownames.
while fixing that, i also found a solution. so i'm sorry for the
confusion.
below is my fix.
temp2 <- matrix(rnorm(10),nc=1,nrow=10)
rownames(temp2) <-
2009 Feb 11
2
sorting a matrix by the column
this is a bad question but I can't figure it out and i've tried. if i
sort the 2 column
matrix , temp1, by the first column, then things work as expected. But,
if I sort the 1 column matrix, temp2, then it gets turned coerced to a
vector. I realize that I
need to use drop=FALSE but i've put it in a few different places with no
success. Thanks.
temp1 <-
2012 Oct 31
2
Aggregate Table Data into Cell Frequencies
R-help -
I have this set of aggregated tables (sample data below via dput()). And I
would like to have delayValue as the column variables with the "temp"
(temp1, temp2, temp3) values as the row variables. However I would like to
have the temp variables *aggregated into single rows* so that I have the
frequency ("Freq" | counts) of each time each "delayValue" occurs
2004 Sep 28
3
sapply behavior
Hi,
I use sapply very frequently, but I have recently noticed a behavior of
sapply which I don't understand and have never seen before. Basically,
sapply returns what looks like a matrix, says it a matrix, and appears to
let me do matrix things (like transpose). But it is also a list and behaves
like a list when I subset it, not a vector (so I can't sort a row for
instance). I
2006 Jan 04
3
matrix math
I am using R 2.1.1 in an windows XP environment.
I have 2 dataframes, temp1 and temp2.
Each dataframe has 20 variables (“cocolumns") and 525 observations (“rows”). All variables are numeric.
I want to create a new dataframe that also has 20 columns and 525 rows. The values in this dataframe should be the sum of the 2 other dataframe.
(i.e. temp1$column
2003 Nov 23
4
remove 0 rows from a data frame
Dear all,
As part of a larger function, I am randomly removing rows from a data
frame. The number of removed rows is determmined by a Poisson distribution
with a low mean. Sometimes, the random number is 0, and that's when the
problem starts:
My data frame:
> temp
occ x y dbh age
801 0 2977.196 3090.225 6 36.0
802 0 2951.892 3083.769 8 40.6
803 0 2919.111
2007 Jan 30
2
rbind-ing list
hi,
i have a list of data.frame that has same structure. i would like to know a
efficient way of rbind-ing it.
right now, i write:
n = length(temp) # 'temp' is a list of data.frames
temp2 = data.frame()
for (i in 1:n) temp2 = rbind( temp2, temp[[i]])
return(temp2)
but this is not an efficient way since we keeping overwriting temp2. i
wonder if there's faster way.
thanks
--
2011 Jun 17
3
rle on large data . . . without a for loop!
I think need to do something like this:
dat<-data.frame(state=sample(id=rep(1:5,each=200),1:3, 1000,
replace=T,prob=c(0.7,0.05,0.25)),V1=runif(1,10,1000),V2=rnorm(1000))
rle.dat<-rle(dat$state)
temp<-1
out<-data.frame(id=1:length(rle.dat$length))
for(i in 1:length(rle.dat$length)){
temp2<-temp+rle.dat$length[[i]]
out$V1[i]<-mean(dat$V1[temp:temp2])
2009 May 28
2
Replace is leaking?
Okay, someone explain this behaviour to me:
Browse[1]> replace(rep(0, 4000), temp1[12] , temp2[12])[3925]
[1] 0.4462404
Browse[1]> temp1[12]
[1] 3926
Browse[1]> temp2[12]
[1] 0.4462404
Browse[1]> replace(rep(0, 4000), 3926 , temp2[12])[3925]
[1] 0
For some reason, R seems to shift indices along when doing this replacement.
Has anyone encountered this bug before? It seems to crop up
2010 Nov 19
3
Sweave Dynamic Graph Question
i have a time Series of IBM closing px from 1/1/2000 to today
I want to graph the time serie by dividing the graph by year and month
all the monthly graphs with the same year will go to one page. so from
1/1/2000 to 11/19/2010. i will have
11 pages, and each page will have 12 graphs (jan to dec) except for 2010.
I am able to do it in R, but when i use sweave, I can only print the last
page.
2006 Mar 03
1
NA in eigen()
Hi,
I am using eigen to get an eigen decomposition of a square, symmetric
matrix. For some reason, I am getting a column in my eigen vectors (the
52nd column out of 601) that is a column of all NAs. I am using the option,
symmetric=T for eigen. I just discovered that I do not get this behavior
when I use the option EISPACK=T. With EISPACK=T, the 52nd eigenvector is
(up to rounding error) a
2011 Mar 09
2
Anomaly with unique and match
I stumbled onto this working on an update to coxph. The last 6 lines
below are the question, the rest create a test data set.
tmt585% R
R version 2.12.2 (2011-02-25)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-unknown-linux-gnu (64-bit)
# Lines of code from survival/tests/singtest.R
> library(survival)
Loading required package: splines
2010 Oct 17
4
how to convert string to object?
temp = "~aparch("
temp1 = paste(temp,1, sep = "")
temp2 = paste(temp1,1, sep = ",")
temp3 = paste(temp2, ")",sep = "")
temp 3 is a character but I want to convert to formula object. How do I do
this?
--
View this message in context: http://r.789695.n4.nabble.com/how-to-convert-string-to-object-tp2999281p2999281.html
Sent from the R help mailing
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,
> --
2015 Jan 31
4
[LLVMdev] How to install poolalloc?
Hi, John Criswell
Thank you very much.
I am installing LLVM-3.2, but I encounter the next error when carrying out
"make":
llvm[3]: Compiling ClangASTNodesEmitter.cpp for Release+Asserts build
ClangASTNodesEmitter.cpp: In member function ‘std::pair<llvm::Record*,
llvm::Record*><unnamed>::ClangASTNodesEmitter::EmitNode(const
std::multimap<llvm::Record*, llvm::Record*,
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?
2015 Jan 30
2
[LLVMdev] How to install poolalloc?
I am just not upgrade my LLVM. So I must use some higer LLVM version, right?
--------------------------------------------
Qiuping Yi
Institute Of Software
Chinese Academy of Sciences
On Fri, Jan 30, 2015 at 11:21 PM, John Criswell <jtcriswel at gmail.com> wrote:
> On 1/30/15 10:17 AM, Qiuping Yi wrote:
>
> Thank you. But now I am using LLVM 2.9, so which version of poolalloc I
2011 Mar 29
2
List extraction
I have created a list of tables with the same columns but different number of
row.
Example (actual list has ~200 elements):
> temp1<- data.frame(ID=c("Herb","Shrub"),stat=c(4,5),pvalue=c(.03,.04))
> temp2<- data.frame(ID=c("Herb","Shrub",
> "Tree"),stat=c(12,15,13),pvalue=c(.2,0.4,.3))
> L<-list(a=temp1,b=temp2)
> L
$a