Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1013)

Unified Diff: src/IceInst.h

Issue 401523003: Lower insertelement and extractelement. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Rebase Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceConverter.cpp ('k') | src/IceInst.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInst.h
diff --git a/src/IceInst.h b/src/IceInst.h
index 0397e02a7e54d4743b0f7b3c5d42bf3c7ede4e82..0a6c61d75cd3ea79ea19ad966450422c7ae7594d 100644
--- a/src/IceInst.h
+++ b/src/IceInst.h
@@ -41,9 +41,11 @@ public:
Br,
Call,
Cast,
+ ExtractElement,
Fcmp,
Icmp,
IntrinsicCall,
+ InsertElement,
Load,
Phi,
Ret,
@@ -344,6 +346,29 @@ private:
const OpKind CastKind;
};
+// ExtractElement instruction.
+class InstExtractElement : public Inst {
+public:
+ static InstExtractElement *create(Cfg *Func, Variable *Dest, Operand *Source1,
+ Operand *Source2) {
+ return new (Func->allocateInst<InstExtractElement>())
+ InstExtractElement(Func, Dest, Source1, Source2);
+ }
+
+ virtual void dump(const Cfg *Func) const;
+ static bool classof(const Inst *Inst) {
+ return Inst->getKind() == ExtractElement;
+ }
+
+private:
+ InstExtractElement(Cfg *Func, Variable *Dest, Operand *Source1,
+ Operand *Source2);
+ InstExtractElement(const InstExtractElement &) LLVM_DELETED_FUNCTION;
+ InstExtractElement &
+ operator=(const InstExtractElement &) LLVM_DELETED_FUNCTION;
+ virtual ~InstExtractElement() {}
+};
+
// Floating-point comparison instruction. The source operands are
// captured in getSrc(0) and getSrc(1).
class InstFcmp : public Inst {
@@ -402,6 +427,28 @@ private:
const ICond Condition;
};
+// InsertElement instruction.
+class InstInsertElement : public Inst {
+public:
+ static InstInsertElement *create(Cfg *Func, Variable *Dest, Operand *Source1,
+ Operand *Source2, Operand *Source3) {
+ return new (Func->allocateInst<InstInsertElement>())
+ InstInsertElement(Func, Dest, Source1, Source2, Source3);
+ }
+
+ virtual void dump(const Cfg *Func) const;
+ static bool classof(const Inst *Inst) {
+ return Inst->getKind() == InsertElement;
+ }
+
+private:
+ InstInsertElement(Cfg *Func, Variable *Dest, Operand *Source1,
+ Operand *Source2, Operand *Source3);
+ InstInsertElement(const InstInsertElement &) LLVM_DELETED_FUNCTION;
+ InstInsertElement &operator=(const InstInsertElement &) LLVM_DELETED_FUNCTION;
+ virtual ~InstInsertElement() {}
+};
+
// Call to an intrinsic function. The call target is captured as getSrc(0),
// and arg I is captured as getSrc(I+1).
class InstIntrinsicCall : public InstCall {
« no previous file with comments | « src/IceConverter.cpp ('k') | src/IceInst.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698