mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 06:29:05 +00:00
Move MaskedValueIsZero from the DAGCombiner to the TargetLowering interface,
making isMaskedValueZeroForTargetNode simpler, and useable from other parts of the compiler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25802 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -280,6 +280,17 @@ public:
|
|||||||
return StackPointerRegisterToSaveRestore;
|
return StackPointerRegisterToSaveRestore;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//===--------------------------------------------------------------------===//
|
||||||
|
// TargetLowering Optimization Methods
|
||||||
|
//
|
||||||
|
|
||||||
|
/// MaskedValueIsZero - Return true if 'Op & Mask' is known to be zero. We
|
||||||
|
/// use this predicate to simplify operations downstream. Op and Mask are
|
||||||
|
/// known to be the same type. Targets can implement the
|
||||||
|
/// isMaskedValueZeroForTargetNode method, to allow target nodes to be
|
||||||
|
/// understood.
|
||||||
|
bool MaskedValueIsZero(const SDOperand &Op, uint64_t Mask) const;
|
||||||
|
|
||||||
//===--------------------------------------------------------------------===//
|
//===--------------------------------------------------------------------===//
|
||||||
// TargetLowering Configuration Methods - These methods should be invoked by
|
// TargetLowering Configuration Methods - These methods should be invoked by
|
||||||
// the derived class constructor to configure this object for the target.
|
// the derived class constructor to configure this object for the target.
|
||||||
@@ -413,12 +424,9 @@ public:
|
|||||||
virtual const char *getTargetNodeName(unsigned Opcode) const;
|
virtual const char *getTargetNodeName(unsigned Opcode) const;
|
||||||
|
|
||||||
/// isMaskedValueZeroForTargetNode - Return true if 'Op & Mask' is known to
|
/// isMaskedValueZeroForTargetNode - Return true if 'Op & Mask' is known to
|
||||||
/// be zero. Op is expected to be a target specific node. Used by DAG
|
/// be zero. Op is expected to be a target specific node.
|
||||||
/// combiner. MVIZ is a function pointer to the main MaskedValueIsZero
|
virtual bool isMaskedValueZeroForTargetNode(const SDOperand &Op,
|
||||||
/// function.
|
uint64_t Mask) const;
|
||||||
typedef bool (*MVIZFnPtr)(const SDOperand&, uint64_t, const TargetLowering &);
|
|
||||||
virtual bool isMaskedValueZeroForTargetNode(const SDOperand &Op,uint64_t Mask,
|
|
||||||
MVIZFnPtr MVIZ) const;
|
|
||||||
|
|
||||||
//===--------------------------------------------------------------------===//
|
//===--------------------------------------------------------------------===//
|
||||||
// Inline Asm Support hooks
|
// Inline Asm Support hooks
|
||||||
|
Reference in New Issue
Block a user