search for: printbeforethis

Displaying 4 results from an estimated 4 matches for "printbeforethis".

2010 Mar 14
3
[LLVMdev] [PATCH] Before/After IR Dumps
.../// before it. +bool PrintBeforePass(Pass *P) { Please just mark stand-alone functions "static" don't put them in anonymous namespaces. Typo in the comment. Please rename this to "ShouldPrintBeforePass", "PrintBeforePass" implies that it does printing. + bool PrintBeforeThis = PrintBeforeAll; + if (!PrintBeforeThis) don't nest the entire function, use an early return like this: if (PrintBeforeAll) return true; + for (unsigned i = 0; i < PrintBefore.size(); ++i) { Don't evaluate PrintBefore.size() every time through the loop. + if (PassInf &...
2010 Mar 12
0
[LLVMdev] [PATCH] Before/After IR Dumps
On Friday 12 March 2010 08:13:05 Kalle Raiskila wrote: > David Greene wrote: > > Here's a rework using PassManager as Chris suggested. Comments? > > Tried this second patch with the svn version 97812 (the one the patch is > made against), but it doesn't compile: > "llvm/include/llvm/Pass.h:127: Error: expected unqualified-id before "&" >
2010 Mar 12
2
[LLVMdev] [PATCH] Before/After IR Dumps
David Greene wrote: > Here's a rework using PassManager as Chris suggested. Comments? Tried this second patch with the svn version 97812 (the one the patch is made against), but it doesn't compile: "llvm/include/llvm/Pass.h:127: Error: expected unqualified-id before "&" token" Seems raw_ostream is forward declared but not defined (adding a missing #include
2010 Mar 15
0
[LLVMdev] [PATCH] Before/After IR Dumps
...ctions "static" don't put them in anonymous > namespaces. Ok. Out of curiosity, why the preference for static? > Typo in the comment. Please rename this to > "ShouldPrintBeforePass", "PrintBeforePass" implies that it does printing. Ok. > + bool PrintBeforeThis = PrintBeforeAll; > + if (!PrintBeforeThis) > > don't nest the entire function, use an early return like this: Ok. > + for (unsigned i = 0; i < PrintBefore.size(); ++i) { > Don't evaluate PrintBefore.size() every time through the loop. Ok, but that's a bit nitpi...