Displaying 2 results from an estimated 2 matches for "mysqrt".
2010 Mar 02
1
capturing errors in Sweave
Hi,
I'm writing a manual using Sweave and I want to be able to print errors from
bad code. Here's an example:
<Function-4a>>=
MySqrt <- function(x) {
if (missing(x)) {
stop("'x' is missing with no default")
}
if (!is.numeric(x)) {
stop("'x' should only be numeric")
}
if (x < 0) {
stop("'x' should be non-negative")
}
return(sqrt(x))
}
MySqrt()
M...
2018 Aug 30
2
Instruction does not dominate all uses!
Hello All,
I am instrumenting IR to pass addres of the function to runtime but I am
getting error - Instruction does not dominate all uses. I used M.dump() to
get below dump, not able to figure out what I am doing wrong. Any help
would be much appreciated.
define dso_local double @mysqrt(double %val1) local_unnamed_addr #0 {
entry:
%0 = bitcast double (double)* @mysqrt to i8*
%1 = call i64 @getAddr(i8* %0)
call void @funcInit(i64 %1)
%2 = call i64 @getRealFunArg(i32 0, i64 %1)
%mul = fmul double %val1, %val1
ret double %mul
}
!llvm.module.flags = !{!0}
!...