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

Side by Side Diff: src/IceTargetLoweringARM32.h

Issue 1474883002: Subzero. ARM32. Pre-lowers calls to ARM32 Helpers. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: 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 | « no previous file | src/IceTargetLoweringARM32.cpp » ('j') | src/IceTargetLoweringARM32.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceTargetLoweringARM32.h - ARM32 lowering ----*- C++ -*-===// 1 //===- subzero/src/IceTargetLoweringARM32.h - ARM32 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 void lowerInsertElement(const InstInsertElement *Inst) override; 230 void lowerInsertElement(const InstInsertElement *Inst) override;
231 void lowerLoad(const InstLoad *Inst) override; 231 void lowerLoad(const InstLoad *Inst) override;
232 void lowerPhi(const InstPhi *Inst) override; 232 void lowerPhi(const InstPhi *Inst) override;
233 void lowerRet(const InstRet *Inst) override; 233 void lowerRet(const InstRet *Inst) override;
234 void lowerSelect(const InstSelect *Inst) override; 234 void lowerSelect(const InstSelect *Inst) override;
235 void lowerStore(const InstStore *Inst) override; 235 void lowerStore(const InstStore *Inst) override;
236 void lowerSwitch(const InstSwitch *Inst) override; 236 void lowerSwitch(const InstSwitch *Inst) override;
237 void lowerUnreachable(const InstUnreachable *Inst) override; 237 void lowerUnreachable(const InstUnreachable *Inst) override;
238 void prelowerPhis() override; 238 void prelowerPhis() override;
239 uint32_t getCallStackArgumentsSizeBytes(const InstCall *Instr) override; 239 uint32_t getCallStackArgumentsSizeBytes(const InstCall *Instr) override;
240 void genTargetHelperCallFor(Inst *Instr) override { (void)Instr; } 240 void genTargetHelperCallFor(Inst *Instr) override;
241 void doAddressOptLoad() override; 241 void doAddressOptLoad() override;
242 void doAddressOptStore() override; 242 void doAddressOptStore() override;
243 void randomlyInsertNop(float Probability, 243 void randomlyInsertNop(float Probability,
244 RandomNumberGenerator &RNG) override; 244 RandomNumberGenerator &RNG) override;
245 245
246 OperandARM32Mem *formMemoryOperand(Operand *Ptr, Type Ty); 246 OperandARM32Mem *formMemoryOperand(Operand *Ptr, Type Ty);
247 247
248 Variable64On32 *makeI64RegPair(); 248 Variable64On32 *makeI64RegPair();
249 Variable *makeReg(Type Ty, int32_t RegNum = Variable::NoRegister); 249 Variable *makeReg(Type Ty, int32_t RegNum = Variable::NoRegister);
250 static Type stackSlotType(); 250 static Type stackSlotType();
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 bool MaybeLeafFunc = true; 853 bool MaybeLeafFunc = true;
854 size_t SpillAreaSizeBytes = 0; 854 size_t SpillAreaSizeBytes = 0;
855 size_t FixedAllocaSizeBytes = 0; 855 size_t FixedAllocaSizeBytes = 0;
856 size_t FixedAllocaAlignBytes = 0; 856 size_t FixedAllocaAlignBytes = 0;
857 bool PrologEmitsFixedAllocas = false; 857 bool PrologEmitsFixedAllocas = false;
858 uint32_t MaxOutArgsSizeBytes = 0; 858 uint32_t MaxOutArgsSizeBytes = 0;
859 // TODO(jpp): std::array instead of array. 859 // TODO(jpp): std::array instead of array.
860 static llvm::SmallBitVector TypeToRegisterSet[RCARM32_NUM]; 860 static llvm::SmallBitVector TypeToRegisterSet[RCARM32_NUM];
861 static llvm::SmallBitVector RegisterAliases[RegARM32::Reg_NUM]; 861 static llvm::SmallBitVector RegisterAliases[RegARM32::Reg_NUM];
862 static llvm::SmallBitVector ScratchRegs; 862 static llvm::SmallBitVector ScratchRegs;
863 /// Helper class that understands the Calling Convention and register
864 /// assignments. The first few integer type parameters can use r0-r3,
Jim Stichnoth 2015/11/24 22:24:00 sentence ends in a comma - is there more that got
John 2015/11/25 16:39:56 No idea what happened here.
863 llvm::SmallBitVector RegsUsed; 865 llvm::SmallBitVector RegsUsed;
864 VarList PhysicalRegisters[IceType_NUM]; 866 VarList PhysicalRegisters[IceType_NUM];
865 867
866 /// Helper class that understands the Calling Convention and register 868 /// Helper class that understands the Calling Convention and register
867 /// assignments. The first few integer type parameters can use r0-r3, 869 /// assignments. The first few integer type parameters can use r0-r3,
868 /// regardless of their position relative to the floating-point/vector 870 /// regardless of their position relative to the floating-point/vector
869 /// arguments in the argument list. Floating-point and vector arguments 871 /// arguments in the argument list. Floating-point and vector arguments
870 /// can use q0-q3 (aka d0-d7, s0-s15). For more information on the topic, 872 /// can use q0-q3 (aka d0-d7, s0-s15). For more information on the topic,
871 /// see the ARM Architecture Procedure Calling Standards (AAPCS). 873 /// see the ARM Architecture Procedure Calling Standards (AAPCS).
872 /// 874 ///
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 llvm::SmallBitVector ValidF64Regs; 912 llvm::SmallBitVector ValidF64Regs;
911 llvm::SmallBitVector ValidV128Regs; 913 llvm::SmallBitVector ValidV128Regs;
912 }; 914 };
913 915
914 private: 916 private:
915 ~TargetARM32() override = default; 917 ~TargetARM32() override = default;
916 918
917 OperandARM32Mem *formAddressingMode(Type Ty, Cfg *Func, const Inst *LdSt, 919 OperandARM32Mem *formAddressingMode(Type Ty, Cfg *Func, const Inst *LdSt,
918 Operand *Base); 920 Operand *Base);
919 921
922 void DoNothingHelper(const InstCall *) {}
923 void DivRem64Helper(const InstCall *Inst);
924 std::unordered_map<Operand *, void (TargetARM32::*)(const InstCall *Inst)>
925 ARM32Helpers;
926
920 class BoolComputationTracker { 927 class BoolComputationTracker {
921 public: 928 public:
922 BoolComputationTracker() = default; 929 BoolComputationTracker() = default;
923 ~BoolComputationTracker() = default; 930 ~BoolComputationTracker() = default;
924 931
925 void forgetProducers() { KnownComputations.clear(); } 932 void forgetProducers() { KnownComputations.clear(); }
926 void recordProducers(CfgNode *Node); 933 void recordProducers(CfgNode *Node);
927 934
928 const Inst *getProducerOf(const Operand *Opnd) const { 935 const Inst *getProducerOf(const Operand *Opnd) const {
929 auto *Var = llvm::dyn_cast<Variable>(Opnd); 936 auto *Var = llvm::dyn_cast<Variable>(Opnd);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 1045
1039 private: 1046 private:
1040 ~TargetHeaderARM32() = default; 1047 ~TargetHeaderARM32() = default;
1041 1048
1042 TargetARM32Features CPUFeatures; 1049 TargetARM32Features CPUFeatures;
1043 }; 1050 };
1044 1051
1045 } // end of namespace Ice 1052 } // end of namespace Ice
1046 1053
1047 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H 1054 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H
OLDNEW
« no previous file with comments | « no previous file | src/IceTargetLoweringARM32.cpp » ('j') | src/IceTargetLoweringARM32.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698