[llvm-commits] [llvm] r98036 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Chris Lattner
clattner at apple.com
Mon Mar 8 20:30:25 PST 2010
Looks great, thanks Dan.
-Chris
On Mar 8, 2010, at 6:15 PM, Dan Gohman wrote:
> Author: djg
> Date: Mon Mar 8 20:15:05 2010
> New Revision: 98036
>
> URL: http://llvm.org/viewvc/llvm-project?rev=98036&view=rev
> Log:
> Attempt to make this debug output meaningful, both in the case of
> multibyte opcodes and in the case of multiple scopes.
>
> Modified:
> llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=98036&r1=98035&r2=98036&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Mar 8 20:15:05 2010
> @@ -2141,6 +2141,9 @@
>
> while (1) {
> assert(MatcherIndex < TableSize && "Invalid index");
> +#ifndef NDEBUG
> + unsigned CurrentOpcodeIndex = MatcherIndex;
> +#endif
> BuiltinOpcodes Opcode = (BuiltinOpcodes)MatcherTable[MatcherIndex++];
> switch (Opcode) {
> case OPC_Scope: {
> @@ -2666,6 +2669,7 @@
> // If the code reached this point, then the match failed. See if there is
> // another child to try in the current 'Scope', otherwise pop it until we
> // find a case to check.
> + DEBUG(errs() << " Match failed at index " << CurrentOpcodeIndex << "\n");
> while (1) {
> if (MatchScopes.empty()) {
> CannotYetSelect(NodeToMatch);
> @@ -2680,13 +2684,12 @@
> NodeStack.append(LastScope.NodeStack.begin(), LastScope.NodeStack.end());
> N = NodeStack.back();
>
> - DEBUG(errs() << " Match failed at index " << (MatcherIndex-1)
> - << " continuing at " << LastScope.FailIndex << "\n");
> -
> if (LastScope.NumMatchedMemRefs != MatchedMemRefs.size())
> MatchedMemRefs.resize(LastScope.NumMatchedMemRefs);
> MatcherIndex = LastScope.FailIndex;
>
> + DEBUG(errs() << " Continuing at " << MatcherIndex << "\n");
> +
> InputChain = LastScope.InputChain;
> InputFlag = LastScope.InputFlag;
> if (!LastScope.HasChainNodesMatched)
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list