projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
A brief survey of priority_queue usage in the tree turned this up
[oota-llvm.git]
/
lib
/
VMCore
/
Instruction.cpp
diff --git
a/lib/VMCore/Instruction.cpp
b/lib/VMCore/Instruction.cpp
index 2316b486898222414b05853233f9ab44e2d12535..e8738d2ba72bd755ab7427f8987834bac0781558 100644
(file)
--- a/
lib/VMCore/Instruction.cpp
+++ b/
lib/VMCore/Instruction.cpp
@@
-68,6
+68,12
@@
void Instruction::eraseFromParent() {
getParent()->getInstList().erase(this);
}
getParent()->getInstList().erase(this);
}
+/// insertBefore - Insert an unlinked instructions into a basic block
+/// immediately before the specified instruction.
+void Instruction::insertBefore(Instruction *InsertPos) {
+ InsertPos->getParent()->getInstList().insert(InsertPos, this);
+}
+
/// moveBefore - Unlink this instruction from its current basic block and
/// insert it into the basic block that MovePos lives in, right before
/// MovePos.
/// moveBefore - Unlink this instruction from its current basic block and
/// insert it into the basic block that MovePos lives in, right before
/// MovePos.
@@
-128,6
+134,8
@@
const char *Instruction::getOpcodeName(unsigned OpCode) {
// Other instructions...
case ICmp: return "icmp";
case FCmp: return "fcmp";
// Other instructions...
case ICmp: return "icmp";
case FCmp: return "fcmp";
+ case VICmp: return "vicmp";
+ case VFCmp: return "vfcmp";
case PHI: return "phi";
case Select: return "select";
case Call: return "call";
case PHI: return "phi";
case Select: return "select";
case Call: return "call";
@@
-139,6
+147,8
@@
const char *Instruction::getOpcodeName(unsigned OpCode) {
case InsertElement: return "insertelement";
case ShuffleVector: return "shufflevector";
case GetResult: return "getresult";
case InsertElement: return "insertelement";
case ShuffleVector: return "shufflevector";
case GetResult: return "getresult";
+ case ExtractValue: return "extractvalue";
+ case InsertValue: return "insertvalue";
default: return "<Invalid operator> ";
}
default: return "<Invalid operator> ";
}