[llvm-branch-commits] [llvm-branch] r90146 - in /llvm/branches/Apple/Zoidberg: include/llvm/Target/TargetInstrInfo.h lib/CodeGen/TailDuplication.cpp lib/Target/ARM/ARMBaseInstrInfo.cpp lib/Target/ARM/ARMBaseInstrInfo.h lib/Target/ARM/ARMSubtarget.cpp lib/Target/ARM/ARMSubtarget.h lib/Target/PowerPC/PPCInstrInfo.h lib/Target/X86/X86InstrInfo.h
Bob Wilson
bob.wilson at apple.com
Mon Nov 30 10:45:36 PST 2009
Author: bwilson
Date: Mon Nov 30 12:45:36 2009
New Revision: 90146
URL: http://llvm.org/viewvc/llvm-project?rev=90146&view=rev
Log:
--- Merging r90144 into '.':
U include/llvm/Target/TargetInstrInfo.h
U lib/CodeGen/TailDuplication.cpp
U lib/Target/PowerPC/PPCInstrInfo.h
U lib/Target/ARM/ARMSubtarget.cpp
U lib/Target/ARM/ARMSubtarget.h
U lib/Target/ARM/ARMBaseInstrInfo.cpp
U lib/Target/ARM/ARMBaseInstrInfo.h
U lib/Target/X86/X86InstrInfo.h
Modified:
llvm/branches/Apple/Zoidberg/include/llvm/Target/TargetInstrInfo.h
llvm/branches/Apple/Zoidberg/lib/CodeGen/TailDuplication.cpp
llvm/branches/Apple/Zoidberg/lib/Target/ARM/ARMBaseInstrInfo.cpp
llvm/branches/Apple/Zoidberg/lib/Target/ARM/ARMBaseInstrInfo.h
llvm/branches/Apple/Zoidberg/lib/Target/ARM/ARMSubtarget.cpp
llvm/branches/Apple/Zoidberg/lib/Target/ARM/ARMSubtarget.h
llvm/branches/Apple/Zoidberg/lib/Target/PowerPC/PPCInstrInfo.h
llvm/branches/Apple/Zoidberg/lib/Target/X86/X86InstrInfo.h
Modified: llvm/branches/Apple/Zoidberg/include/llvm/Target/TargetInstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Zoidberg/include/llvm/Target/TargetInstrInfo.h?rev=90146&r1=90145&r2=90146&view=diff
==============================================================================
--- llvm/branches/Apple/Zoidberg/include/llvm/Target/TargetInstrInfo.h (original)
+++ llvm/branches/Apple/Zoidberg/include/llvm/Target/TargetInstrInfo.h Mon Nov 30 12:45:36 2009
@@ -543,10 +543,6 @@
/// length.
virtual unsigned getInlineAsmLength(const char *Str,
const MCAsmInfo &MAI) const;
-
- /// isProfitableToDuplicateIndirectBranch - Returns true if tail duplication
- /// is especially profitable for indirect branches.
- virtual bool isProfitableToDuplicateIndirectBranch() const { return false; }
};
/// TargetInstrInfoImpl - This is the default implementation of
Modified: llvm/branches/Apple/Zoidberg/lib/CodeGen/TailDuplication.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Zoidberg/lib/CodeGen/TailDuplication.cpp?rev=90146&r1=90145&r2=90146&view=diff
==============================================================================
--- llvm/branches/Apple/Zoidberg/lib/CodeGen/TailDuplication.cpp (original)
+++ llvm/branches/Apple/Zoidberg/lib/CodeGen/TailDuplication.cpp Mon Nov 30 12:45:36 2009
@@ -118,8 +118,7 @@
unsigned MaxDuplicateCount;
if (MF.getFunction()->hasFnAttr(Attribute::OptimizeForSize))
MaxDuplicateCount = 1;
- else if (TII->isProfitableToDuplicateIndirectBranch() &&
- !TailBB->empty() && TailBB->back().getDesc().isIndirectBranch())
+ else if (!TailBB->empty() && TailBB->back().getDesc().isIndirectBranch())
// If the target has hardware branch prediction that can handle indirect
// branches, duplicating them can often make them predictable when there
// are common paths through the code. The limit needs to be high enough
Modified: llvm/branches/Apple/Zoidberg/lib/Target/ARM/ARMBaseInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Zoidberg/lib/Target/ARM/ARMBaseInstrInfo.cpp?rev=90146&r1=90145&r2=90146&view=diff
==============================================================================
--- llvm/branches/Apple/Zoidberg/lib/Target/ARM/ARMBaseInstrInfo.cpp (original)
+++ llvm/branches/Apple/Zoidberg/lib/Target/ARM/ARMBaseInstrInfo.cpp Mon Nov 30 12:45:36 2009
@@ -1027,12 +1027,6 @@
return TargetInstrInfoImpl::isIdentical(MI0, MI1, MRI);
}
-bool ARMBaseInstrInfo::isProfitableToDuplicateIndirectBranch() const {
- // If the target processor can predict indirect branches, it is highly
- // desirable to duplicate them, since it can often make them predictable.
- return getSubtarget().hasBranchTargetBuffer();
-}
-
/// getInstrPredicate - If instruction is predicated, returns its predicate
/// condition, otherwise returns AL. It also returns the condition code
/// register by reference.
Modified: llvm/branches/Apple/Zoidberg/lib/Target/ARM/ARMBaseInstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Zoidberg/lib/Target/ARM/ARMBaseInstrInfo.h?rev=90146&r1=90145&r2=90146&view=diff
==============================================================================
--- llvm/branches/Apple/Zoidberg/lib/Target/ARM/ARMBaseInstrInfo.h (original)
+++ llvm/branches/Apple/Zoidberg/lib/Target/ARM/ARMBaseInstrInfo.h Mon Nov 30 12:45:36 2009
@@ -274,8 +274,6 @@
virtual bool isIdentical(const MachineInstr *MI, const MachineInstr *Other,
const MachineRegisterInfo *MRI) const;
-
- virtual bool isProfitableToDuplicateIndirectBranch() const;
};
static inline
Modified: llvm/branches/Apple/Zoidberg/lib/Target/ARM/ARMSubtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Zoidberg/lib/Target/ARM/ARMSubtarget.cpp?rev=90146&r1=90145&r2=90146&view=diff
==============================================================================
--- llvm/branches/Apple/Zoidberg/lib/Target/ARM/ARMSubtarget.cpp (original)
+++ llvm/branches/Apple/Zoidberg/lib/Target/ARM/ARMSubtarget.cpp Mon Nov 30 12:45:36 2009
@@ -109,8 +109,6 @@
if (UseNEONFP.getPosition() == 0)
UseNEONForSinglePrecisionFP = true;
}
- HasBranchTargetBuffer = (CPUString == "cortex-a8" ||
- CPUString == "cortex-a9");
}
/// GVIsIndirectSymbol - true if the GV will be accessed via an indirect symbol.
Modified: llvm/branches/Apple/Zoidberg/lib/Target/ARM/ARMSubtarget.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Zoidberg/lib/Target/ARM/ARMSubtarget.h?rev=90146&r1=90145&r2=90146&view=diff
==============================================================================
--- llvm/branches/Apple/Zoidberg/lib/Target/ARM/ARMSubtarget.h (original)
+++ llvm/branches/Apple/Zoidberg/lib/Target/ARM/ARMSubtarget.h Mon Nov 30 12:45:36 2009
@@ -50,9 +50,6 @@
/// determine if NEON should actually be used.
bool UseNEONForSinglePrecisionFP;
- /// HasBranchTargetBuffer - True if processor can predict indirect branches.
- bool HasBranchTargetBuffer;
-
/// IsThumb - True if we are in thumb mode, false if in ARM mode.
bool IsThumb;
@@ -126,8 +123,6 @@
bool isThumb2() const { return IsThumb && (ThumbMode == Thumb2); }
bool hasThumb2() const { return ThumbMode >= Thumb2; }
- bool hasBranchTargetBuffer() const { return HasBranchTargetBuffer; }
-
bool isR9Reserved() const { return IsR9Reserved; }
const std::string & getCPUString() const { return CPUString; }
Modified: llvm/branches/Apple/Zoidberg/lib/Target/PowerPC/PPCInstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Zoidberg/lib/Target/PowerPC/PPCInstrInfo.h?rev=90146&r1=90145&r2=90146&view=diff
==============================================================================
--- llvm/branches/Apple/Zoidberg/lib/Target/PowerPC/PPCInstrInfo.h (original)
+++ llvm/branches/Apple/Zoidberg/lib/Target/PowerPC/PPCInstrInfo.h Mon Nov 30 12:45:36 2009
@@ -151,8 +151,6 @@
/// instruction may be. This returns the maximum number of bytes.
///
virtual unsigned GetInstSizeInBytes(const MachineInstr *MI) const;
-
- virtual bool isProfitableToDuplicateIndirectBranch() const { return true; }
};
}
Modified: llvm/branches/Apple/Zoidberg/lib/Target/X86/X86InstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Zoidberg/lib/Target/X86/X86InstrInfo.h?rev=90146&r1=90145&r2=90146&view=diff
==============================================================================
--- llvm/branches/Apple/Zoidberg/lib/Target/X86/X86InstrInfo.h (original)
+++ llvm/branches/Apple/Zoidberg/lib/Target/X86/X86InstrInfo.h Mon Nov 30 12:45:36 2009
@@ -632,8 +632,6 @@
///
unsigned getGlobalBaseReg(MachineFunction *MF) const;
- virtual bool isProfitableToDuplicateIndirectBranch() const { return true; }
-
private:
MachineInstr* foldMemoryOperandImpl(MachineFunction &MF,
MachineInstr* MI,
More information about the llvm-branch-commits
mailing list