[llvm-commits] [llvm] r77856 - in /llvm/trunk: docs/WritingAnLLVMBackend.html include/llvm/Target/TargetAsmInfo.h lib/Target/TargetAsmInfo.cpp lib/Target/X86/X86TargetAsmInfo.cpp lib/Target/X86/X86TargetAsmInfo.h
Chris Lattner
sabre at nondot.org
Sat Aug 1 21:02:52 PDT 2009
Author: lattner
Date: Sat Aug 1 23:02:52 2009
New Revision: 77856
URL: http://llvm.org/viewvc/llvm-project?rev=77856&view=rev
Log:
remove the dead PreferredEHDataFormat TAI hook: its now dead
even considering #if 0 code.
Modified:
llvm/trunk/docs/WritingAnLLVMBackend.html
llvm/trunk/include/llvm/Target/TargetAsmInfo.h
llvm/trunk/lib/Target/TargetAsmInfo.cpp
llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp
llvm/trunk/lib/Target/X86/X86TargetAsmInfo.h
Modified: llvm/trunk/docs/WritingAnLLVMBackend.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/WritingAnLLVMBackend.html?rev=77856&r1=77855&r2=77856&view=diff
==============================================================================
--- llvm/trunk/docs/WritingAnLLVMBackend.html (original)
+++ llvm/trunk/docs/WritingAnLLVMBackend.html Sat Aug 1 23:02:52 2009
@@ -2080,8 +2080,8 @@
<p>
The X86 assembly printer implementation (<tt>X86TargetAsmInfo</tt>) is an
-example where the target specific <tt>TargetAsmInfo</tt> class uses overridden
-methods: <tt>ExpandInlineAsm</tt> and <tt>PreferredEHDataFormat</tt>.
+example where the target specific <tt>TargetAsmInfo</tt> class uses an
+overridden methods: <tt>ExpandInlineAsm</tt>.
</p>
<p>
Modified: llvm/trunk/include/llvm/Target/TargetAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetAsmInfo.h?rev=77856&r1=77855&r2=77856&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetAsmInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetAsmInfo.h Sat Aug 1 23:02:52 2009
@@ -383,11 +383,6 @@
/// length.
virtual unsigned getInlineAsmLength(const char *Str) const;
- /// PreferredEHDataFormat - This hook allows the target to select data
- /// format used for encoding pointers in exception handling data.
- virtual unsigned PreferredEHDataFormat() const;
-
-
/// getSLEB128Size - Compute the number of bytes required for a signed
/// leb128 value.
static unsigned getSLEB128Size(int Value);
Modified: llvm/trunk/lib/Target/TargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetAsmInfo.cpp?rev=77856&r1=77855&r2=77856&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/TargetAsmInfo.cpp Sat Aug 1 23:02:52 2009
@@ -140,10 +140,6 @@
return Length;
}
-unsigned TargetAsmInfo::PreferredEHDataFormat() const {
- return dwarf::DW_EH_PE_absptr;
-}
-
unsigned TargetAsmInfo::getULEB128Size(unsigned Value) {
unsigned Size = 0;
do {
Modified: llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp?rev=77856&r1=77855&r2=77856&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp Sat Aug 1 23:02:52 2009
@@ -86,14 +86,6 @@
".section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support";
}
-unsigned X86DarwinTargetAsmInfo::PreferredEHDataFormat() const {
- const X86Subtarget *Subtarget = &TM.getSubtarget<X86Subtarget>();
- if (Subtarget->getDarwinVers() > 9)
- return DW_EH_PE_pcrel | DW_EH_PE_indirect | DW_EH_PE_sdata4;
-
- return DW_EH_PE_absptr;
-}
-
const char *
X86DarwinTargetAsmInfo::getEHGlobalPrefix() const {
const X86Subtarget* Subtarget = &TM.getSubtarget<X86Subtarget>();
@@ -138,70 +130,6 @@
NonexecutableStackDirective = "\t.section\t.note.GNU-stack,\"\", at progbits";
}
-unsigned
-X86ELFTargetAsmInfo::PreferredEHDataFormat() const {
- CodeModel::Model CM = TM.getCodeModel();
- bool is64Bit = TM.getSubtarget<X86Subtarget>().is64Bit();
-
- if (TM.getRelocationModel() == Reloc::PIC_) {
- unsigned Format = 0;
-
- if (!is64Bit)
- // 32 bit targets always encode pointers as 4 bytes
- Format = DW_EH_PE_sdata4;
- else {
- // 64 bit targets encode pointers in 4 bytes iff:
- // - code model is small OR
- // - code model is medium and we're emitting externally visible symbols
- // or any code symbols
- if (CM == CodeModel::Small || CM == CodeModel::Medium)
- Format = DW_EH_PE_sdata4;
- else
- Format = DW_EH_PE_sdata8;
- }
-
- Format |= DW_EH_PE_indirect;
- return (Format | DW_EH_PE_pcrel);
- }
-
- if (is64Bit && CM == CodeModel::Small)
- return DW_EH_PE_udata4;
- return DW_EH_PE_absptr;
-}
-
-
-unsigned
-X86COFFTargetAsmInfo::PreferredEHDataFormat() const {
- CodeModel::Model CM = TM.getCodeModel();
- bool is64Bit = TM.getSubtarget<X86Subtarget>().is64Bit();
-
- if (TM.getRelocationModel() == Reloc::PIC_) {
- unsigned Format = 0;
-
- if (!is64Bit)
- // 32 bit targets always encode pointers as 4 bytes
- Format = DW_EH_PE_sdata4;
- else {
- // 64 bit targets encode pointers in 4 bytes iff:
- // - code model is small OR
- // - code model is medium and we're emitting externally visible symbols
- // or any code symbols
- if (CM == CodeModel::Small || CM == CodeModel::Medium)
- Format = DW_EH_PE_sdata4;
- else
- Format = DW_EH_PE_sdata8;
- }
-
- Format |= DW_EH_PE_indirect;
- return (Format | DW_EH_PE_pcrel);
- }
-
- if (is64Bit && CM == CodeModel::Small)
- return DW_EH_PE_udata4;
- return DW_EH_PE_absptr;
-}
-
-
X86WinTargetAsmInfo::X86WinTargetAsmInfo(const X86TargetMachine &TM):
X86TargetAsmInfo<TargetAsmInfo>(TM) {
Modified: llvm/trunk/lib/Target/X86/X86TargetAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetAsmInfo.h?rev=77856&r1=77855&r2=77856&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetAsmInfo.h (original)
+++ llvm/trunk/lib/Target/X86/X86TargetAsmInfo.h Sat Aug 1 23:02:52 2009
@@ -37,21 +37,14 @@
struct X86DarwinTargetAsmInfo : public X86TargetAsmInfo<DarwinTargetAsmInfo> {
explicit X86DarwinTargetAsmInfo(const X86TargetMachine &TM);
- virtual unsigned PreferredEHDataFormat() const;
virtual const char *getEHGlobalPrefix() const;
};
struct X86ELFTargetAsmInfo : public X86TargetAsmInfo<ELFTargetAsmInfo> {
explicit X86ELFTargetAsmInfo(const X86TargetMachine &TM);
- virtual unsigned PreferredEHDataFormat() const;
};
- struct X86COFFTargetAsmInfo : public X86TargetAsmInfo<COFFTargetAsmInfo> {
- explicit X86COFFTargetAsmInfo(const X86TargetMachine &TM) :
- X86TargetAsmInfo<COFFTargetAsmInfo>(TM) {}
- virtual unsigned PreferredEHDataFormat() const;
- };
-
+ typedef X86TargetAsmInfo<COFFTargetAsmInfo> X86COFFTargetAsmInfo;
struct X86WinTargetAsmInfo : public X86TargetAsmInfo<TargetAsmInfo> {
explicit X86WinTargetAsmInfo(const X86TargetMachine &TM);
More information about the llvm-commits
mailing list