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

Unified Diff: src/IceInstMIPS32.h

Issue 2404803002: [Subzero][MIPS32] Implement bitcast operation for both 32-bit and 64-bit operands (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addressed review comments Created 4 years, 2 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 | « no previous file | src/IceInstMIPS32.cpp » ('j') | tests_lit/llvm2ice_tests/bitcast.ll » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstMIPS32.h
diff --git a/src/IceInstMIPS32.h b/src/IceInstMIPS32.h
index 05f9bdf35120bd55ad7256fb73c2f06aa109ff68..e3f1e82459eb7dc6d86ad848b0c224768aeba3c7 100644
--- a/src/IceInstMIPS32.h
+++ b/src/IceInstMIPS32.h
@@ -1200,12 +1200,14 @@ class InstMIPS32Mov final : public InstMIPS32 {
InstMIPS32Mov &operator=(const InstMIPS32Mov &) = delete;
public:
- static InstMIPS32Mov *create(Cfg *Func, Variable *Dest, Operand *Src) {
- return new (Func->allocate<InstMIPS32Mov>()) InstMIPS32Mov(Func, Dest, Src);
+ static InstMIPS32Mov *create(Cfg *Func, Variable *Dest, Operand *Src,
+ Operand *Src2) {
+ return new (Func->allocate<InstMIPS32Mov>())
+ InstMIPS32Mov(Func, Dest, Src, Src2);
}
+
bool isRedundantAssign() const override {
- return !isMultiDest() && !isMultiSource() &&
- checkForRedundantAssign(getDest(), getSrc(0));
+ return checkForRedundantAssign(getDest(), getSrc(0));
}
// bool isSimpleAssign() const override { return true; }
void emit(const Cfg *Func) const override;
@@ -1213,17 +1215,10 @@ public:
void dump(const Cfg *Func) const override;
static bool classof(const Inst *Inst) { return isClassof(Inst, Mov); }
- bool isMultiDest() const { return DestHi != nullptr; }
-
- bool isMultiSource() const {
- assert(getSrcSize() == 1 || getSrcSize() == 2);
- return getSrcSize() == 2;
- }
-
Variable *getDestHi() const { return DestHi; }
private:
- InstMIPS32Mov(Cfg *Func, Variable *Dest, Operand *Src);
+ InstMIPS32Mov(Cfg *Func, Variable *Dest, Operand *Src, Operand *Src2);
void emitMultiDestSingleSource(const Cfg *Func) const;
void emitSingleDestMultiSource(const Cfg *Func) const;
« no previous file with comments | « no previous file | src/IceInstMIPS32.cpp » ('j') | tests_lit/llvm2ice_tests/bitcast.ll » ('J')

Powered by Google App Engine
This is Rietveld 408576698