summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/Twine.h
Commit message (Collapse)AuthorAge
* Fix typoEli Bendersky2013-04-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179793 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Doxygen issues:Dmitri Gribenko2012-09-13
| | | | | | | | | * wrap code blocks in \code ... \endcode; * refer to parameter names in paragraphs correctly (\arg is not what most people want -- it starts a new paragraph). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163790 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149849 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Twine support for characters, and switch twine to use a union internallyChris Lattner2011-07-24
| | | | | | | to eliminate some casting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135888 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/ADT/Twine: Add toNullTerminatedStringRef.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120600 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge System into Support.Michael J. Spencer2010-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Whitespace.Michael J. Spencer2010-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120166 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement rdar://7415680 - Twine integer support lacks greatnessChris Lattner2010-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Microoptimize Twine's with unsigned and int to not pin their value to the stack. This saves stack space in common cases and allows mem2reg in the caller. A simple example is: void foo(const Twine &); void bar(int x) { foo("xyz: " + Twine(x)); } Before: __Z3bari: subq $40, %rsp movl %edi, 36(%rsp) leaq L_.str3(%rip), %rax leaq 36(%rsp), %rcx leaq 8(%rsp), %rdi movq %rax, 8(%rsp) movq %rcx, 16(%rsp) movb $3, 24(%rsp) movb $7, 25(%rsp) callq __Z3fooRKN4llvm5TwineE addq $40, %rsp ret After: __Z3bari: subq $24, %rsp leaq L_.str3(%rip), %rax movq %rax, (%rsp) movslq %edi, %rax movq %rax, 8(%rsp) movb $3, 16(%rsp) movb $7, 17(%rsp) leaq (%rsp), %rdi callq __Z3fooRKN4llvm5TwineE addq $24, %rsp ret It saves 16 bytes of stack and one instruction in this case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103107 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce Twine::toStringRef, a variant of toVector which avoids the copy if theBenjamin Kramer2010-01-13
| | | | | | | | twine can be represented as a single StringRef. Use the new methode to simplify some twine users. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93317 91177308-0d34-0410-b5e6-96231b3b80d8
* add new isSingleStringRef()/getSingleStringRef() methods to twine, Chris Lattner2010-01-13
| | | | | | | | | and use them to avoid a copy of a string in getNameWithPrefix in the common case. It seems like Value::setName and other places should use this as well? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93301 91177308-0d34-0410-b5e6-96231b3b80d8
* Twine: Stores kinds as uchar instead of bitfield to be friendlier to theDaniel Dunbar2009-11-19
| | | | | | optimizer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89278 91177308-0d34-0410-b5e6-96231b3b80d8
* Move DataTypes.h to include/llvm/System, update all users. This breaks the lastChandler Carruth2009-10-26
| | | | | | | direct inclusion edge from System to Support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85086 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a fast path for setName("") on an unnamed value.Daniel Dunbar2009-08-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79492 91177308-0d34-0410-b5e6-96231b3b80d8
* Twine: Directly support int, long, and long long types.Daniel Dunbar2009-07-30
| | | | | | | - This should resolve Cygwin gcc ambiguities. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77624 91177308-0d34-0410-b5e6-96231b3b80d8
* Twine: Use raw_ostream::write_hex, remove unused itohexstr method.Daniel Dunbar2009-07-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77617 91177308-0d34-0410-b5e6-96231b3b80d8
* Twines: Don't allow implicit conversion from integers, this is too tricky.Daniel Dunbar2009-07-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77605 91177308-0d34-0410-b5e6-96231b3b80d8
* Twine: Provide [u]int{32,64} conversions via implicit constructors instead ofDaniel Dunbar2009-07-30
| | | | | | | explicitly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77576 91177308-0d34-0410-b5e6-96231b3b80d8
* MSVC build fix. Patch by Olaf Krzikalla!Benjamin Kramer2009-07-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77450 91177308-0d34-0410-b5e6-96231b3b80d8
* Twines: Support numeric conversion directly (uitostr, etc).Daniel Dunbar2009-07-29
| | | | | | | | | | | | | | | | - Provides static constructors for doing number to string conversions without using temporaries. - There are several ways to do this, I think given the Twine constraints this is the simplest one. - One FIXME for fast number -> hex conversion. - Added another comment on one last major bit of perf work Twines need, which is to make raw_svector_ostream more efficient. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77445 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix constructor typesDaniel Dunbar2009-07-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76958 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Twine ADT.Daniel Dunbar2009-07-24
- Not currently used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76956 91177308-0d34-0410-b5e6-96231b3b80d8