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

Side by Side Diff: src/IceTargetLoweringARM32.h

Issue 1418853005: Subzero: Refactor some common TargetLowering initializations. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes 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/IceTargetLowering.cpp ('k') | src/IceTargetLoweringARM32.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/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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 ARM32InstructionSet InstructionSet = ARM32InstructionSet::Begin; 48 ARM32InstructionSet InstructionSet = ARM32InstructionSet::Begin;
49 }; 49 };
50 50
51 // The target lowering logic for ARM32. 51 // The target lowering logic for ARM32.
52 class TargetARM32 : public TargetLowering { 52 class TargetARM32 : public TargetLowering {
53 TargetARM32() = delete; 53 TargetARM32() = delete;
54 TargetARM32(const TargetARM32 &) = delete; 54 TargetARM32(const TargetARM32 &) = delete;
55 TargetARM32 &operator=(const TargetARM32 &) = delete; 55 TargetARM32 &operator=(const TargetARM32 &) = delete;
56 56
57 public: 57 public:
58 static void staticInit();
58 // TODO(jvoung): return a unique_ptr. 59 // TODO(jvoung): return a unique_ptr.
59 static TargetARM32 *create(Cfg *Func) { return new TargetARM32(Func); } 60 static TargetARM32 *create(Cfg *Func) { return new TargetARM32(Func); }
60 61
61 void initNodeForLowering(CfgNode *Node) override { 62 void initNodeForLowering(CfgNode *Node) override {
62 BoolComputations.forgetProducers(); 63 BoolComputations.forgetProducers();
63 BoolComputations.recordProducers(Node); 64 BoolComputations.recordProducers(Node);
64 BoolComputations.dump(Func); 65 BoolComputations.dump(Func);
65 } 66 }
66 67
67 void translateOm1() override; 68 void translateOm1() override;
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 /// centered on the given Var's offset plus StackAdjust, and use it. 545 /// centered on the given Var's offset plus StackAdjust, and use it.
545 StackVariable *legalizeVariableSlot(Variable *Var, int32_t StackAdjust, 546 StackVariable *legalizeVariableSlot(Variable *Var, int32_t StackAdjust,
546 Variable *OrigBaseReg); 547 Variable *OrigBaseReg);
547 548
548 TargetARM32Features CPUFeatures; 549 TargetARM32Features CPUFeatures;
549 bool UsesFramePointer = false; 550 bool UsesFramePointer = false;
550 bool NeedsStackAlignment = false; 551 bool NeedsStackAlignment = false;
551 bool MaybeLeafFunc = true; 552 bool MaybeLeafFunc = true;
552 size_t SpillAreaSizeBytes = 0; 553 size_t SpillAreaSizeBytes = 0;
553 // TODO(jpp): std::array instead of array. 554 // TODO(jpp): std::array instead of array.
554 llvm::SmallBitVector TypeToRegisterSet[IceType_NUM]; 555 static llvm::SmallBitVector TypeToRegisterSet[IceType_NUM];
555 llvm::SmallBitVector RegisterAliases[RegARM32::Reg_NUM]; 556 static llvm::SmallBitVector RegisterAliases[RegARM32::Reg_NUM];
556 llvm::SmallBitVector ScratchRegs; 557 static llvm::SmallBitVector ScratchRegs;
557 llvm::SmallBitVector RegsUsed; 558 llvm::SmallBitVector RegsUsed;
558 VarList PhysicalRegisters[IceType_NUM]; 559 VarList PhysicalRegisters[IceType_NUM];
559 560
560 /// Helper class that understands the Calling Convention and register 561 /// Helper class that understands the Calling Convention and register
561 /// assignments. The first few integer type parameters can use r0-r3, 562 /// assignments. The first few integer type parameters can use r0-r3,
562 /// regardless of their position relative to the floating-point/vector 563 /// regardless of their position relative to the floating-point/vector
563 /// arguments in the argument list. Floating-point and vector arguments 564 /// arguments in the argument list. Floating-point and vector arguments
564 /// can use q0-q3 (aka d0-d7, s0-s15). For more information on the topic, 565 /// can use q0-q3 (aka d0-d7, s0-s15). For more information on the topic,
565 /// see the ARM Architecture Procedure Calling Standards (AAPCS). 566 /// see the ARM Architecture Procedure Calling Standards (AAPCS).
566 /// 567 ///
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 707
707 private: 708 private:
708 ~TargetHeaderARM32() = default; 709 ~TargetHeaderARM32() = default;
709 710
710 TargetARM32Features CPUFeatures; 711 TargetARM32Features CPUFeatures;
711 }; 712 };
712 713
713 } // end of namespace Ice 714 } // end of namespace Ice
714 715
715 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H 716 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H
OLDNEW
« no previous file with comments | « src/IceTargetLowering.cpp ('k') | src/IceTargetLoweringARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698