diff options
author | Craig Topper <craig.topper@intel.com> | 2018-07-01 05:47:49 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-07-01 05:47:49 +0000 |
commit | 4e78213ae4bc4e40e2bd4d4b60e7df8734fa2cc7 (patch) | |
tree | 65ca269b729439d4d476a3534c73c635ae312b4d /llvm/lib/Target/X86/X86InstrInfo.h | |
parent | 84199deb173515aac7feaee2b036c8f80925d756 (diff) | |
download | bcm5719-llvm-4e78213ae4bc4e40e2bd4d4b60e7df8734fa2cc7.tar.gz bcm5719-llvm-4e78213ae4bc4e40e2bd4d4b60e7df8734fa2cc7.zip |
[X86] Move the memory unfolding table creation into its own class and make it a ManagedStatic.
Also move the static folding tables, their search functions and the new class into new cpp/h files.
The unfolding table is effectively static data. It's just a different ordering and a subset of the static folding tables.
By putting it in a separate ManagedStatic we ensure we only have one copy instead of one per X86InstrInfo object. This way also makes it only get initialized when really needed.
llvm-svn: 336056
Diffstat (limited to 'llvm/lib/Target/X86/X86InstrInfo.h')
-rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.h | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.h b/llvm/lib/Target/X86/X86InstrInfo.h index 562b4385c49..b38c9ab77cc 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.h +++ b/llvm/lib/Target/X86/X86InstrInfo.h @@ -168,32 +168,6 @@ class X86InstrInfo final : public X86GenInstrInfo { X86Subtarget &Subtarget; const X86RegisterInfo RI; - struct MemOp2RegOpTableTypeEntry { - uint16_t MemOp; - uint16_t RegOp; - uint16_t Flags; - - bool operator<(const MemOp2RegOpTableTypeEntry &RHS) const { - return MemOp < RHS.MemOp; - } - bool operator==(const MemOp2RegOpTableTypeEntry &RHS) const { - return MemOp == RHS.MemOp; - } - friend bool operator<(const MemOp2RegOpTableTypeEntry &TE, - unsigned Opcode) { - return TE.MemOp < Opcode; - } - }; - - /// MemOp2RegOpTable - Load / store unfolding opcode map. - /// - typedef std::vector<MemOp2RegOpTableTypeEntry> MemOp2RegOpTableType; - MemOp2RegOpTableType MemOp2RegOpTable; - - static void AddTableEntry(MemOp2RegOpTableType &M2RTable, uint16_t RegOp, - uint16_t MemOp, uint16_t Flags); - const MemOp2RegOpTableTypeEntry *lookupUnfoldTable(unsigned MemOp) const; - virtual void anchor(); bool AnalyzeBranchImpl(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, |