mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-04 10:04:33 +00:00
Attempt to make this debug output meaningful, both in the case of
multibyte opcodes and in the case of multiple scopes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98036 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1e233f510c
commit
19b3826d0f
@ -2141,6 +2141,9 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
|
||||
|
||||
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 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
|
||||
// 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 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user