aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/Passes.h
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2010-04-01 22:43:57 +0000
committerDavid Greene <greened@obbligato.org>2010-04-01 22:43:57 +0000
commit8ef3acba00c9c42d450fa52c7d3faebce1e507dd (patch)
treeeb24eedb1c0e990efe72699d85bdd7ddd7f28e73 /include/llvm/CodeGen/Passes.h
parent3ea97550e361bc6ae23e9415abc7b0a34c540f53 (diff)
downloadexternal_llvm-8ef3acba00c9c42d450fa52c7d3faebce1e507dd.tar.gz
external_llvm-8ef3acba00c9c42d450fa52c7d3faebce1e507dd.tar.bz2
external_llvm-8ef3acba00c9c42d450fa52c7d3faebce1e507dd.zip
Add some switches helpful for debugging:
-print-before=<Pass Name> Dump IR before running pass <Pass Name>. -print-before-all Dump IR before running each pass. -print-after-all Dump IR after running each pass. These are helpful when tracking down a miscompilation. It is easy to get IR dumps and do diffs on them, etc. To make this work well, add a new getPrinterPass API to Pass so that each kind of pass (ModulePass, FunctionPass, etc.) can create a Pass suitable for dumping out the kind of object the Pass works on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100143 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/Passes.h')
-rw-r--r--include/llvm/CodeGen/Passes.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/Passes.h b/include/llvm/CodeGen/Passes.h
index 911be223b2..d3c2720c15 100644
--- a/include/llvm/CodeGen/Passes.h
+++ b/include/llvm/CodeGen/Passes.h
@@ -21,6 +21,7 @@
namespace llvm {
class FunctionPass;
+ class MachineFunctionPass;
class PassInfo;
class TargetLowering;
class RegisterCoalescer;
@@ -36,8 +37,9 @@ namespace llvm {
/// MachineFunctionPrinter pass - This pass prints out the machine function to
/// the given stream, as a debugging tool.
- FunctionPass *createMachineFunctionPrinterPass(raw_ostream &OS,
- const std::string &Banner ="");
+ MachineFunctionPass *
+ createMachineFunctionPrinterPass(raw_ostream &OS,
+ const std::string &Banner ="");
/// MachineLoopInfo pass - This pass is a loop analysis pass.
///