mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-23 04:35:43 +00:00
Clean up tags, link to the right .h file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3811 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7c7a07e501
commit
7dbf6836bf
@ -713,8 +713,8 @@ For example:<p>
|
|||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<a href="#Instruction">Instruction</a> *I = .. ;
|
<a href="#Instruction">Instruction</a> *I = .. ;
|
||||||
<a href="#BasicBlock">BasicBlock</a> *BB = I->getParent();
|
<a href="#BasicBlock">BasicBlock</a> *BB = I->getParent();
|
||||||
BB->getInstList().erase(I);
|
BB->getInstList().erase(I);
|
||||||
</pre><p>
|
</pre><p>
|
||||||
|
|
||||||
<!--_______________________________________________________________________-->
|
<!--_______________________________________________________________________-->
|
||||||
@ -724,13 +724,13 @@ For example:<p>
|
|||||||
<p><i>Replacing individual instructions</i></p>
|
<p><i>Replacing individual instructions</i></p>
|
||||||
<p>
|
<p>
|
||||||
Including "<a
|
Including "<a
|
||||||
href="/doxygen/BasicBlock_8h-source.html">llvm/Transforms/Utils/BasicBlock.h
|
href="/doxygen/BasicBlockUtils_8h-source.html">llvm/Transforms/Utils/BasicBlockUtils.h
|
||||||
</a>" permits use of two very useful replace functions:
|
</a>" permits use of two very useful replace functions:
|
||||||
<tt>ReplaceInstWithValue</tt> and <tt>ReplaceInstWithInst</tt>.
|
<tt>ReplaceInstWithValue</tt> and <tt>ReplaceInstWithInst</tt>.
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li>ReplaceInstWithValue
|
<li><tt>ReplaceInstWithValue</tt>
|
||||||
|
|
||||||
<p>This function replaces all uses (within a basic block) of a given
|
<p>This function replaces all uses (within a basic block) of a given
|
||||||
instruction with a value, and then removes the original instruction.
|
instruction with a value, and then removes the original instruction.
|
||||||
@ -740,11 +740,11 @@ integer with an null pointer to an integer.</p>
|
|||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
AllocaInst* instToReplace = ...;
|
AllocaInst* instToReplace = ...;
|
||||||
ReplaceInstWithValue(*instToReplace->getParent(), instToReplace,
|
ReplaceInstWithValue(*instToReplace->getParent(), instToReplace,
|
||||||
Constant::getNullValue(PointerType::get(Type::IntTy)));
|
Constant::getNullValue(PointerType::get(Type::IntTy)));
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<li>ReplaceInstWithInst
|
<li><tt>ReplaceInstWithInst</tt>
|
||||||
|
|
||||||
<p>This function replaces a particular instruction with another
|
<p>This function replaces a particular instruction with another
|
||||||
instruction. The following example illustrates the replacement of one
|
instruction. The following example illustrates the replacement of one
|
||||||
@ -752,7 +752,7 @@ instruction. The following example illustrates the replacement of one
|
|||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
AllocaInst* instToReplace = ...;
|
AllocaInst* instToReplace = ...;
|
||||||
ReplaceInstWithInst(*instToReplace->getParent(), instToReplace,
|
ReplaceInstWithInst(*instToReplace->getParent(), instToReplace,
|
||||||
new AllocaInst(Type::IntTy, 0, "ptrToReplacedInt");
|
new AllocaInst(Type::IntTy, 0, "ptrToReplacedInt");
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user