forked from OSchip/llvm-project
[mips] Disable tail merging when long branch pass is enabled.
llvm-svn: 192124
This commit is contained in:
parent
7b5e159450
commit
3c0d6afeec
|
@ -135,7 +135,13 @@ namespace {
|
|||
class MipsPassConfig : public TargetPassConfig {
|
||||
public:
|
||||
MipsPassConfig(MipsTargetMachine *TM, PassManagerBase &PM)
|
||||
: TargetPassConfig(TM, PM) {}
|
||||
: TargetPassConfig(TM, PM) {
|
||||
// The current implementation of long branch pass requires a scratch
|
||||
// register ($at) to be available before branch instructions. Tail merging
|
||||
// can break this requirement, so disable it when long branch pass is
|
||||
// enabled.
|
||||
EnableTailMerge = !getMipsSubtarget().enableLongBranchPass();
|
||||
}
|
||||
|
||||
MipsTargetMachine &getMipsTargetMachine() const {
|
||||
return getTM<MipsTargetMachine>();
|
||||
|
|
Loading…
Reference in New Issue