Skip to content

Commit 4568add

Browse files
committed
fix GlobalISEL
1 parent 67122d5 commit 4568add

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "llvm/CodeGen/CallingConvLower.h"
2020
#include "llvm/CodeGen/MachineOperand.h"
2121
#include "llvm/CodeGen/TargetCallingConv.h"
22+
#include "llvm/IR/Attributes.h"
2223
#include "llvm/IR/CallingConv.h"
2324
#include "llvm/IR/Type.h"
2425
#include "llvm/IR/Value.h"
@@ -30,7 +31,6 @@
3031

3132
namespace llvm {
3233

33-
class AttributeList;
3434
class CallBase;
3535
class DataLayout;
3636
class Function;

llvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h

+3
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ struct GCstAndRegMatch {
163163
bool match(const MachineRegisterInfo &MRI, Register Reg) {
164164
ValReg = getIConstantVRegValWithLookThrough(Reg, MRI);
165165
return ValReg ? true : false;
166+
}
167+
};
168+
166169
template <typename ConstT> inline ConstantMatch<ConstT> m_ICst(ConstT &Cst) {
167170
return {Cst};
168171
}

llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -5757,7 +5757,7 @@ bool CombinerHelper::applyPtrAddGlobalImmed(
57575757
Observer.changingInstr(MI);
57585758
MI.setDesc(Builder.getTII().get(TargetOpcode::G_GLOBAL_VALUE));
57595759
MI.getOperand(1).ChangeToGA(MatchInfo.first, MatchInfo.second);
5760-
MI.RemoveOperand(2);
5760+
MI.removeOperand(2);
57615761
Observer.changedInstr(MI);
57625762
return true;
57635763
}
@@ -5801,7 +5801,7 @@ bool CombinerHelper::applyPtrAddConstImmed(MachineInstr &MI,
58015801
Observer.changingInstr(MI);
58025802
MI.setDesc(Builder.getTII().get(TargetOpcode::G_INTTOPTR));
58035803
MI.getOperand(1).setReg(NewConst.getReg(0));
5804-
MI.RemoveOperand(2);
5804+
MI.removeOperand(2);
58055805
Observer.changedInstr(MI);
58065806
return true;
58075807
}
@@ -6021,7 +6021,7 @@ bool CombinerHelper::applyCombineIdentity(MachineInstr &MI) {
60216021
Builder.setInstrAndDebugLoc(MI);
60226022
Observer.changingInstr(MI);
60236023
MI.setDesc(Builder.getTII().get(TargetOpcode::COPY));
6024-
MI.RemoveOperand(2);
6024+
MI.removeOperand(2);
60256025
Observer.changedInstr(MI);
60266026
return true;
60276027
}

llvm/utils/TableGen/GlobalISelEmitter.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2258,7 +2258,7 @@ class NoUsePredicateMatcher : public InstructionPredicateMatcher {
22582258
}
22592259

22602260
void emitPredicateOpcodes(MatchTable &Table,
2261-
RuleMatcher &Rule) const override {
2261+
Matcher &Rule) const override {
22622262
Table << MatchTable::Opcode("GIM_CheckHasNoUse")
22632263
<< MatchTable::Comment("MI") << MatchTable::IntValue(InsnVarID)
22642264
<< MatchTable::LineBreak;

0 commit comments

Comments
 (0)