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

Side by Side Diff: src/IceConverter.cpp

Issue 1522433004: eliminate code related to --no-ir-gen (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Changes suggested by stichnot Created 5 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/IceCompiler.cpp ('k') | src/IceGlobalContext.h » ('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 /// \file 10 /// \file
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 LLVM2ICEFunctionConverter() = delete; 82 LLVM2ICEFunctionConverter() = delete;
83 LLVM2ICEFunctionConverter(const LLVM2ICEFunctionConverter &) = delete; 83 LLVM2ICEFunctionConverter(const LLVM2ICEFunctionConverter &) = delete;
84 LLVM2ICEFunctionConverter & 84 LLVM2ICEFunctionConverter &
85 operator=(const LLVM2ICEFunctionConverter &) = delete; 85 operator=(const LLVM2ICEFunctionConverter &) = delete;
86 86
87 public: 87 public:
88 explicit LLVM2ICEFunctionConverter(Ice::Converter &Converter) 88 explicit LLVM2ICEFunctionConverter(Ice::Converter &Converter)
89 : LLVM2ICEConverter(Converter), Func(nullptr) {} 89 : LLVM2ICEConverter(Converter), Func(nullptr) {}
90 90
91 void convertFunction(const Function *F) { 91 void convertFunction(const Function *F) {
92 if (Ctx->isIRGenerationDisabled())
93 return;
94 Func = Ice::Cfg::create(Ctx, Converter.getNextSequenceNumber()); 92 Func = Ice::Cfg::create(Ctx, Converter.getNextSequenceNumber());
95 Ice::Cfg::setCurrentCfg(Func.get()); 93 Ice::Cfg::setCurrentCfg(Func.get());
96 94
97 VarMap.clear(); 95 VarMap.clear();
98 NodeMap.clear(); 96 NodeMap.clear();
99 Func->setFunctionName(F->getName()); 97 Func->setFunctionName(F->getName());
100 Func->setReturnType(convertToIceType(F->getReturnType())); 98 Func->setReturnType(convertToIceType(F->getReturnType()));
101 Func->setInternal(F->hasInternalLinkage()); 99 Func->setInternal(F->hasInternalLinkage());
102 Ice::TimerMarker T(Ice::TimerStack::TT_llvmConvert, Func.get()); 100 Ice::TimerMarker T(Ice::TimerStack::TT_llvmConvert, Func.get());
103 101
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 Ctx->pushTimer(TimerID, StackID); 916 Ctx->pushTimer(TimerID, StackID);
919 } 917 }
920 LLVM2ICEFunctionConverter FunctionConverter(*this); 918 LLVM2ICEFunctionConverter FunctionConverter(*this);
921 FunctionConverter.convertFunction(&I); 919 FunctionConverter.convertFunction(&I);
922 if (TimeThisFunction) 920 if (TimeThisFunction)
923 Ctx->popTimer(TimerID, StackID); 921 Ctx->popTimer(TimerID, StackID);
924 } 922 }
925 } 923 }
926 924
927 } // end of namespace Ice 925 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceCompiler.cpp ('k') | src/IceGlobalContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698