Commit Graph

45749 Commits

Author SHA1 Message Date
Daniel Dunbar
38f4dd7b5e Add fast path for raw_ostream output of strings.
- Particularly nice for small constant strings, which get optimized
   down nicely. On a synthetic benchmark writing out "hello" in a
   loop, this is about 2x faster with gcc and 3x faster with
   llvm-gcc. llc on insn-attrtab.bc from 403.gcc is about .5% faster.

 - I tried for a fancier solution which wouldn't increase code size as
   much (by trying to match constant arrays), but can't quite make it
   fly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68396 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03 18:43:17 +00:00
Oscar Fuentes
cf2202a849 CMake: tools/llvm-config/CMakeLists.txt: Use ! instead of comma as
separator in sed scripts. Resolves Bug 3881.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68385 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03 12:16:32 +00:00
Oscar Fuentes
fcf054bbd4 CMake: removed IA64AsmPrinter.cpp from lib/Target/IA64/CMakeLists.txt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68384 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03 12:11:43 +00:00
Anton Korobeynikov
6c5cfec73e Separate MIPS asmprinter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68383 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03 10:41:41 +00:00
Anton Korobeynikov
60a19a4edd Fix target library name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68382 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03 10:41:17 +00:00
Anton Korobeynikov
c67d1127d0 Fix comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68381 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03 10:41:00 +00:00
Anton Korobeynikov
ea38970596 Move IA64 asmprinter to separate library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68380 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03 10:38:51 +00:00
Mon P Wang
1e95580925 Added a x86 dag combine to increase the chances to use a
movq for v2i64 on x86-32.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68368 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03 02:43:30 +00:00
Chris Lattner
f436fed412 update some syntax
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68362 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03 00:29:19 +00:00
Chris Lattner
b7a00daa11 Work around an apparent GCC miscompilation by specializing different,
this fixes a regression on some compilers from r68147.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68356 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03 00:26:01 +00:00
Dan Gohman
8f9643f0f7 Delete ISD::INSERT_SUBREG and ISD::EXTRACT_SUBREG, which are unused.
Note that these are distinct from TargetInstrInfo::INSERT_SUBREG
and TargetInstrInfo::EXTRACT_SUBREG, which are used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68355 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03 00:25:26 +00:00
Chris Lattner
25f0ee5191 correct patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68353 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03 00:10:56 +00:00
Chris Lattner
d72513417d add patch to go along with r68350
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68352 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03 00:10:31 +00:00
Chris Lattner
6f532a988e use higher level APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68351 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03 00:02:39 +00:00
Chris Lattner
6caced9564 add missing *
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68350 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-02 23:53:03 +00:00
Sanjiv Gupta
c2eb87afc1 Fixed build warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68333 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-02 18:33:12 +00:00
Sanjiv Gupta
5274a4afb7 To convert the StopPoint insn into an assembler directive by ISel, we need to have access to the line number field. So we convert that info as an operand by custom handling DBG_STOPPOINT in legalize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68329 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-02 18:03:10 +00:00
Sanjiv Gupta
b84d5a476a Params are not being generated as static globals now. The caller passes them onto the callee's stack directly and the callee loads the argvals from its own stack. Clang generated frameindexes validatd by recalculating the stack as if all frameindexes represent 1-byte slots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68327 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-02 17:42:00 +00:00
Chris Lattner
d0dfbe096d fix overflow checks in SmallVector:
"The code was doing "if (End+NumInputs > Capacity) ...". If End is
close to 0xFFFFFFFF and NumInputs is large, it'll overflow, the
condition will come out false, and the vector won't grow to
accommodate the new elements, and the program will crash in memmove."

Patch by Jeffrey Yasskin!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68277 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-02 03:06:26 +00:00
Mikhail Glushenkov
7074875642 Fix build on Linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68269 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-02 01:11:37 +00:00
Owen Anderson
e8a290fefc Reapply r68211, with the miscompilations it caused fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68262 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 23:53:49 +00:00
Bill Wendling
dcafd04163 Make the constants fit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68258 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 22:44:18 +00:00
Devang Patel
9dfa1671fc Clean up pass manager cache after each run.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68254 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 22:34:41 +00:00
Chris Lattner
5867de1243 silence warning in release-asserts build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68253 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 22:14:45 +00:00
Daniel Dunbar
23e97b05da Add llvm::Triple class for abstracting access to target triples.
- The code is silly, I'm just amusing myself. Rewrite to be efficient
   if you like. :)

Also, if you wish to debate the proper names of the triple components
I'm all ears.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68252 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 21:53:23 +00:00
Misha Brukman
a9f4836313 Fixed file header comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68250 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 21:37:19 +00:00
Misha Brukman
6eb28b5237 Added tests for math utility functions; fixed another test's header comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68249 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 21:36:40 +00:00
Misha Brukman
b035842c34 Fixed spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68248 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 21:33:08 +00:00
Devang Patel
8a7eed3267 Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68246 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 21:27:08 +00:00
Chris Lattner
34cb154028 add this to SVN to allow collaborative hacking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68243 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 21:11:04 +00:00
Chris Lattner
dd255a6247 Add range insert method for DenseSet and define DenseMapInfo for chars.
Patch by Kevin Fan!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68239 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 19:50:49 +00:00
Evan Cheng
9f777c64c5 Recognize arm triplets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68229 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 18:54:56 +00:00
Dan Gohman
de551f91d8 Use CHAR_BIT instead of hard-coding 8 in several places where it
is appropriate. This helps visually differentiate host-oriented
calculations from target-oriented calculations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68227 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 18:45:54 +00:00
Ted Kremenek
ef66abeaee Constify method to make VC++ happy. Patch by Brian Diekelman!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68222 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 18:24:22 +00:00
Dan Gohman
77c5b0d7dc Use LLVM type names instead of C type names in comments, to be
less ambiguous and less C-specific.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68219 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 18:10:16 +00:00
Bob Wilson
bf6396bed0 Fix PR3862: Recognize some ARM-specific constraints for immediates in inline
assembly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68218 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 17:58:54 +00:00
Dan Gohman
e63c4a2010 Revert r68172. It caused regressions in
Applications/Burg/burg
  Applications/ClamAV/clamscan
and many other tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68211 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 16:37:47 +00:00
Misha Brukman
687b337a72 Fixed spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68209 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 16:13:29 +00:00
Ted Kremenek
6d7e49bb06 CMake: Have generated Xcode projects also contain the LLVM header files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68206 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 15:40:21 +00:00
Nick Lewycky
d04bc73085 Detect that we're building from a git checkout like we do for cvs and svn.
Based on a patch by Nicolas Trangez on the unladen-swallow mailing list!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68187 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 04:39:25 +00:00
Chris Lattner
c23c1fc559 hopefully fix an apparent build error on windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68175 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 02:03:38 +00:00
Chris Lattner
7d9eb5884c fix a serious regression I introduced in my previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68173 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 01:43:03 +00:00
Owen Anderson
f41fcbb60d Enhance GVN to propagate simple conditionals. This fixes PR3921.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68172 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 01:20:45 +00:00
Misha Brukman
b0426e86af include Makefile.common before using $(BuildMode) to get its definition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68167 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 00:35:00 +00:00
Misha Brukman
d485e885f0 * Fixed spelling of `invertible'
* Simplified if statement


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68163 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 00:15:46 +00:00
Douglas Gregor
41222823db Allow the use of pointers to const within PointerUnion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68159 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-31 23:19:54 +00:00
Chris Lattner
b160f5d36d add a converting operator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68158 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-31 23:09:51 +00:00
Chris Lattner
46e7740a44 reimplement BitcodeReaderValueList in terms of WeakVH instead of making
it be an LLVM IR User object.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68156 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-31 22:55:09 +00:00
Chris Lattner
d3c7b7359d Make the key of ValueRankMap an AssertingVH, so that we die violently
if it dangles.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68150 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-31 22:13:29 +00:00
Chris Lattner
722272df41 Add two new classes: WeakVH and AssertingVH. These are both "ValueHandles",
which are effectively smart pointers to Value*'s.  They are both very light
weight and simple, and react to values being destroyed or being RAUW'd.

WeakVN does a best effort to follow a value around, including through RAUW 
operations and will get nulled out of the value is destroyed.  This is useful
for the eventual "metadata that references a value" work, because it is a
reference to a value that does not show up on its use_* list.

AssertingVH is a pointer that compiles down to a dumb raw pointer when 
assertions are disabled.  When enabled, it emits an assertion if the 
pointed-to value is destroyed while it is still being referenced.  This
is very useful for Maps and other things, and should have caught the recent
bugs in CallGraph and Reassociate, for example.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68149 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-31 22:11:05 +00:00