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

Side by Side Diff: src/IceTargetLoweringX86Base.h

Issue 1223133007: Factor out prelowerPhi for 32-bit targets. Disable adv phi lowering for ARM. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: fill in wqthe random test case for more undef stuff Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « src/IceTargetLoweringARM32.cpp ('k') | src/IceTargetLoweringX86BaseImpl.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/IceTargetLoweringX86Base.h - x86 lowering ----*- C++ -*-===// 1 //===- subzero/src/IceTargetLoweringX86Base.h - x86 lowering ----*- C++ -*-===//
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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 Operand *loOperand(Operand *Operand); 152 Operand *loOperand(Operand *Operand);
153 Operand *hiOperand(Operand *Operand); 153 Operand *hiOperand(Operand *Operand);
154 void finishArgumentLowering(Variable *Arg, Variable *FramePtr, 154 void finishArgumentLowering(Variable *Arg, Variable *FramePtr,
155 size_t BasicFrameOffset, size_t &InArgsSizeBytes); 155 size_t BasicFrameOffset, size_t &InArgsSizeBytes);
156 typename Traits::Address 156 typename Traits::Address
157 stackVarToAsmOperand(const Variable *Var) const final; 157 stackVarToAsmOperand(const Variable *Var) const final;
158 158
159 typename Traits::InstructionSet getInstructionSet() const final { 159 typename Traits::InstructionSet getInstructionSet() const final {
160 return InstructionSet; 160 return InstructionSet;
161 } 161 }
162 Operand *legalizeUndef(Operand *From, int32_t RegNum = Variable::NoRegister);
162 163
163 protected: 164 protected:
164 explicit TargetX86Base(Cfg *Func); 165 explicit TargetX86Base(Cfg *Func);
165 166
166 void postLower() override; 167 void postLower() override;
167 168
168 void lowerAlloca(const InstAlloca *Inst) override; 169 void lowerAlloca(const InstAlloca *Inst) override;
169 void lowerArithmetic(const InstArithmetic *Inst) override; 170 void lowerArithmetic(const InstArithmetic *Inst) override;
170 void lowerAssign(const InstAssign *Inst) override; 171 void lowerAssign(const InstAssign *Inst) override;
171 void lowerBr(const InstBr *Inst) override; 172 void lowerBr(const InstBr *Inst) override;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 Legal_None = 0, 224 Legal_None = 0,
224 Legal_Reg = 1 << 0, // physical register, not stack location 225 Legal_Reg = 1 << 0, // physical register, not stack location
225 Legal_Imm = 1 << 1, 226 Legal_Imm = 1 << 1,
226 Legal_Mem = 1 << 2, // includes [eax+4*ecx] as well as [esp+12] 227 Legal_Mem = 1 << 2, // includes [eax+4*ecx] as well as [esp+12]
227 Legal_All = ~Legal_None 228 Legal_All = ~Legal_None
228 }; 229 };
229 typedef uint32_t LegalMask; 230 typedef uint32_t LegalMask;
230 Operand *legalize(Operand *From, LegalMask Allowed = Legal_All, 231 Operand *legalize(Operand *From, LegalMask Allowed = Legal_All,
231 int32_t RegNum = Variable::NoRegister); 232 int32_t RegNum = Variable::NoRegister);
232 Variable *legalizeToVar(Operand *From, int32_t RegNum = Variable::NoRegister); 233 Variable *legalizeToVar(Operand *From, int32_t RegNum = Variable::NoRegister);
233 Operand *legalizeUndef(Operand *From, int32_t RegNum = Variable::NoRegister);
234 /// Legalize the first source operand for use in the cmp instruction. 234 /// Legalize the first source operand for use in the cmp instruction.
235 Operand *legalizeSrc0ForCmp(Operand *Src0, Operand *Src1); 235 Operand *legalizeSrc0ForCmp(Operand *Src0, Operand *Src1);
236 /// Turn a pointer operand into a memory operand that can be 236 /// Turn a pointer operand into a memory operand that can be
237 /// used by a real load/store operation. Legalizes the operand as well. 237 /// used by a real load/store operation. Legalizes the operand as well.
238 /// This is a nop if the operand is already a legal memory operand. 238 /// This is a nop if the operand is already a legal memory operand.
239 typename Traits::X86OperandMem *formMemoryOperand(Operand *Ptr, Type Ty, 239 typename Traits::X86OperandMem *formMemoryOperand(Operand *Ptr, Type Ty,
240 bool DoLegalize = true); 240 bool DoLegalize = true);
241 241
242 Variable *makeReg(Type Ty, int32_t RegNum = Variable::NoRegister); 242 Variable *makeReg(Type Ty, int32_t RegNum = Variable::NoRegister);
243 static Type stackSlotType(); 243 static Type stackSlotType();
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 private: 614 private:
615 ~TargetX86Base() override {} 615 ~TargetX86Base() override {}
616 BoolFolding FoldingInfo; 616 BoolFolding FoldingInfo;
617 }; 617 };
618 } // end of namespace X86Internal 618 } // end of namespace X86Internal
619 } // end of namespace Ice 619 } // end of namespace Ice
620 620
621 #include "IceTargetLoweringX86BaseImpl.h" 621 #include "IceTargetLoweringX86BaseImpl.h"
622 622
623 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H 623 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H
OLDNEW
« no previous file with comments | « src/IceTargetLoweringARM32.cpp ('k') | src/IceTargetLoweringX86BaseImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698