Chromium Code Reviews| Index: src/IceCfg.cpp |
| diff --git a/src/IceCfg.cpp b/src/IceCfg.cpp |
| index ef775fe2fc561202ebb369ee3ce95b54563c7193..4f03d85f3077f654fadd6492102021c3de12de92 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)) { |
|
Jim Stichnoth
2016/09/29 16:50:25
Probably better (more regular) like this:
if (Tar
jaydeep.patil
2016/09/30 07:02:51
Done.
|
| + Var = VariableVecOn32::create(this, Ty, Index); |
| + } else { |
| + Var = Target->shouldSplitToVariable64On32(Ty) |
| + ? Variable64On32::create(this, Ty, Index) |
| + : 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, Var->getType()); |
| + } |
| + } |
| // Instrument the Cfg, e.g. with AddressSanitizer |
| if (!BuildDefs::minimal() && getFlags().getSanitizeAddresses()) { |