mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Print the number of uses of a function in the .ll since it can be informative
and there seems to be no reason not to. llvm-svn: 112812
This commit is contained in:
parent
e80abebead
commit
6b382d04f4
@ -1635,9 +1635,9 @@ void AssemblyWriter::printFunction(const Function *F) {
|
||||
if (F->hasGC())
|
||||
Out << " gc \"" << F->getGC() << '"';
|
||||
if (F->isDeclaration()) {
|
||||
Out << "\n";
|
||||
Out << " ; [#uses=" << F->getNumUses() << "]\n"; // Output # uses
|
||||
} else {
|
||||
Out << " {";
|
||||
Out << " { ; [#uses=" << F->getNumUses() << ']'; // Output # uses
|
||||
|
||||
// Output all of its basic blocks... for the function
|
||||
for (Function::const_iterator I = F->begin(), E = F->end(); I != E; ++I)
|
||||
|
@ -1,8 +1,7 @@
|
||||
; The induction variable canonicalization pass shouldn't leave dead
|
||||
; instructions laying around!
|
||||
;
|
||||
; RUN: opt < %s -indvars -S | \
|
||||
; RUN: not grep {#uses=0}
|
||||
; RUN: opt < %s -indvars -S | grep {#uses=0} | count 1
|
||||
|
||||
define i32 @mul(i32 %x, i32 %y) {
|
||||
entry:
|
||||
|
Loading…
Reference in New Issue
Block a user