Loop | R Documentation |
Loop
ObjectsGiven a Loop
object, these functions allow us to query different
characteristics it may have.
getLoopBlocks
gets all of the BasicBlock-class
for a given loop. These are the blocks between the incoming/header
block that dominates the loops' blocks, and the back-edge
that leads back to the header.
isAnnotatedParallel(loop)
isRotatedForm(loop)
isLoopSimplifyForm(loop)
isGuarded(loop)
getGuardBranch(loop)
isCanonical(x)
numBlocks(x, ...)
numBackEdges(x, ...)
getParent(x)
getPredecessor(x, ...)
getHeader(x, ...)
isExiting(loop)
subLoops(loop)
preHeader(loop)
latch(loop)
isLatch(loop, block)
getIncomingAndBackEdge(loop)
isLoopInvariant(loop, val)
hasLoopInvariantOperands(loop, val)
getInductionVariable(loop, se = NULL, ...)
getBounds(x, y, ...)
getLoopBlocks(x, ...)
isAuxInductionVariable(loop, phi, se)
loop , x |
a |
val |
a |
se , y |
a |
block |
a |
phi |
a |
... |
additional arguments for methods |
DTL
f = system.file("IR/loop.ir", package = "Rllvm")
m = parseIR(f)
fun = m$nestedLoop
la = loopAnalysis(fun)
loops = getLoops(la)
sapply(loops, depth)
sapply(loops, isCanonical, la$scalarEvolution)
sapply(loops, numBlocks)
bl = lapply(loops, getLoopBlocks)
lapply(loops, getInductionVariable)
subLoops(loops[[2]])
inner = subLoops(loops[[2]])[[1]]
p = getParent(inner)
identical(p, loops[[2]])
preHeader(loops[[1]])
ins = getInstructions(m$nestedLoop)
w = sapply(ins, function(i) contains(loops[[3]], i))
getIncomingAndBackEdge(loops[[3]])
lapply(loops, getBounds, la)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.