Remove -use-divmod-libcall. Let targets opt in when they are available.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129884 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2011-04-20 22:20:12 +00:00
parent 3b7d917dec
commit c8578948c9
5 changed files with 5 additions and 11 deletions

View File

@ -157,10 +157,6 @@ namespace llvm {
/// wth earlier copy coalescing.
extern bool StrongPHIElim;
/// HasDivModLibcall - This flag indicates whether the target compiler
/// runtime library has integer divmod libcalls.
extern bool HasDivModLibcall;
/// getTrapFunctionName - If this returns a non-empty string, this means isel
/// should lower Intrinsic::trap to a call to the specified function name
/// instead of an ISD::TRAP node.

View File

@ -398,7 +398,8 @@ ARMTargetLowering::ARMTargetLowering(TargetMachine &TM)
setLibcallCallingConv(RTLIB::UDIV_I32, CallingConv::ARM_AAPCS);
}
if (HasDivModLibcall) {
// Use divmod iOS compiler-rt calls.
if (Subtarget->getTargetTriple().getOS() == Triple::IOS) {
setLibcallName(RTLIB::SDIVREM_I32, "__divmodsi4");
setLibcallName(RTLIB::UDIVREM_I32, "__udivmodsi4");
}

View File

@ -201,6 +201,8 @@ protected:
bool hasFP16() const { return HasFP16; }
bool hasD16() const { return HasD16; }
const Triple &getTargetTriple() const { return TargetTriple; }
bool isTargetDarwin() const { return TargetTriple.isOSDarwin(); }
bool isTargetELF() const { return !isTargetDarwin(); }

View File

@ -206,11 +206,6 @@ EnableStrongPHIElim(cl::Hidden, "strong-phi-elim",
cl::desc("Use strong PHI elimination."),
cl::location(StrongPHIElim),
cl::init(false));
static cl::opt<bool, true>
UseDivMod("use-divmod-libcall",
cl::desc("Use __{u}divmod libcalls for div / rem pairs"),
cl::location(HasDivModLibcall),
cl::init(false));
static cl::opt<std::string>
TrapFuncName("trap-func", cl::Hidden,
cl::desc("Emit a call to trap function rather than a trap instruction"),

View File

@ -1,4 +1,4 @@
; RUN: llc < %s -mtriple=arm-apple-darwin -use-divmod-libcall | FileCheck %s
; RUN: llc < %s -mtriple=arm-apple-ios | FileCheck %s
define void @foo(i32 %x, i32 %y, i32* nocapture %P) nounwind ssp {
entry: