mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
delete function names from comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219444 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -94,11 +94,11 @@ namespace {
|
|||||||
/// blocks exclusively containing copies.
|
/// blocks exclusively containing copies.
|
||||||
bool JoinSplitEdges;
|
bool JoinSplitEdges;
|
||||||
|
|
||||||
/// WorkList - Copy instructions yet to be coalesced.
|
/// Copy instructions yet to be coalesced.
|
||||||
SmallVector<MachineInstr*, 8> WorkList;
|
SmallVector<MachineInstr*, 8> WorkList;
|
||||||
SmallVector<MachineInstr*, 8> LocalWorkList;
|
SmallVector<MachineInstr*, 8> LocalWorkList;
|
||||||
|
|
||||||
/// ErasedInstrs - Set of instruction pointers that have been erased, and
|
/// Set of instruction pointers that have been erased, and
|
||||||
/// that may be present in WorkList.
|
/// that may be present in WorkList.
|
||||||
SmallPtrSet<MachineInstr*, 8> ErasedInstrs;
|
SmallPtrSet<MachineInstr*, 8> ErasedInstrs;
|
||||||
|
|
||||||
@@ -114,21 +114,21 @@ namespace {
|
|||||||
/// LiveRangeEdit callback.
|
/// LiveRangeEdit callback.
|
||||||
void LRE_WillEraseInstruction(MachineInstr *MI) override;
|
void LRE_WillEraseInstruction(MachineInstr *MI) override;
|
||||||
|
|
||||||
/// coalesceLocals - coalesce the LocalWorkList.
|
/// Coalesce the LocalWorkList.
|
||||||
void coalesceLocals();
|
void coalesceLocals();
|
||||||
|
|
||||||
/// joinAllIntervals - join compatible live intervals
|
/// Join compatible live intervals
|
||||||
void joinAllIntervals();
|
void joinAllIntervals();
|
||||||
|
|
||||||
/// copyCoalesceInMBB - Coalesce copies in the specified MBB, putting
|
/// Coalesce copies in the specified MBB, putting
|
||||||
/// copies that cannot yet be coalesced into WorkList.
|
/// copies that cannot yet be coalesced into WorkList.
|
||||||
void copyCoalesceInMBB(MachineBasicBlock *MBB);
|
void copyCoalesceInMBB(MachineBasicBlock *MBB);
|
||||||
|
|
||||||
/// copyCoalesceWorkList - Try to coalesce all copies in CurrList. Return
|
/// Try to coalesce all copies in CurrList. Return
|
||||||
/// true if any progress was made.
|
/// true if any progress was made.
|
||||||
bool copyCoalesceWorkList(MutableArrayRef<MachineInstr*> CurrList);
|
bool copyCoalesceWorkList(MutableArrayRef<MachineInstr*> CurrList);
|
||||||
|
|
||||||
/// joinCopy - Attempt to join intervals corresponding to SrcReg/DstReg,
|
/// Attempt to join intervals corresponding to SrcReg/DstReg,
|
||||||
/// which are the src/dst of the copy instruction CopyMI. This returns
|
/// which are the src/dst of the copy instruction CopyMI. This returns
|
||||||
/// true if the copy was successfully coalesced away. If it is not
|
/// true if the copy was successfully coalesced away. If it is not
|
||||||
/// currently possible to coalesce this interval, but it may be possible if
|
/// currently possible to coalesce this interval, but it may be possible if
|
||||||
@@ -136,7 +136,7 @@ namespace {
|
|||||||
/// 'Again'.
|
/// 'Again'.
|
||||||
bool joinCopy(MachineInstr *TheCopy, bool &Again);
|
bool joinCopy(MachineInstr *TheCopy, bool &Again);
|
||||||
|
|
||||||
/// joinIntervals - Attempt to join these two intervals. On failure, this
|
/// Attempt to join these two intervals. On failure, this
|
||||||
/// returns false. The output "SrcInt" will not have been modified, so we
|
/// returns false. The output "SrcInt" will not have been modified, so we
|
||||||
/// can use this information below to update aliases.
|
/// can use this information below to update aliases.
|
||||||
bool joinIntervals(CoalescerPair &CP);
|
bool joinIntervals(CoalescerPair &CP);
|
||||||
@@ -147,39 +147,39 @@ namespace {
|
|||||||
/// Attempt joining with a reserved physreg.
|
/// Attempt joining with a reserved physreg.
|
||||||
bool joinReservedPhysReg(CoalescerPair &CP);
|
bool joinReservedPhysReg(CoalescerPair &CP);
|
||||||
|
|
||||||
/// adjustCopiesBackFrom - We found a non-trivially-coalescable copy. If
|
/// We found a non-trivially-coalescable copy. If
|
||||||
/// the source value number is defined by a copy from the destination reg
|
/// the source value number is defined by a copy from the destination reg
|
||||||
/// see if we can merge these two destination reg valno# into a single
|
/// see if we can merge these two destination reg valno# into a single
|
||||||
/// value number, eliminating a copy.
|
/// value number, eliminating a copy.
|
||||||
bool adjustCopiesBackFrom(const CoalescerPair &CP, MachineInstr *CopyMI);
|
bool adjustCopiesBackFrom(const CoalescerPair &CP, MachineInstr *CopyMI);
|
||||||
|
|
||||||
/// hasOtherReachingDefs - Return true if there are definitions of IntB
|
/// Return true if there are definitions of IntB
|
||||||
/// other than BValNo val# that can reach uses of AValno val# of IntA.
|
/// other than BValNo val# that can reach uses of AValno val# of IntA.
|
||||||
bool hasOtherReachingDefs(LiveInterval &IntA, LiveInterval &IntB,
|
bool hasOtherReachingDefs(LiveInterval &IntA, LiveInterval &IntB,
|
||||||
VNInfo *AValNo, VNInfo *BValNo);
|
VNInfo *AValNo, VNInfo *BValNo);
|
||||||
|
|
||||||
/// removeCopyByCommutingDef - We found a non-trivially-coalescable copy.
|
/// We found a non-trivially-coalescable copy.
|
||||||
/// If the source value number is defined by a commutable instruction and
|
/// If the source value number is defined by a commutable instruction and
|
||||||
/// its other operand is coalesced to the copy dest register, see if we
|
/// its other operand is coalesced to the copy dest register, see if we
|
||||||
/// can transform the copy into a noop by commuting the definition.
|
/// can transform the copy into a noop by commuting the definition.
|
||||||
bool removeCopyByCommutingDef(const CoalescerPair &CP,MachineInstr *CopyMI);
|
bool removeCopyByCommutingDef(const CoalescerPair &CP,MachineInstr *CopyMI);
|
||||||
|
|
||||||
/// reMaterializeTrivialDef - If the source of a copy is defined by a
|
/// If the source of a copy is defined by a
|
||||||
/// trivial computation, replace the copy by rematerialize the definition.
|
/// trivial computation, replace the copy by rematerialize the definition.
|
||||||
bool reMaterializeTrivialDef(CoalescerPair &CP, MachineInstr *CopyMI,
|
bool reMaterializeTrivialDef(CoalescerPair &CP, MachineInstr *CopyMI,
|
||||||
bool &IsDefCopy);
|
bool &IsDefCopy);
|
||||||
|
|
||||||
/// canJoinPhys - Return true if a physreg copy should be joined.
|
/// Return true if a physreg copy should be joined.
|
||||||
bool canJoinPhys(const CoalescerPair &CP);
|
bool canJoinPhys(const CoalescerPair &CP);
|
||||||
|
|
||||||
/// updateRegDefsUses - Replace all defs and uses of SrcReg to DstReg and
|
/// Replace all defs and uses of SrcReg to DstReg and
|
||||||
/// update the subregister number if it is not zero. If DstReg is a
|
/// update the subregister number if it is not zero. If DstReg is a
|
||||||
/// physical register and the existing subregister number of the def / use
|
/// physical register and the existing subregister number of the def / use
|
||||||
/// being updated is not zero, make sure to set it to the correct physical
|
/// being updated is not zero, make sure to set it to the correct physical
|
||||||
/// subregister.
|
/// subregister.
|
||||||
void updateRegDefsUses(unsigned SrcReg, unsigned DstReg, unsigned SubIdx);
|
void updateRegDefsUses(unsigned SrcReg, unsigned DstReg, unsigned SubIdx);
|
||||||
|
|
||||||
/// eliminateUndefCopy - Handle copies of undef values.
|
/// Handle copies of undef values.
|
||||||
bool eliminateUndefCopy(MachineInstr *CopyMI, const CoalescerPair &CP);
|
bool eliminateUndefCopy(MachineInstr *CopyMI, const CoalescerPair &CP);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -192,10 +192,10 @@ namespace {
|
|||||||
|
|
||||||
void releaseMemory() override;
|
void releaseMemory() override;
|
||||||
|
|
||||||
/// runOnMachineFunction - pass entry point
|
/// This is the pass entry point.
|
||||||
bool runOnMachineFunction(MachineFunction&) override;
|
bool runOnMachineFunction(MachineFunction&) override;
|
||||||
|
|
||||||
/// print - Implement the dump method.
|
/// Implement the dump method.
|
||||||
void print(raw_ostream &O, const Module* = nullptr) const override;
|
void print(raw_ostream &O, const Module* = nullptr) const override;
|
||||||
};
|
};
|
||||||
} /// end anonymous namespace
|
} /// end anonymous namespace
|
||||||
@@ -407,7 +407,7 @@ void RegisterCoalescer::LRE_WillEraseInstruction(MachineInstr *MI) {
|
|||||||
ErasedInstrs.insert(MI);
|
ErasedInstrs.insert(MI);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// adjustCopiesBackFrom - We found a non-trivially-coalescable copy with IntA
|
/// We found a non-trivially-coalescable copy with IntA
|
||||||
/// being the source and IntB being the dest, thus this defines a value number
|
/// being the source and IntB being the dest, thus this defines a value number
|
||||||
/// in IntB. If the source value number (in IntA) is defined by a copy from B,
|
/// in IntB. If the source value number (in IntA) is defined by a copy from B,
|
||||||
/// see if we can merge these two pieces of B into a single value number,
|
/// see if we can merge these two pieces of B into a single value number,
|
||||||
@@ -512,7 +512,7 @@ bool RegisterCoalescer::adjustCopiesBackFrom(const CoalescerPair &CP,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// hasOtherReachingDefs - Return true if there are definitions of IntB
|
/// Return true if there are definitions of IntB
|
||||||
/// other than BValNo val# that can reach uses of AValno val# of IntA.
|
/// other than BValNo val# that can reach uses of AValno val# of IntA.
|
||||||
bool RegisterCoalescer::hasOtherReachingDefs(LiveInterval &IntA,
|
bool RegisterCoalescer::hasOtherReachingDefs(LiveInterval &IntA,
|
||||||
LiveInterval &IntB,
|
LiveInterval &IntB,
|
||||||
@@ -542,7 +542,7 @@ bool RegisterCoalescer::hasOtherReachingDefs(LiveInterval &IntA,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// removeCopyByCommutingDef - We found a non-trivially-coalescable copy with
|
/// We found a non-trivially-coalescable copy with
|
||||||
/// IntA being the source and IntB being the dest, thus this defines a value
|
/// IntA being the source and IntB being the dest, thus this defines a value
|
||||||
/// number in IntB. If the source value number (in IntA) is defined by a
|
/// number in IntB. If the source value number (in IntA) is defined by a
|
||||||
/// commutable instruction and its other operand is coalesced to the copy dest
|
/// commutable instruction and its other operand is coalesced to the copy dest
|
||||||
@@ -725,7 +725,7 @@ bool RegisterCoalescer::removeCopyByCommutingDef(const CoalescerPair &CP,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// reMaterializeTrivialDef - If the source of a copy is defined by a trivial
|
/// If the source of a copy is defined by a trivial
|
||||||
/// computation, replace the copy by rematerialize the definition.
|
/// computation, replace the copy by rematerialize the definition.
|
||||||
bool RegisterCoalescer::reMaterializeTrivialDef(CoalescerPair &CP,
|
bool RegisterCoalescer::reMaterializeTrivialDef(CoalescerPair &CP,
|
||||||
MachineInstr *CopyMI,
|
MachineInstr *CopyMI,
|
||||||
@@ -904,7 +904,7 @@ bool RegisterCoalescer::reMaterializeTrivialDef(CoalescerPair &CP,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// eliminateUndefCopy - ProcessImpicitDefs may leave some copies of <undef>
|
/// ProcessImpicitDefs may leave some copies of <undef>
|
||||||
/// values, it only removes local variables. When we have a copy like:
|
/// values, it only removes local variables. When we have a copy like:
|
||||||
///
|
///
|
||||||
/// %vreg1 = COPY %vreg2<undef>
|
/// %vreg1 = COPY %vreg2<undef>
|
||||||
@@ -944,11 +944,10 @@ bool RegisterCoalescer::eliminateUndefCopy(MachineInstr *CopyMI,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// updateRegDefsUses - Replace all defs and uses of SrcReg to DstReg and
|
/// Replace all defs and uses of SrcReg to DstReg and update the subregister
|
||||||
/// update the subregister number if it is not zero. If DstReg is a
|
/// number if it is not zero. If DstReg is a physical register and the existing
|
||||||
/// physical register and the existing subregister number of the def / use
|
/// subregister number of the def / use being updated is not zero, make sure to
|
||||||
/// being updated is not zero, make sure to set it to the correct physical
|
/// set it to the correct physical subregister.
|
||||||
/// subregister.
|
|
||||||
void RegisterCoalescer::updateRegDefsUses(unsigned SrcReg,
|
void RegisterCoalescer::updateRegDefsUses(unsigned SrcReg,
|
||||||
unsigned DstReg,
|
unsigned DstReg,
|
||||||
unsigned SubIdx) {
|
unsigned SubIdx) {
|
||||||
@@ -1003,7 +1002,7 @@ void RegisterCoalescer::updateRegDefsUses(unsigned SrcReg,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// canJoinPhys - Return true if a copy involving a physreg should be joined.
|
/// Return true if a copy involving a physreg should be joined.
|
||||||
bool RegisterCoalescer::canJoinPhys(const CoalescerPair &CP) {
|
bool RegisterCoalescer::canJoinPhys(const CoalescerPair &CP) {
|
||||||
/// Always join simple intervals that are defined by a single copy from a
|
/// Always join simple intervals that are defined by a single copy from a
|
||||||
/// reserved register. This doesn't increase register pressure, so it is
|
/// reserved register. This doesn't increase register pressure, so it is
|
||||||
@@ -1021,7 +1020,7 @@ bool RegisterCoalescer::canJoinPhys(const CoalescerPair &CP) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// joinCopy - Attempt to join intervals corresponding to SrcReg/DstReg,
|
/// Attempt to join intervals corresponding to SrcReg/DstReg,
|
||||||
/// which are the src/dst of the copy instruction CopyMI. This returns true
|
/// which are the src/dst of the copy instruction CopyMI. This returns true
|
||||||
/// if the copy was successfully coalesced away. If it is not currently
|
/// if the copy was successfully coalesced away. If it is not currently
|
||||||
/// possible to coalesce this interval, but it may be possible if other
|
/// possible to coalesce this interval, but it may be possible if other
|
||||||
@@ -2051,8 +2050,7 @@ bool RegisterCoalescer::joinVirtRegs(CoalescerPair &CP) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// joinIntervals - Attempt to join these two intervals. On failure, this
|
/// Attempt to join these two intervals. On failure, this returns false.
|
||||||
/// returns false.
|
|
||||||
bool RegisterCoalescer::joinIntervals(CoalescerPair &CP) {
|
bool RegisterCoalescer::joinIntervals(CoalescerPair &CP) {
|
||||||
return CP.isPhys() ? joinReservedPhysReg(CP) : joinVirtRegs(CP);
|
return CP.isPhys() ? joinReservedPhysReg(CP) : joinVirtRegs(CP);
|
||||||
}
|
}
|
||||||
@@ -2277,7 +2275,7 @@ bool RegisterCoalescer::runOnMachineFunction(MachineFunction &fn) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// print - Implement the dump method.
|
/// Implement the dump method.
|
||||||
void RegisterCoalescer::print(raw_ostream &O, const Module* m) const {
|
void RegisterCoalescer::print(raw_ostream &O, const Module* m) const {
|
||||||
LIS->print(O, m);
|
LIS->print(O, m);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user