[llvm-branch-commits] [llvm] 30fc9fa - cleaned up print statements, checking load/store behavior

Jeffrey Byrnes via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Oct 17 10:42:36 PDT 2022


Author: Jeffrey Byrnes
Date: 2022-10-14T07:56:45-07:00
New Revision: 30fc9fa3a4695f99b0aaabcec2e05118e8ee4b61

URL: https://github.com/llvm/llvm-project/commit/30fc9fa3a4695f99b0aaabcec2e05118e8ee4b61
DIFF: https://github.com/llvm/llvm-project/commit/30fc9fa3a4695f99b0aaabcec2e05118e8ee4b61.diff

LOG: cleaned up print statements, checking load/store behavior

Added: 
    

Modified: 
    llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
    llvm/lib/CodeGen/TargetLoweringBase.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 081d8d96c9e2..fe358aa89881 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -958,10 +958,6 @@ void SelectionDAGLegalize::LegalizeLoadOps(SDNode *Node) {
 
 /// Return a legal replacement for the given operation, with all legal operands.
 void SelectionDAGLegalize::LegalizeOp(SDNode *Node) {
-  errs() << "\n\n\nDAG BEFORE\n";
-  DAG.dump();
-  errs() << "\n";
-
   LLVM_DEBUG(dbgs() << "\nLegalizing: "; Node->dump(&DAG));
 
   // Allow illegal target nodes and illegal registers.
@@ -970,35 +966,14 @@ void SelectionDAGLegalize::LegalizeOp(SDNode *Node) {
     return;
 
 #ifndef NDEBUG
-/*
+
   for (unsigned i = 0, e = Node->getNumValues(); i != e; ++i) {
-    errs() << "Checking legality of: \n";
-    auto temp = Node->getOperand(i-1);
-    temp.dump();
-    errs() << "\n";
     assert(TLI.getTypeAction(*DAG.getContext(), Node->getValueType(i)) ==
              TargetLowering::TypeLegal &&
            "Unexpected illegal type!");
   }
-*/
-  errs() << "Quick Legal Check\n";
-  for (const SDValue &Op : Node->op_values()) {
-    Op.dump();
-    errs() << "\n";
-    assert(TLI.getTypeAction(*DAG.getContext(), Op.getValueType()) ==
-             TargetLowering::TypeLegal &&
-           "Unexpected illegal type!");
-  }
-
-  errs() << "Full Legal Check\n";
 
   for (const SDValue &Op : Node->op_values()) {
-    errs() << "Checking op: \n";
-    Op.dump();
-    errs() << "\n";
-    if (TLI.getTypeAction(*DAG.getContext(), Op.getValueType()) ==
-              TargetLowering::TypeLegal) errs() << "TargetLowering::TypeLegal\n";
-    if (Op.getOpcode() == ISD::Register) errs() << "Register\n";
     assert((TLI.getTypeAction(*DAG.getContext(), Op.getValueType()) ==
               TargetLowering::TypeLegal ||
             Op.getOpcode() == ISD::TargetConstant ||
@@ -1314,12 +1289,10 @@ void SelectionDAGLegalize::LegalizeOp(SDNode *Node) {
       LLVM_DEBUG(dbgs() << "Legal node: nothing to do\n");
       return;
     case TargetLowering::Custom:
-      errs() << "from legalizeDAG.cpp\n";
       LLVM_DEBUG(dbgs() << "Trying custom legalization\n");
       // FIXME: The handling for custom lowering with multiple results is
       // a complete mess.
       if (SDValue Res = TLI.LowerOperation(SDValue(Node, 0), DAG)) {
-        errs() << "TLI.LowerOperation returned\n";
         if (!(Res.getNode() != Node || Res.getResNo() != 0))
           return;
 

diff  --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp
index 363bafb48c55..e6b577b4cc68 100644
--- a/llvm/lib/CodeGen/TargetLoweringBase.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp
@@ -954,16 +954,13 @@ void TargetLoweringBase::setJumpIsExpensive(bool isExpensive) {
 
 TargetLoweringBase::LegalizeKind
 TargetLoweringBase::getTypeConversion(LLVMContext &Context, EVT VT) const {
-  errs() << "in TLB::getTypeConv\n";
   // If this is a simple type, use the ComputeRegisterProp mechanism.
   if (VT.isSimple()) {
-    errs() << "isSimple]\n";
     MVT SVT = VT.getSimpleVT();
     assert((unsigned)SVT.SimpleTy < std::size(TransformToType));
     MVT NVT = TransformToType[SVT.SimpleTy];
-    errs() << "Found TypeTransform" << (int)NVT.SimpleTy << "\n";
     LegalizeTypeAction LA = ValueTypeActions.getTypeAction(SVT);
-    errs() << "Found TypeAction: " << (int)LA << "\n";
+
 
     assert((LA == TypeLegal || LA == TypeSoftenFloat ||
             LA == TypeSoftPromoteHalf ||


        


More information about the llvm-branch-commits mailing list