| dominates | R Documentation |
These methods determine dominance in the sense of
whether an instruction will always be evaluated
before another (or BasicBlock-class)
regardless of the path through the Function.
If one is querying several instructions in a given
Function-class,
it can be best to compute the DominatorTree
once and use that as the first argument in each of the calls
to dominates. This avoids recomputing it each time.
dominates(x, y, z, ...)
postDominates(x, y, ...)
x, y, z |
one can either specify the Instruction and the Instruction and BasicBlock, or pass the (Post)DominatorTree as the first argument and then the Instruction and Instruction/BasicBlock. |
... |
arguments for methods. Currently ignored for the DominatorTree functions |
DTL
f = system.file("IR/loop.ir", package = "Rllvm")
m = parseIR(f)
stripDebugInfo(m)
b = getBlocks(m$loop)
dominates(b[[1]], b[[2]])
dominates(b[[1]][[1]], b[[2]])
dominates(b[[3]], b[[2]])
dtree = DominatorTree(m$loop)
dominates(dtree, b[[1]], b[[2]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.