From 29506f5e6da0316e598da917c36d47c50568a6af Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Wed, 4 Jul 2012 19:28:27 +0000 Subject: Make sure -print-machineinstrs applies to the first pass as well. llvm-svn: 159720 --- llvm/lib/CodeGen/Passes.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen/Passes.cpp') diff --git a/llvm/lib/CodeGen/Passes.cpp b/llvm/lib/CodeGen/Passes.cpp index e4ad6c17bc2..69d6d00091a 100644 --- a/llvm/lib/CodeGen/Passes.cpp +++ b/llvm/lib/CodeGen/Passes.cpp @@ -433,9 +433,6 @@ void TargetPassConfig::addISelPrepare() { /// TODO: We could use a single addPre/Post(ID) hook to allow pass injection /// before/after any target-independent pass. But it's currently overkill. void TargetPassConfig::addMachinePasses() { - // Print the instruction selected machine code... - printAndVerify("After Instruction Selection"); - // Insert a machine instr printer pass after the specified pass. // If -print-machineinstrs specified, print machineinstrs after all passes. if (StringRef(PrintMachineInstrs.getValue()).equals("")) @@ -451,6 +448,9 @@ void TargetPassConfig::addMachinePasses() { insertPass(TID, IID); } + // Print the instruction selected machine code... + printAndVerify("After Instruction Selection"); + // Expand pseudo-instructions emitted by ISel. addPass(&ExpandISelPseudosID); -- cgit v1.2.3