diff options
Diffstat (limited to 'contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.cpp')
-rw-r--r-- | contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.cpp | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.cpp b/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.cpp index 0c7c6cb..7f89742 100644 --- a/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.cpp +++ b/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.cpp @@ -110,19 +110,6 @@ bool NVPTXInstrInfo::isStoreInstr(const MachineInstr &MI, return isStore; } -bool NVPTXInstrInfo::CanTailMerge(const MachineInstr *MI) const { - unsigned addrspace = 0; - if (MI->getOpcode() == NVPTX::INT_BARRIER0) - return false; - if (isLoadInstr(*MI, addrspace)) - if (addrspace == NVPTX::PTXLdStInstCode::SHARED) - return false; - if (isStoreInstr(*MI, addrspace)) - if (addrspace == NVPTX::PTXLdStInstCode::SHARED) - return false; - return true; -} - /// AnalyzeBranch - Analyze the branching code at the end of MBB, returning /// true if it cannot be understood (e.g. it's a switch dispatch or isn't /// implemented for a target). Upon success, this returns false and returns @@ -143,7 +130,7 @@ bool NVPTXInstrInfo::CanTailMerge(const MachineInstr *MI) const { /// operands can be passed to other TargetInstrInfo methods to create new /// branches. /// -/// Note that RemoveBranch and InsertBranch must be implemented to support +/// Note that removeBranch and insertBranch must be implemented to support /// cases where this method returns success. /// bool NVPTXInstrInfo::analyzeBranch(MachineBasicBlock &MBB, @@ -205,7 +192,9 @@ bool NVPTXInstrInfo::analyzeBranch(MachineBasicBlock &MBB, return true; } -unsigned NVPTXInstrInfo::RemoveBranch(MachineBasicBlock &MBB) const { +unsigned NVPTXInstrInfo::removeBranch(MachineBasicBlock &MBB, + int *BytesRemoved) const { + assert(!BytesRemoved && "code size not handled"); MachineBasicBlock::iterator I = MBB.end(); if (I == MBB.begin()) return 0; @@ -229,13 +218,16 @@ unsigned NVPTXInstrInfo::RemoveBranch(MachineBasicBlock &MBB) const { return 2; } -unsigned NVPTXInstrInfo::InsertBranch(MachineBasicBlock &MBB, +unsigned NVPTXInstrInfo::insertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef<MachineOperand> Cond, - const DebugLoc &DL) const { + const DebugLoc &DL, + int *BytesAdded) const { + assert(!BytesAdded && "code size not handled"); + // Shouldn't be a fall through. - assert(TBB && "InsertBranch must not be told to insert a fallthrough"); + assert(TBB && "insertBranch must not be told to insert a fallthrough"); assert((Cond.size() == 1 || Cond.size() == 0) && "NVPTX branch conditions have two components!"); |