Chromium Code Reviews| Index: src/IceTargetLoweringARM32.h |
| diff --git a/src/IceTargetLoweringARM32.h b/src/IceTargetLoweringARM32.h |
| index 4ade39674d62258875b1ad7a02d8af32af4f3258..04df72ffbb92c3df2beaec74dd3cb423858f755a 100644 |
| --- a/src/IceTargetLoweringARM32.h |
| +++ b/src/IceTargetLoweringARM32.h |
| @@ -60,9 +60,9 @@ public: |
| static TargetARM32 *create(Cfg *Func) { return new TargetARM32(Func); } |
| void initNodeForLowering(CfgNode *Node) override { |
| - BoolComputations.forgetProducers(); |
| - BoolComputations.recordProducers(Node); |
| - BoolComputations.dump(Func); |
| + Computations.forgetProducers(); |
| + Computations.recordProducers(Node); |
| + Computations.dump(Func); |
| } |
| void translateOm1() override; |
| @@ -798,6 +798,12 @@ protected: |
| void _vmrs(CondARM32::Cond Pred = CondARM32::AL) { |
| Context.insert(InstARM32Vmrs::create(Func, Pred)); |
| } |
| + void _vmla(Variable *Dest, Variable *Src0, Variable *Src1) { |
| + Context.insert(InstARM32Vmla::create(Func, Dest, Src0, Src1)); |
| + } |
| + void _vmls(Variable *Dest, Variable *Src0, Variable *Src1) { |
| + Context.insert(InstARM32Vmls::create(Func, Dest, Src0, Src1)); |
| + } |
| void _vmul(Variable *Dest, Variable *Src0, Variable *Src1) { |
| Context.insert(InstARM32Vmul::create(Func, Dest, Src0, Src1)); |
| } |
| @@ -1019,6 +1025,8 @@ protected: |
| static llvm::SmallBitVector ScratchRegs; |
| llvm::SmallBitVector RegsUsed; |
| VarList PhysicalRegisters[IceType_NUM]; |
| + VarList PreservedGPRs; |
| + VarList PreservedSRegs; |
| /// Helper class that understands the Calling Convention and register |
| /// assignments. The first few integer type parameters can use r0-r3, |
| @@ -1081,10 +1089,10 @@ private: |
| std::unordered_map<Operand *, void (TargetARM32::*)(const InstCall *Inst)> |
| ARM32HelpersPostamble; |
| - class BoolComputationTracker { |
| + class ComputationTracker { |
| public: |
| - BoolComputationTracker() = default; |
| - ~BoolComputationTracker() = default; |
| + ComputationTracker() = default; |
| + ~ComputationTracker() = default; |
| void forgetProducers() { KnownComputations.clear(); } |
| void recordProducers(CfgNode *Node); |
| @@ -1118,9 +1126,9 @@ private: |
| } |
| private: |
| - class BoolComputationEntry { |
| + class ComputationEntry { |
| public: |
| - explicit BoolComputationEntry(Inst *I) : Instr(I) {} |
| + ComputationEntry(Inst *I, Type Ty) : Instr(I), ComputationType(Ty) {} |
| Inst *const Instr; |
| // Boolean folding is disabled for variables whose live range is multi |
| // block. We conservatively initialize IsLiveOut to true, and set it to |
| @@ -1130,13 +1138,14 @@ private: |
| // disabled. |
| bool IsLiveOut = true; |
| int32_t NumUses = 0; |
| + Type ComputationType; |
| }; |
| - using BoolComputationMap = std::unordered_map<SizeT, BoolComputationEntry>; |
| - BoolComputationMap KnownComputations; |
| + using ComputationMap = std::unordered_map<SizeT, ComputationEntry>; |
|
Jim Stichnoth
2015/12/07 20:58:14
Add a comment indicating the meaning of the SizeT
John
2015/12/08 13:54:25
Done -- maybe add a comment to X86 as well? Happy
Jim Stichnoth
2015/12/08 19:20:16
That would be great, thanks.
John
2015/12/09 13:11:08
The comment was already there. :)
|
| + ComputationMap KnownComputations; |
| }; |
| - BoolComputationTracker BoolComputations; |
| + ComputationTracker Computations; |
| // AllowTemporaryWithNoReg indicates if TargetARM32::makeReg() can be invoked |
| // without specifying a physical register. This is needed for creating unbound |