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

Side by Side Diff: src/IceConverter.cpp

Issue 787333005: Subzero: Pull the node name out of the node structure. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add a comment Created 6 years 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 unified diff | Download patch
« no previous file with comments | « src/IceCfgNode.cpp ('k') | src/PNaClTranslator.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceConverter.cpp - Converts LLVM to Ice ---------------===// 1 //===- subzero/src/IceConverter.cpp - Converts LLVM to Ice ---------------===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file implements the LLVM to ICE converter. 10 // This file implements the LLVM to ICE converter.
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 } 149 }
150 return VarMap[V]; 150 return VarMap[V];
151 } 151 }
152 152
153 Ice::Variable *mapValueToIceVar(const Value *V) { 153 Ice::Variable *mapValueToIceVar(const Value *V) {
154 return mapValueToIceVar(V, convertToIceType(V->getType())); 154 return mapValueToIceVar(V, convertToIceType(V->getType()));
155 } 155 }
156 156
157 Ice::CfgNode *mapBasicBlockToNode(const BasicBlock *BB) { 157 Ice::CfgNode *mapBasicBlockToNode(const BasicBlock *BB) {
158 if (NodeMap.find(BB) == NodeMap.end()) { 158 if (NodeMap.find(BB) == NodeMap.end()) {
159 NodeMap[BB] = Func->makeNode(BB->getName()); 159 NodeMap[BB] = Func->makeNode();
160 if (ALLOW_DUMP)
161 NodeMap[BB]->setName(BB->getName());
160 } 162 }
161 return NodeMap[BB]; 163 return NodeMap[BB];
162 } 164 }
163 165
164 Ice::Type convertToIceType(Type *LLVMTy) const { 166 Ice::Type convertToIceType(Type *LLVMTy) const {
165 Ice::Type IceTy = TypeConverter.convertToIceType(LLVMTy); 167 Ice::Type IceTy = TypeConverter.convertToIceType(LLVMTy);
166 if (IceTy == Ice::IceType_NUM) 168 if (IceTy == Ice::IceType_NUM)
167 report_fatal_error(std::string("Invalid PNaCl type ") + 169 report_fatal_error(std::string("Invalid PNaCl type ") +
168 LLVMObjectAsString(LLVMTy)); 170 LLVMObjectAsString(LLVMTy));
169 return IceTy; 171 return IceTy;
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 Cfg *Fcn = FunctionConverter.convertFunction(&I); 894 Cfg *Fcn = FunctionConverter.convertFunction(&I);
893 translateFcn(Fcn); 895 translateFcn(Fcn);
894 if (ALLOW_DUMP && Ctx->getFlags().TimeEachFunction) 896 if (ALLOW_DUMP && Ctx->getFlags().TimeEachFunction)
895 Ctx->popTimer(TimerID, StackID); 897 Ctx->popTimer(TimerID, StackID);
896 } 898 }
897 899
898 emitConstants(); 900 emitConstants();
899 } 901 }
900 902
901 } // end of namespace Ice 903 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceCfgNode.cpp ('k') | src/PNaClTranslator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698