Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions llvm/lib/Target/LoongArch/LoongArchSubtarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,21 @@ using namespace llvm;
#define GET_SUBTARGETINFO_CTOR
#include "LoongArchGenSubtargetInfo.inc"

static cl::opt<bool>
DisableMISched("loongarch-disable-misched", cl::Hidden,
cl::desc("Disable LoongArch MI Scheduling"));

static cl::opt<bool> UseAA("loongarch-use-aa", cl::init(true),
cl::desc("Enable the use of AA during codegen."));

void LoongArchSubtarget::anchor() {}

bool LoongArchSubtarget::enableMachineScheduler() const {
if (DisableMISched.getNumOccurrences())
return !DisableMISched;
return true;
}

// Enable use of alias analysis during code generation (during MI scheduling,
// DAGCombine, etc.).
bool LoongArchSubtarget::useAA() const { return UseAA; }
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/LoongArch/LoongArchSubtarget.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class LoongArchSubtarget : public LoongArchGenSubtargetInfo {
Align getPrefLoopAlignment() const { return PrefLoopAlignment; }
unsigned getMaxBytesForAlignment() const { return MaxBytesForAlignment; }
unsigned getMaxInterleaveFactor() const { return MaxInterleaveFactor; }
bool enableMachineScheduler() const override { return true; }
bool enableMachineScheduler() const override;
bool useAA() const override;
};
} // end namespace llvm
Expand Down
Loading