diff options
author | Chris Lattner <sabre@nondot.org> | 2008-08-17 07:19:36 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-08-17 07:19:36 +0000 |
commit | 17f7165f849c17004b37b6db02b91d80cecb1855 (patch) | |
tree | 43fb323d6789a0fd64e0ced1d40b3177fb355b2a /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 286e5e6c611f492dccba12988c851510bfbb2f63 (diff) | |
download | bcm5719-llvm-17f7165f849c17004b37b6db02b91d80cecb1855.tar.gz bcm5719-llvm-17f7165f849c17004b37b6db02b91d80cecb1855.zip |
Rework the routines that convert AP[S]Int into a string. Now, instead of
returning an std::string by value, it fills in a SmallString/SmallVector
passed in. This significantly reduces string thrashing in some cases.
More specifically, this:
- Adds an operator<< and a print method for APInt that allows you to
directly send them to an ostream.
- Reimplements APInt::toString to be much simpler and more efficient
algorithmically in addition to not thrashing strings quite as much.
This speeds up llvm-dis on kc++ by 7%, and may also slightly speed up the
asmprinter. This also fixes a bug I introduced into the asmwriter in a
previous patch w.r.t. alias printing.
llvm-svn: 54873
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 80dda1f280e..c3728749577 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -4992,7 +4992,7 @@ void SDNode::dump(const SelectionDAG *G) const { } if (const ConstantSDNode *CSDN = dyn_cast<ConstantSDNode>(this)) { - cerr << "<" << CSDN->getAPIntValue().toStringUnsigned() << ">"; + cerr << "<" << CSDN->getAPIntValue() << ">"; } else if (const ConstantFPSDNode *CSDN = dyn_cast<ConstantFPSDNode>(this)) { if (&CSDN->getValueAPF().getSemantics()==&APFloat::IEEEsingle) cerr << "<" << CSDN->getValueAPF().convertToFloat() << ">"; |