diff options
| author | Roman Tereshin <rtereshin@apple.com> | 2019-12-12 13:08:40 -0800 |
|---|---|---|
| committer | Roman Tereshin <rtereshin@apple.com> | 2019-12-13 15:45:18 -0800 |
| commit | 8207c81597adab5a06b50339e5ee2891f6e453bf (patch) | |
| tree | 3c83e9fc894a3821a03282f791d8d7e12a808972 | |
| parent | ed83942bc02501c62b55f77cba688263ea35221a (diff) | |
| download | bcm5719-llvm-8207c81597adab5a06b50339e5ee2891f6e453bf.tar.gz bcm5719-llvm-8207c81597adab5a06b50339e5ee2891f6e453bf.zip | |
[Legalizer] More detailed debugging printing in main loop
| -rw-r--r-- | llvm/lib/CodeGen/GlobalISel/Legalizer.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp b/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp index 179e53801f8..dbbc501e0fd 100644 --- a/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp +++ b/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp @@ -215,6 +215,7 @@ bool Legalizer::runOnMachineFunction(MachineFunction &MF) { bool Changed = false; SmallVector<MachineInstr *, 128> RetryList; do { + LLVM_DEBUG(dbgs() << "=== New Iteration ===\n"); assert(RetryList.empty() && "Expected no instructions in RetryList"); unsigned NumArtifacts = ArtifactList.size(); while (!InstList.empty()) { @@ -235,6 +236,7 @@ bool Legalizer::runOnMachineFunction(MachineFunction &MF) { // legalizing InstList may generate artifacts that allow // ArtifactCombiner to combine away them. if (isArtifact(MI)) { + LLVM_DEBUG(dbgs() << ".. Not legalized, moving to artifacts retry\n"); RetryList.push_back(&MI); continue; } @@ -251,6 +253,7 @@ bool Legalizer::runOnMachineFunction(MachineFunction &MF) { while (!RetryList.empty()) ArtifactList.insert(RetryList.pop_back_val()); } else { + LLVM_DEBUG(dbgs() << "No new artifacts created, not retrying!\n"); MachineInstr *MI = *RetryList.begin(); stopLegalizing(*MI); return false; @@ -266,6 +269,7 @@ bool Legalizer::runOnMachineFunction(MachineFunction &MF) { continue; } SmallVector<MachineInstr *, 4> DeadInstructions; + LLVM_DEBUG(dbgs() << "Trying to combine: " << MI); if (ArtCombiner.tryCombineInstruction(MI, DeadInstructions, WrapperObserver)) { WorkListObserver.printNewInstrs(); @@ -280,8 +284,10 @@ bool Legalizer::runOnMachineFunction(MachineFunction &MF) { // If this was not an artifact (that could be combined away), this might // need special handling. Add it to InstList, so when it's processed // there, it has to be legal or specially handled. - else + else { + LLVM_DEBUG(dbgs() << ".. Not combined, moving to instructions list\n"); InstList.insert(&MI); + } } } while (!InstList.empty()); |

