search for: calledf

Displaying 2 results from an estimated 2 matches for "calledf".

Did you mean: called
2007 Jan 05
5
eval(parse(text vs. get when accessing a function
...in reply to accessing a list). Suppose I have similarly called functions, except for a postfix. E.g. f.1 <- function(x) {x + 1} f.2 <- function(x) {x + 2} And sometimes I want to call f.1 and some other times f.2 inside another function. I can either do: g <- function(x, fpost) { calledf <- eval(parse(text = paste("f.", fpost, sep = ""))) calledf(x) ## do more stuff } Or: h <- function(x, fpost) { calledf <- get(paste("f.", fpost, sep = "")) calledf(x) ## do more stuff } Two questions: 1) Why is the second be...
2017 Jun 15
7
[RFC] Profile guided section layout
...etBFI(); + for (auto &BB : F) { + Optional<uint64_t> BBCount = BFI.getBlockProfileCount(&BB); + if (!BBCount) + continue; + for (auto &I : BB) { + auto *CI = dyn_cast<CallInst>(&I); + if (!CI) + continue; + Function *CalledF = CI->getCalledFunction(); + if (!CalledF || CalledF->isIntrinsic()) + continue; + + uint64_t &Count = + Counts[std::make_pair(F.getName(), CalledF->getName())]; + Count = SaturatingAdd(Count, *BBCount); + } + } + } + + if (Counts.empt...