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

Unified Diff: src/IceCfg.cpp

Issue 2380023002: [SubZero] Vector types support for MIPS (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.h » ('j') | src/IceTargetLoweringMIPS32.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfg.cpp
diff --git a/src/IceCfg.cpp b/src/IceCfg.cpp
index ef775fe2fc561202ebb369ee3ce95b54563c7193..0af025bb264ee1d6a04a3cdaa51b982c60d8d6e0 100644
--- a/src/IceCfg.cpp
+++ b/src/IceCfg.cpp
@@ -119,9 +119,14 @@ void Cfg::swapNodes(NodeList &NewNodes) {
template <> Variable *Cfg::makeVariable<Variable>(Type Ty) {
SizeT Index = Variables.size();
- Variable *Var = Target->shouldSplitToVariable64On32(Ty)
- ? Variable64On32::create(this, Ty, Index)
- : Variable::create(this, Ty, Index);
+ Variable *Var;
+ if (Target->shouldSplitToVariableVecOn32(Ty)) {
+ Var = VariableVecOn32::create(this, Ty, Index);
+ } else if (Target->shouldSplitToVariable64On32(Ty)) {
+ Var = Variable64On32::create(this, Ty, Index);
+ } else {
+ Var = Variable::create(this, Ty, Index);
+ }
Variables.push_back(Var);
return Var;
}
@@ -244,9 +249,13 @@ void Cfg::translate() {
}
// Create the Hi and Lo variables where a split was needed
- for (Variable *Var : Variables)
- if (auto *Var64On32 = llvm::dyn_cast<Variable64On32>(Var))
+ for (Variable *Var : Variables) {
+ if (auto *Var64On32 = llvm::dyn_cast<Variable64On32>(Var)) {
Var64On32->initHiLo(this);
+ } else if (auto *VarVecOn32 = llvm::dyn_cast<VariableVecOn32>(Var)) {
+ VarVecOn32->initVecElement(this);
+ }
+ }
// Instrument the Cfg, e.g. with AddressSanitizer
if (!BuildDefs::minimal() && getFlags().getSanitizeAddresses()) {
« no previous file with comments | « no previous file | src/IceInstMIPS32.h » ('j') | src/IceTargetLoweringMIPS32.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698