mirror of
https://github.com/intel/llvm.git
synced 2026-01-24 17:01:00 +08:00
[Hexagon] Disable predicated calls by default
llvm-svn: 302307
This commit is contained in:
@@ -1467,7 +1467,15 @@ bool HexagonInstrInfo::DefinesPredicate(
|
||||
}
|
||||
|
||||
bool HexagonInstrInfo::isPredicable(const MachineInstr &MI) const {
|
||||
return MI.getDesc().isPredicable();
|
||||
if (!MI.getDesc().isPredicable())
|
||||
return false;
|
||||
|
||||
if (MI.isCall() || isTailCall(MI)) {
|
||||
const MachineFunction &MF = *MI.getParent()->getParent();
|
||||
if (!MF.getSubtarget<HexagonSubtarget>().usePredicatedCalls())
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool HexagonInstrInfo::isSchedulingBoundary(const MachineInstr &MI,
|
||||
|
||||
@@ -73,6 +73,10 @@ static cl::opt<bool> OverrideLongCalls("hexagon-long-calls",
|
||||
cl::Hidden, cl::ZeroOrMore, cl::init(false),
|
||||
cl::desc("If present, forces/disables the use of long calls"));
|
||||
|
||||
static cl::opt<bool> EnablePredicatedCalls("hexagon-pred-calls",
|
||||
cl::Hidden, cl::ZeroOrMore, cl::init(false),
|
||||
cl::desc("Consider calls to be predicable"));
|
||||
|
||||
void HexagonSubtarget::initializeEnvironment() {
|
||||
UseMemOps = false;
|
||||
ModeIEEERndNear = false;
|
||||
@@ -257,6 +261,10 @@ bool HexagonSubtarget::enableMachineScheduler() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool HexagonSubtarget::usePredicatedCalls() const {
|
||||
return EnablePredicatedCalls;
|
||||
}
|
||||
|
||||
void HexagonSubtarget::updateLatency(MachineInstr &SrcInst,
|
||||
MachineInstr &DstInst, SDep &Dep) const {
|
||||
if (Dep.isArtificial()) {
|
||||
|
||||
@@ -104,6 +104,7 @@ public:
|
||||
bool useHVXDblOps() const { return UseHVXOps && UseHVXDblOps; }
|
||||
bool useHVXSglOps() const { return UseHVXOps && !UseHVXDblOps; }
|
||||
bool useLongCalls() const { return UseLongCalls; }
|
||||
bool usePredicatedCalls() const;
|
||||
|
||||
bool useBSBScheduling() const { return UseBSBScheduling; }
|
||||
bool enableMachineScheduler() const override;
|
||||
|
||||
Reference in New Issue
Block a user