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

Side by Side Diff: src/IceInstX8664.cpp

Issue 1411583007: Combine allocas (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Finish fast path. Created 5 years, 1 month 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/IceInstX8632.cpp ('k') | src/IceInstX86BaseImpl.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/IceInstX8664.cpp - X86-64 instruction implementation ---===// 1 //===- subzero/src/IceInstX8664.cpp - X86-64 instruction implementation ---===//
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 163 }
164 } else { 164 } else {
165 // There is only the offset. 165 // There is only the offset.
166 Offset->dump(Func, Str); 166 Offset->dump(Func, Str);
167 } 167 }
168 Str << "]"; 168 Str << "]";
169 } 169 }
170 170
171 MachineTraits<TargetX8664>::Address 171 MachineTraits<TargetX8664>::Address
172 MachineTraits<TargetX8664>::X86OperandMem::toAsmAddress( 172 MachineTraits<TargetX8664>::X86OperandMem::toAsmAddress(
173 MachineTraits<TargetX8664>::Assembler *Asm) const { 173 MachineTraits<TargetX8664>::Assembler *Asm,
174 const Ice::TargetLowering *Target) const {
175 // TODO(sehr): handle rematerializable base/index.
176 (void)Target;
177 if (getBase())
178 assert(!getBase()->isRematerializable());
179 if (getIndex())
180 assert(!getIndex()->isRematerializable());
174 int32_t Disp = 0; 181 int32_t Disp = 0;
175 AssemblerFixup *Fixup = nullptr; 182 AssemblerFixup *Fixup = nullptr;
176 // Determine the offset (is it relocatable?) 183 // Determine the offset (is it relocatable?)
177 if (getOffset()) { 184 if (getOffset()) {
178 if (const auto *CI = llvm::dyn_cast<ConstantInteger32>(getOffset())) { 185 if (const auto *CI = llvm::dyn_cast<ConstantInteger32>(getOffset())) {
179 Disp = static_cast<int32_t>(CI->getValue()); 186 Disp = static_cast<int32_t>(CI->getValue());
180 } else if (const auto CR = 187 } else if (const auto CR =
181 llvm::dyn_cast<ConstantRelocatable>(getOffset())) { 188 llvm::dyn_cast<ConstantRelocatable>(getOffset())) {
182 Disp = CR->getOffset() - 4; 189 Disp = CR->getOffset() - 4;
183 Fixup = Asm->createFixup(PcRelFixup, CR); 190 Fixup = Asm->createFixup(PcRelFixup, CR);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 Var->dump(Func); 253 Var->dump(Func);
247 else 254 else
248 Var->dump(Str); 255 Var->dump(Str);
249 Str << ")"; 256 Str << ")";
250 } 257 }
251 258
252 } // namespace X86Internal 259 } // namespace X86Internal
253 } // end of namespace Ice 260 } // end of namespace Ice
254 261
255 X86INSTS_DEFINE_STATIC_DATA(TargetX8664) 262 X86INSTS_DEFINE_STATIC_DATA(TargetX8664)
OLDNEW
« no previous file with comments | « src/IceInstX8632.cpp ('k') | src/IceInstX86BaseImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698