diff options
| author | Philip Reames <preames@rivosinc.com> | 2023-02-07 10:41:18 -0800 |
|---|---|---|
| committer | Philip Reames <listmail@philipreames.com> | 2023-02-07 10:50:14 -0800 |
| commit | 3be1ae24fb17bf90cb3d8fc8e83ebd9d4523a594 (patch) | |
| tree | ca9946d20adc81a1fd5fe33d386072719ccf4df8 /llvm/lib/CodeGen/CallingConvLower.cpp | |
| parent | 07c7784d7bf69b9944b92ecc283cac823bcfce16 (diff) | |
[CodeGen] Add standard print/debug utilities to MVT
Doing so makes it easier to do printf style debugging in idiomatic manner. I followed the code structure of Value with only the definition of dump being #ifdef out in non-debug builds. Not sure if this is the "right" option; we don't seem to have any single consistent scheme on how dump is handled.
Note: This is a follow up to D143454 which did the same for EVT.
Differential Revision: https://reviews.llvm.org/D143511
Diffstat (limited to 'llvm/lib/CodeGen/CallingConvLower.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/CallingConvLower.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/CallingConvLower.cpp b/llvm/lib/CodeGen/CallingConvLower.cpp index ce1ef571c9df..fe70f9696eb3 100644 --- a/llvm/lib/CodeGen/CallingConvLower.cpp +++ b/llvm/lib/CodeGen/CallingConvLower.cpp @@ -129,7 +129,7 @@ void CCState::AnalyzeCallOperands(const SmallVectorImpl<ISD::OutputArg> &Outs, if (Fn(i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, *this)) { #ifndef NDEBUG dbgs() << "Call operand #" << i << " has unhandled type " - << EVT(ArgVT).getEVTString() << '\n'; + << ArgVT << '\n'; #endif llvm_unreachable(nullptr); } @@ -147,7 +147,7 @@ void CCState::AnalyzeCallOperands(SmallVectorImpl<MVT> &ArgVTs, if (Fn(i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, *this)) { #ifndef NDEBUG dbgs() << "Call operand #" << i << " has unhandled type " - << EVT(ArgVT).getEVTString() << '\n'; + << ArgVT << '\n'; #endif llvm_unreachable(nullptr); } @@ -164,7 +164,7 @@ void CCState::AnalyzeCallResult(const SmallVectorImpl<ISD::InputArg> &Ins, if (Fn(i, VT, VT, CCValAssign::Full, Flags, *this)) { #ifndef NDEBUG dbgs() << "Call result #" << i << " has unhandled type " - << EVT(VT).getEVTString() << '\n'; + << VT << '\n'; #endif llvm_unreachable(nullptr); } @@ -176,7 +176,7 @@ void CCState::AnalyzeCallResult(MVT VT, CCAssignFn Fn) { if (Fn(0, VT, VT, CCValAssign::Full, ISD::ArgFlagsTy(), *this)) { #ifndef NDEBUG dbgs() << "Call result has unhandled type " - << EVT(VT).getEVTString() << '\n'; + << VT << '\n'; #endif llvm_unreachable(nullptr); } @@ -212,7 +212,7 @@ void CCState::getRemainingRegParmsForType(SmallVectorImpl<MCPhysReg> &Regs, do { if (Fn(0, VT, VT, CCValAssign::Full, Flags, *this)) { #ifndef NDEBUG - dbgs() << "Call has unhandled type " << EVT(VT).getEVTString() + dbgs() << "Call has unhandled type " << VT << " while computing remaining regparms\n"; #endif llvm_unreachable(nullptr); |
