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

Side by Side Diff: src/IceTargetLoweringX8632.h

Issue 1185703004: Add constant blinding/pooling option for X8632 code translation (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: reformat Created 5 years, 6 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
OLDNEW
1 //===- subzero/src/IceTargetLoweringX8632.h - x86-32 lowering ---*- C++ -*-===// 1 //===- subzero/src/IceTargetLoweringX8632.h - x86-32 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 // This file declares the TargetLoweringX8632 class, which 10 // This file declares the TargetLoweringX8632 class, which
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 _set_dest_nonkillable(); 553 _set_dest_nonkillable();
554 Context.insert(InstFakeUse::create(Func, Src)); 554 Context.insert(InstFakeUse::create(Func, Src));
555 } 555 }
556 void _xor(Variable *Dest, Operand *Src0) { 556 void _xor(Variable *Dest, Operand *Src0) {
557 Context.insert(InstX8632Xor::create(Func, Dest, Src0)); 557 Context.insert(InstX8632Xor::create(Func, Dest, Src0));
558 } 558 }
559 void _set_dest_nonkillable() { 559 void _set_dest_nonkillable() {
560 Context.getLastInserted()->setDestNonKillable(); 560 Context.getLastInserted()->setDestNonKillable();
561 } 561 }
562 562
563 bool optimizeScalarMul(Variable *Dest, Operand *Src0, int32_t Src1);
564
563 const X86InstructionSet InstructionSet; 565 const X86InstructionSet InstructionSet;
564 bool IsEbpBasedFrame; 566 bool IsEbpBasedFrame;
565 bool NeedsStackAlignment; 567 bool NeedsStackAlignment;
566 size_t SpillAreaSizeBytes; 568 size_t SpillAreaSizeBytes;
567 llvm::SmallBitVector TypeToRegisterSet[IceType_NUM]; 569 llvm::SmallBitVector TypeToRegisterSet[IceType_NUM];
568 llvm::SmallBitVector ScratchRegs; 570 llvm::SmallBitVector ScratchRegs;
569 llvm::SmallBitVector RegsUsed; 571 llvm::SmallBitVector RegsUsed;
570 VarList PhysicalRegisters[IceType_NUM]; 572 VarList PhysicalRegisters[IceType_NUM];
571 static IceString RegNames[]; 573 static IceString RegNames[];
572 574
575 // Randomize a given immediate operand
576 Operand *randomizeOrPoolImmediate(Constant *Immediate,
577 int32_t RegNum = Variable::NoRegister);
578 OperandX8632Mem *
579 randomizeOrPoolImmediate(OperandX8632Mem *MemOperand,
580 int32_t RegNum = Variable::NoRegister);
581 bool RandomizationPoolingPaused;
582
573 private: 583 private:
574 ~TargetX8632() override {} 584 ~TargetX8632() override {}
575 BoolFolding FoldingInfo; 585 BoolFolding FoldingInfo;
576 }; 586 };
577 587
578 class TargetDataX8632 : public TargetDataLowering { 588 class TargetDataX8632 : public TargetDataLowering {
579 TargetDataX8632() = delete; 589 TargetDataX8632() = delete;
580 TargetDataX8632(const TargetDataX8632 &) = delete; 590 TargetDataX8632(const TargetDataX8632 &) = delete;
581 TargetDataX8632 &operator=(const TargetDataX8632 &) = delete; 591 TargetDataX8632 &operator=(const TargetDataX8632 &) = delete;
582 592
(...skipping 27 matching lines...) Expand all
610 protected: 620 protected:
611 explicit TargetHeaderX8632(GlobalContext *Ctx); 621 explicit TargetHeaderX8632(GlobalContext *Ctx);
612 622
613 private: 623 private:
614 ~TargetHeaderX8632() = default; 624 ~TargetHeaderX8632() = default;
615 }; 625 };
616 626
617 } // end of namespace Ice 627 } // end of namespace Ice
618 628
619 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H 629 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698