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

Unified Diff: src/IceTargetLoweringX8632.cpp

Issue 672393003: Subzero: Minor refactoring/additions in preparation for phi edge splitting. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Remove deprecated advanceBackward method Created 6 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 | « src/IceTargetLoweringX8632.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringX8632.cpp
diff --git a/src/IceTargetLoweringX8632.cpp b/src/IceTargetLoweringX8632.cpp
index 8ea5882ae282de3959030d59e79f219605547df6..8082c5223d41e58e14f8ed9caecb9d51602511a1 100644
--- a/src/IceTargetLoweringX8632.cpp
+++ b/src/IceTargetLoweringX8632.cpp
@@ -384,6 +384,8 @@ void TargetX8632::translateO2() {
return;
Func->dump("After stack frame mapping");
+ Func->deleteRedundantAssignments();
+
// Branch optimization. This needs to be done just before code
// emission. In particular, no transformations that insert or
// reorder CfgNodes should be done after branch optimization. We go
@@ -423,6 +425,8 @@ void TargetX8632::translateOm1() {
return;
Func->dump("After stack frame mapping");
+ Func->deleteRedundantAssignments();
+
// Nop insertion
if (shouldDoNopInsertion()) {
Func->doNopInsertion();
@@ -444,11 +448,13 @@ IceString TargetX8632::RegNames[] = {
#undef X
};
-Variable *TargetX8632::getPhysicalRegister(SizeT RegNum) {
+Variable *TargetX8632::getPhysicalRegister(SizeT RegNum, Type Ty) {
+ if (Ty == IceType_void)
+ Ty = IceType_i32;
assert(RegNum < PhysicalRegisters.size());
Variable *Reg = PhysicalRegisters[RegNum];
if (Reg == NULL) {
- Reg = Func->makeVariable(IceType_i32);
+ Reg = Func->makeVariable(Ty);
Reg->setRegNum(RegNum);
PhysicalRegisters[RegNum] = Reg;
// Specially mark esp as an "argument" so that it is considered
« no previous file with comments | « src/IceTargetLoweringX8632.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698