diff options
author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2015-06-11 19:30:37 +0000 |
---|---|---|
committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2015-06-11 19:30:37 +0000 |
commit | c88bf54366f19d849b0b23f1ec6037e10fbc0d05 (patch) | |
tree | 8b42b5f286da143fbc2b8a129006c5802b3bc20f /llvm/lib/Target/R600 | |
parent | 7c6e6e49cc2ed0b35b03f06a2a3a3208bb35fe45 (diff) | |
download | bcm5719-llvm-c88bf54366f19d849b0b23f1ec6037e10fbc0d05.tar.gz bcm5719-llvm-c88bf54366f19d849b0b23f1ec6037e10fbc0d05.zip |
[CodeGen] ArrayRef'ize cond/pred in various TII APIs. NFC.
llvm-svn: 239553
Diffstat (limited to 'llvm/lib/Target/R600')
-rw-r--r-- | llvm/lib/Target/R600/AMDGPUInstrInfo.cpp | 7 | ||||
-rw-r--r-- | llvm/lib/Target/R600/AMDGPUInstrInfo.h | 4 | ||||
-rw-r--r-- | llvm/lib/Target/R600/R600InstrInfo.cpp | 13 | ||||
-rw-r--r-- | llvm/lib/Target/R600/R600InstrInfo.h | 10 |
4 files changed, 17 insertions, 17 deletions
diff --git a/llvm/lib/Target/R600/AMDGPUInstrInfo.cpp b/llvm/lib/Target/R600/AMDGPUInstrInfo.cpp index 64e295f1144..15a3d543a68 100644 --- a/llvm/lib/Target/R600/AMDGPUInstrInfo.cpp +++ b/llvm/lib/Target/R600/AMDGPUInstrInfo.cpp @@ -234,10 +234,9 @@ bool AMDGPUInstrInfo::isPredicated(const MachineInstr *MI) const { // TODO: Implement this function return false; } -bool -AMDGPUInstrInfo::SubsumesPredicate(const SmallVectorImpl<MachineOperand> &Pred1, - const SmallVectorImpl<MachineOperand> &Pred2) - const { + +bool AMDGPUInstrInfo::SubsumesPredicate(ArrayRef<MachineOperand> Pred1, + ArrayRef<MachineOperand> Pred2) const { // TODO: Implement this function return false; } diff --git a/llvm/lib/Target/R600/AMDGPUInstrInfo.h b/llvm/lib/Target/R600/AMDGPUInstrInfo.h index 8fd27a17638..86d3962b385 100644 --- a/llvm/lib/Target/R600/AMDGPUInstrInfo.h +++ b/llvm/lib/Target/R600/AMDGPUInstrInfo.h @@ -125,8 +125,8 @@ public: void insertNoop(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const override; bool isPredicated(const MachineInstr *MI) const override; - bool SubsumesPredicate(const SmallVectorImpl<MachineOperand> &Pred1, - const SmallVectorImpl<MachineOperand> &Pred2) const override; + bool SubsumesPredicate(ArrayRef<MachineOperand> Pred1, + ArrayRef<MachineOperand> Pred2) const override; bool DefinesPredicate(MachineInstr *MI, std::vector<MachineOperand> &Pred) const override; bool isPredicable(MachineInstr *MI) const override; diff --git a/llvm/lib/Target/R600/R600InstrInfo.cpp b/llvm/lib/Target/R600/R600InstrInfo.cpp index 5f0bdf34815..5ef883cbcad 100644 --- a/llvm/lib/Target/R600/R600InstrInfo.cpp +++ b/llvm/lib/Target/R600/R600InstrInfo.cpp @@ -354,7 +354,7 @@ R600InstrInfo::ExtractSrcs(MachineInstr *MI, const DenseMap<unsigned, unsigned> &PV, unsigned &ConstCount) const { ConstCount = 0; - const SmallVector<std::pair<MachineOperand *, int64_t>, 3> Srcs = getSrcs(MI); + ArrayRef<std::pair<MachineOperand *, int64_t>> Srcs = getSrcs(MI); const std::pair<int, unsigned> DummyPair(-1, 0); std::vector<std::pair<int, unsigned> > Result; unsigned i = 0; @@ -628,8 +628,7 @@ R600InstrInfo::fitsConstReadLimitations(const std::vector<MachineInstr *> &MIs) if (!isALUInstr(MI->getOpcode())) continue; - const SmallVectorImpl<std::pair<MachineOperand *, int64_t> > &Srcs = - getSrcs(MI); + ArrayRef<std::pair<MachineOperand *, int64_t>> Srcs = getSrcs(MI); for (unsigned j = 0, e = Srcs.size(); j < e; j++) { std::pair<MachineOperand *, unsigned> Src = Srcs[j]; @@ -782,7 +781,7 @@ unsigned R600InstrInfo::InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, - const SmallVectorImpl<MachineOperand> &Cond, + ArrayRef<MachineOperand> Cond, DebugLoc DL) const { assert(TBB && "InsertBranch must not be told to insert a fallthrough"); @@ -1000,15 +999,15 @@ R600InstrInfo::DefinesPredicate(MachineInstr *MI, bool -R600InstrInfo::SubsumesPredicate(const SmallVectorImpl<MachineOperand> &Pred1, - const SmallVectorImpl<MachineOperand> &Pred2) const { +R600InstrInfo::SubsumesPredicate(ArrayRef<MachineOperand> Pred1, + ArrayRef<MachineOperand> Pred2) const { return false; } bool R600InstrInfo::PredicateInstruction(MachineInstr *MI, - const SmallVectorImpl<MachineOperand> &Pred) const { + ArrayRef<MachineOperand> Pred) const { int PIdx = MI->findFirstPredOperandIdx(); if (MI->getOpcode() == AMDGPU::CF_ALU) { diff --git a/llvm/lib/Target/R600/R600InstrInfo.h b/llvm/lib/Target/R600/R600InstrInfo.h index d3dc0e58daa..dee4c2b9ae3 100644 --- a/llvm/lib/Target/R600/R600InstrInfo.h +++ b/llvm/lib/Target/R600/R600InstrInfo.h @@ -162,7 +162,9 @@ namespace llvm { bool AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl<MachineOperand> &Cond, bool AllowModify) const override; - unsigned InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, const SmallVectorImpl<MachineOperand> &Cond, DebugLoc DL) const override; + unsigned InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, + MachineBasicBlock *FBB, ArrayRef<MachineOperand> Cond, + DebugLoc DL) const override; unsigned RemoveBranch(MachineBasicBlock &MBB) const override; @@ -188,14 +190,14 @@ namespace llvm { bool DefinesPredicate(MachineInstr *MI, std::vector<MachineOperand> &Pred) const override; - bool SubsumesPredicate(const SmallVectorImpl<MachineOperand> &Pred1, - const SmallVectorImpl<MachineOperand> &Pred2) const override; + bool SubsumesPredicate(ArrayRef<MachineOperand> Pred1, + ArrayRef<MachineOperand> Pred2) const override; bool isProfitableToUnpredicate(MachineBasicBlock &TMBB, MachineBasicBlock &FMBB) const override; bool PredicateInstruction(MachineInstr *MI, - const SmallVectorImpl<MachineOperand> &Pred) const override; + ArrayRef<MachineOperand> Pred) const override; unsigned int getPredicationCost(const MachineInstr *) const override; |