diff options
| author | Juergen Ributzka <juergen@apple.com> | 2013-11-15 22:34:48 +0000 |
|---|---|---|
| committer | Juergen Ributzka <juergen@apple.com> | 2013-11-15 22:34:48 +0000 |
| commit | 5a364c5561ec04e33a6f5d52c14f1bac6f247ea0 (patch) | |
| tree | 2fcdad4351006993fd039cba47193d98cdfc5ae3 /lib/Target/SystemZ | |
| parent | 17d4ac8c461fb3c32483cf7a37bc52937caeb650 (diff) | |
| download | external_llvm-5a364c5561ec04e33a6f5d52c14f1bac6f247ea0.zip external_llvm-5a364c5561ec04e33a6f5d52c14f1bac6f247ea0.tar.gz external_llvm-5a364c5561ec04e33a6f5d52c14f1bac6f247ea0.tar.bz2 | |
[weak vtables] Remove a bunch of weak vtables
This patch removes most of the trivial cases of weak vtables by pinning them to
a single object file.
Differential Revision: http://llvm-reviews.chandlerc.com/D2068
Reviewed by Andy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194865 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SystemZ')
| -rw-r--r-- | lib/Target/SystemZ/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | lib/Target/SystemZ/SystemZInstrInfo.cpp | 5 | ||||
| -rw-r--r-- | lib/Target/SystemZ/SystemZInstrInfo.h | 1 | ||||
| -rw-r--r-- | lib/Target/SystemZ/SystemZMachineFunctionInfo.cpp | 17 | ||||
| -rw-r--r-- | lib/Target/SystemZ/SystemZMachineFunctionInfo.h | 2 | ||||
| -rw-r--r-- | lib/Target/SystemZ/SystemZSubtarget.cpp | 3 | ||||
| -rw-r--r-- | lib/Target/SystemZ/SystemZSubtarget.h | 1 |
7 files changed, 29 insertions, 1 deletions
diff --git a/lib/Target/SystemZ/CMakeLists.txt b/lib/Target/SystemZ/CMakeLists.txt index 8a4eaa3..d21c0a8 100644 --- a/lib/Target/SystemZ/CMakeLists.txt +++ b/lib/Target/SystemZ/CMakeLists.txt @@ -21,6 +21,7 @@ add_llvm_target(SystemZCodeGen SystemZISelLowering.cpp SystemZInstrInfo.cpp SystemZLongBranch.cpp + SystemZMachineFunctionInfo.cpp SystemZMCInstLower.cpp SystemZRegisterInfo.cpp SystemZSelectionDAGInfo.cpp diff --git a/lib/Target/SystemZ/SystemZInstrInfo.cpp b/lib/Target/SystemZ/SystemZInstrInfo.cpp index 2ebbc0d..67aacf3 100644 --- a/lib/Target/SystemZ/SystemZInstrInfo.cpp +++ b/lib/Target/SystemZ/SystemZInstrInfo.cpp @@ -17,7 +17,7 @@ #include "llvm/CodeGen/LiveVariables.h" #include "llvm/CodeGen/MachineRegisterInfo.h" -#define GET_INSTRINFO_CTOR +#define GET_INSTRINFO_CTOR_DTOR #define GET_INSTRMAP_INFO #include "SystemZGenInstrInfo.inc" @@ -37,6 +37,9 @@ static bool isHighReg(unsigned int Reg) { return false; } +// pin vtable to this file +void SystemZInstrInfo::anchor() {} + SystemZInstrInfo::SystemZInstrInfo(SystemZTargetMachine &tm) : SystemZGenInstrInfo(SystemZ::ADJCALLSTACKDOWN, SystemZ::ADJCALLSTACKUP), RI(tm), TM(tm) { diff --git a/lib/Target/SystemZ/SystemZInstrInfo.h b/lib/Target/SystemZ/SystemZInstrInfo.h index 7978be4..be4c8fe 100644 --- a/lib/Target/SystemZ/SystemZInstrInfo.h +++ b/lib/Target/SystemZ/SystemZInstrInfo.h @@ -127,6 +127,7 @@ class SystemZInstrInfo : public SystemZGenInstrInfo { void emitGRX32Move(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, DebugLoc DL, unsigned DestReg, unsigned SrcReg, unsigned LowLowOpcode, unsigned Size, bool KillSrc) const; + virtual void anchor(); public: explicit SystemZInstrInfo(SystemZTargetMachine &TM); diff --git a/lib/Target/SystemZ/SystemZMachineFunctionInfo.cpp b/lib/Target/SystemZ/SystemZMachineFunctionInfo.cpp new file mode 100644 index 0000000..00572d0 --- /dev/null +++ b/lib/Target/SystemZ/SystemZMachineFunctionInfo.cpp @@ -0,0 +1,17 @@ +//== SystemZMachineFuctionInfo.cpp - SystemZ machine function info-*- C++ -*-=// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "SystemZMachineFunctionInfo.h" + +using namespace llvm; + + +// pin vtable to this file +void SystemZMachineFunctionInfo::anchor() {} + diff --git a/lib/Target/SystemZ/SystemZMachineFunctionInfo.h b/lib/Target/SystemZ/SystemZMachineFunctionInfo.h index 69c2691..509cef6 100644 --- a/lib/Target/SystemZ/SystemZMachineFunctionInfo.h +++ b/lib/Target/SystemZ/SystemZMachineFunctionInfo.h @@ -23,6 +23,8 @@ class SystemZMachineFunctionInfo : public MachineFunctionInfo { unsigned RegSaveFrameIndex; bool ManipulatesSP; + virtual void anchor(); + public: explicit SystemZMachineFunctionInfo(MachineFunction &MF) : LowSavedGPR(0), HighSavedGPR(0), VarArgsFirstGPR(0), VarArgsFirstFPR(0), diff --git a/lib/Target/SystemZ/SystemZSubtarget.cpp b/lib/Target/SystemZ/SystemZSubtarget.cpp index 4741920..b9a9db2 100644 --- a/lib/Target/SystemZ/SystemZSubtarget.cpp +++ b/lib/Target/SystemZ/SystemZSubtarget.cpp @@ -18,6 +18,9 @@ using namespace llvm; +// pin vtabel to this file +void SystemZSubtarget::anchor() {} + SystemZSubtarget::SystemZSubtarget(const std::string &TT, const std::string &CPU, const std::string &FS) diff --git a/lib/Target/SystemZ/SystemZSubtarget.h b/lib/Target/SystemZ/SystemZSubtarget.h index 74d3f90..5817491 100644 --- a/lib/Target/SystemZ/SystemZSubtarget.h +++ b/lib/Target/SystemZ/SystemZSubtarget.h @@ -26,6 +26,7 @@ class GlobalValue; class StringRef; class SystemZSubtarget : public SystemZGenSubtargetInfo { + virtual void anchor(); protected: bool HasDistinctOps; bool HasLoadStoreOnCond; |
