mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Revert "Add Constant Hoisting Pass"
This reverts commit r200022 to unbreak the build bots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200024 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -92,7 +92,6 @@ public:
|
||||
enum TargetCostConstants {
|
||||
TCC_Free = 0, ///< Expected to fold away in lowering.
|
||||
TCC_Basic = 1, ///< The cost of a typical 'add' instruction.
|
||||
TCC_Load = 3,
|
||||
TCC_Expensive = 4 ///< The cost of a 'div' instruction on x86.
|
||||
};
|
||||
|
||||
@@ -300,13 +299,6 @@ public:
|
||||
/// immediate of the specified type.
|
||||
virtual unsigned getIntImmCost(const APInt &Imm, Type *Ty) const;
|
||||
|
||||
/// \brief Return the expected cost of materialization for the given integer
|
||||
/// immediate of the specified type for a given instruction. The cost can be
|
||||
/// zero if the immediate can be folded into the specified instruction.
|
||||
virtual unsigned getIntImmCost(unsigned Opcode, const APInt &Imm,
|
||||
Type *Ty) const;
|
||||
virtual unsigned getIntImmCost(Intrinsic::ID IID, const APInt &Imm,
|
||||
Type *Ty) const;
|
||||
/// @}
|
||||
|
||||
/// \name Vector Target Information
|
||||
|
@@ -401,22 +401,18 @@ public:
|
||||
//===--------------------------------------------------------------------===//
|
||||
// Node creation methods.
|
||||
//
|
||||
SDValue getConstant(uint64_t Val, EVT VT, bool isTarget = false,
|
||||
bool isOpaque = false);
|
||||
SDValue getConstant(const APInt &Val, EVT VT, bool isTarget = false,
|
||||
bool isOpaque = false);
|
||||
SDValue getConstant(const ConstantInt &Val, EVT VT, bool isTarget = false,
|
||||
bool isOpaque = false);
|
||||
SDValue getConstant(uint64_t Val, EVT VT, bool isTarget = false);
|
||||
SDValue getConstant(const APInt &Val, EVT VT, bool isTarget = false);
|
||||
SDValue getConstant(const ConstantInt &Val, EVT VT, bool isTarget = false);
|
||||
SDValue getIntPtrConstant(uint64_t Val, bool isTarget = false);
|
||||
SDValue getTargetConstant(uint64_t Val, EVT VT, bool isOpaque = false) {
|
||||
return getConstant(Val, VT, true, isOpaque);
|
||||
SDValue getTargetConstant(uint64_t Val, EVT VT) {
|
||||
return getConstant(Val, VT, true);
|
||||
}
|
||||
SDValue getTargetConstant(const APInt &Val, EVT VT, bool isOpaque = false) {
|
||||
return getConstant(Val, VT, true, isOpaque);
|
||||
SDValue getTargetConstant(const APInt &Val, EVT VT) {
|
||||
return getConstant(Val, VT, true);
|
||||
}
|
||||
SDValue getTargetConstant(const ConstantInt &Val, EVT VT,
|
||||
bool isOpaque = false) {
|
||||
return getConstant(Val, VT, true, isOpaque);
|
||||
SDValue getTargetConstant(const ConstantInt &Val, EVT VT) {
|
||||
return getConstant(Val, VT, true);
|
||||
}
|
||||
// The forms below that take a double should only be used for simple
|
||||
// constants that can be exactly represented in VT. No checks are made.
|
||||
|
@@ -1250,10 +1250,9 @@ public:
|
||||
class ConstantSDNode : public SDNode {
|
||||
const ConstantInt *Value;
|
||||
friend class SelectionDAG;
|
||||
ConstantSDNode(bool isTarget, bool isOpaque, const ConstantInt *val, EVT VT)
|
||||
ConstantSDNode(bool isTarget, const ConstantInt *val, EVT VT)
|
||||
: SDNode(isTarget ? ISD::TargetConstant : ISD::Constant,
|
||||
0, DebugLoc(), getSDVTList(VT)), Value(val) {
|
||||
SubclassData |= isOpaque;
|
||||
}
|
||||
public:
|
||||
|
||||
@@ -1266,8 +1265,6 @@ public:
|
||||
bool isNullValue() const { return Value->isNullValue(); }
|
||||
bool isAllOnesValue() const { return Value->isAllOnesValue(); }
|
||||
|
||||
bool isOpaque() const { return SubclassData & 1; }
|
||||
|
||||
static bool classof(const SDNode *N) {
|
||||
return N->getOpcode() == ISD::Constant ||
|
||||
N->getOpcode() == ISD::TargetConstant;
|
||||
|
@@ -90,7 +90,6 @@ void initializeCFGSimplifyPassPass(PassRegistry&);
|
||||
void initializeFlattenCFGPassPass(PassRegistry&);
|
||||
void initializeStructurizeCFGPass(PassRegistry&);
|
||||
void initializeCFGViewerPass(PassRegistry&);
|
||||
void initializeConstantHoistingPass(PassRegistry&);
|
||||
void initializeCodeGenPreparePass(PassRegistry&);
|
||||
void initializeConstantMergePass(PassRegistry&);
|
||||
void initializeConstantPropagationPass(PassRegistry&);
|
||||
|
@@ -129,7 +129,6 @@ namespace {
|
||||
(void) llvm::createJumpThreadingPass();
|
||||
(void) llvm::createUnifyFunctionExitNodesPass();
|
||||
(void) llvm::createInstCountPass();
|
||||
(void) llvm::createConstantHoistingPass();
|
||||
(void) llvm::createCodeGenPreparePass();
|
||||
(void) llvm::createEarlyCSEPass();
|
||||
(void) llvm::createGVNPass();
|
||||
|
@@ -310,12 +310,6 @@ FunctionPass *createMemCpyOptPass();
|
||||
//
|
||||
Pass *createLoopDeletionPass();
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// ConstantHoisting - This pass prepares a function for expensive constants.
|
||||
//
|
||||
FunctionPass *createConstantHoistingPass();
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// CodeGenPrepare - This pass prepares a function for instruction selection.
|
||||
|
Reference in New Issue
Block a user