Daniel Dunbar
58bc48c14e
Switch to SmallString::str from SmallString::c_str.
...
- Several FIXMEs due to non-Twinification of IRBuilder.
llvm-svn: 79455
2009-08-19 20:04:03 +00:00
Daniel Dunbar
faea97193c
Add min and max tests.
...
llvm-svn: 79454
2009-08-19 19:58:19 +00:00
Daniel Dunbar
03d4b9eac4
Add SmallString::str (which returns a StringRef); this is more efficient than
...
c_str().
llvm-svn: 79453
2009-08-19 19:57:55 +00:00
Benjamin Kramer
902ccf22b4
Remove SmallString::append_*int* unit tests.
...
llvm-svn: 79451
2009-08-19 19:41:05 +00:00
Daniel Dunbar
339d0cbdd1
Remove SmallString::append_*int* methods; how many copies of int -> str
...
conversion code do we really need?
- S.append_uint(N) can be replaced with 'raw_svector_ostream(S) << N' which is
somewhat slower due to the extra set up cost, but still plenty fast
(especially if the svector set up cost can be amortized).
llvm-svn: 79450
2009-08-19 19:28:18 +00:00
Daniel Dunbar
948f82b8e4
Change ValueSymbolTable to use raw_svector_ostream for string concatenation.
...
llvm-svn: 79449
2009-08-19 19:22:52 +00:00
Daniel Dunbar
dec484abfb
Convert parts of Rewriter to StringRef based API.
...
- Please accept my sincere apologies for the gratuitous elimination of code
duplication, manual string length counting, unnecessary strlen calls, etc.
llvm-svn: 79448
2009-08-19 19:10:30 +00:00
Bill Wendling
6c528bc7ae
Make this test platform neutral.
...
llvm-svn: 79447
2009-08-19 18:51:45 +00:00
Daniel Dunbar
e813cbaa21
Change raw_svector_ostream to reserve the input buffer if necessary, Ted was
...
right.
- This class turns out to be much more convenient to use if we do this; clients
can make sure the buffer is always big enough if they care (since our current
idiom tends to be to use a SmallString<256> for the input to this we should
generally be avoiding an unnecessary malloc).
Also, add a convenience raw_svector_ostream::str method which flushes the buffer
and returns a StringRef for the vector contents.
llvm-svn: 79446
2009-08-19 18:40:58 +00:00
Daniel Dunbar
45e5670ede
Fix typo
...
llvm-svn: 79445
2009-08-19 18:35:54 +00:00
Daniel Dunbar
69c300d5e3
Use raw_svector_ostream for string concatenation.
...
llvm-svn: 79444
2009-08-19 18:30:37 +00:00
Dan Gohman
de255fc8f6
Remove temporary testing code.
...
llvm-svn: 79443
2009-08-19 18:27:08 +00:00
Dan Gohman
915302c605
Make SROA and PredicateSimplifier cope if TargetData is not
...
available. This is very conservative for now.
llvm-svn: 79442
2009-08-19 18:22:18 +00:00
Dan Gohman
5d5bc6d000
Use hasDefinitiveInitializer() instead of testing the same thing
...
by hand, and fix a few places that were using hasInitializer() that
appear to depend on the initializer value.
llvm-svn: 79441
2009-08-19 18:20:44 +00:00
Dan Gohman
81ce842ecf
Canonicalize indices in a constantexpr GEP. If Indices exceed the
...
static extents of the static array type, it causes GlobalOpt and
other passes to be more conservative. This canonicalization also
allows the constant folder to add "inbounds" to GEPs.
llvm-svn: 79440
2009-08-19 18:18:36 +00:00
Dan Gohman
ac33a9061d
Add an x86 peep that narrows TEST instructions to forms that use
...
a smaller encoding. These kinds of patterns are very frequent in
sqlite3, for example.
llvm-svn: 79439
2009-08-19 18:16:17 +00:00
Mike Stump
3bc0a3bf7d
One second thought, I think I want to limit this class to just vtable
...
building activities.
llvm-svn: 79438
2009-08-19 18:10:47 +00:00
Daniel Dunbar
ea579e3d29
Switch Twine::str() to use toVector(), which is now efficient.
...
llvm-svn: 79437
2009-08-19 18:09:47 +00:00
David Goodwin
a7c2dfbca1
Update Cortex-A8 instruction itineraries for integer instructions.
...
llvm-svn: 79436
2009-08-19 18:00:44 +00:00
Owen Anderson
fe7bbc92e1
Add a first stab at describing LLVMContext.
...
llvm-svn: 79435
2009-08-19 17:58:52 +00:00
Daniel Dunbar
b090bf4626
Switch raw_svector_ostream to use the vector as the ostream buffer.
...
- This avoids unnecessary malloc/free overhead in the common case, and
unnecessary copying from the ostream buffer into the output vector.
llvm-svn: 79434
2009-08-19 17:54:29 +00:00
Daniel Dunbar
825e955e40
Add SmallVector::{capacity,set_size}.
...
- These allow clients to make use of the extra elements in the vector which
have already been allocated, without requiring them to be value initialized.
llvm-svn: 79433
2009-08-19 17:48:28 +00:00
Erick Tryzelaar
a5fbf27bc8
BasicBlock::getContext can no longer return a NULL so update the doc.
...
llvm-svn: 79432
2009-08-19 17:40:05 +00:00
Erick Tryzelaar
be86e9fd9a
Update the ocaml docs to work with LLVMContext.
...
llvm-svn: 79431
2009-08-19 17:32:38 +00:00
Erick Tryzelaar
8ce532bfea
Convert the rest of the ocaml types and functions to use context.
...
llvm-svn: 79430
2009-08-19 17:32:24 +00:00
Owen Anderson
6d549d6450
Reapply my less-lock-contention-in-leak-detector patch, now with new files
...
actually added.
llvm-svn: 79429
2009-08-19 17:07:46 +00:00
Bob Wilson
32cd8550ce
Add support for Neon VEXT (vector extract) shuffles.
...
This is derived from a patch by Anton Korzh. I modified it to recognize
the VEXT shuffles during legalization and lower them to a target-specific
DAG node.
llvm-svn: 79428
2009-08-19 17:03:43 +00:00
Daniel Dunbar
5c947db79c
Fix a commento.
...
llvm-svn: 79427
2009-08-19 16:25:53 +00:00
Daniel Dunbar
465de3e2be
Speculatively revert r79375, which may be breaking bootstrap, although in a
...
rather obscure way (the other candidate is r79377).
llvm-svn: 79426
2009-08-19 16:25:25 +00:00
David Goodwin
9b48cd4899
Use the schedule itinerary operand use/def cycle information to adjust dependence edge latency for post-RA scheduling.
...
llvm-svn: 79425
2009-08-19 16:08:58 +00:00
Sandeep Patel
f2c313a1f9
Test commit access with a first act of vanity.
...
llvm-svn: 79424
2009-08-19 15:07:40 +00:00
Mike Stump
b386941208
Cleanup: fold IndirectPrimary into builder.
...
llvm-svn: 79423
2009-08-19 14:40:47 +00:00
Mike Stump
3b09f004db
We don't want to confuse this layout with the BLayout from the builder.
...
llvm-svn: 79422
2009-08-19 14:06:50 +00:00
Mike Stump
6bc4aac878
Update for recent improvements.
...
llvm-svn: 79421
2009-08-19 13:36:31 +00:00
Zhongxing Xu
080fa0522b
Get the Decl from the current ExplodedNode. Eventually the diagnostic client
...
and other core analysis logic will be untied to a particular Decl.
llvm-svn: 79420
2009-08-19 12:50:00 +00:00
Duncan Sands
a21fe10c06
Fix cmake build on non-x86 targets. Patch by
...
Xerxes Rånby.
llvm-svn: 79419
2009-08-19 12:41:52 +00:00
Benjamin Kramer
47f6943a95
Proper MSVC build fix (and remove my hack again). Patch by Yonggang Luo.
...
llvm-svn: 79418
2009-08-19 12:38:51 +00:00
Benjamin Kramer
9d908589d3
Add a hack to unbreak MSVC builds. str(n)casecmp are POSIX functions and aren't available on windows (mingw defines them though).
...
llvm-svn: 79417
2009-08-19 12:16:17 +00:00
Benjamin Kramer
a48651de2d
Update CMakeLists.
...
llvm-svn: 79416
2009-08-19 12:02:15 +00:00
Eli Friedman
1e008c173a
PR4737: Fix a nasty bug in load narrowing with non-power-of-two types.
...
llvm-svn: 79415
2009-08-19 08:46:10 +00:00
Erick Tryzelaar
d552be457a
Add the ocaml binding to LLVMBuildAggregateRet.
...
llvm-svn: 79414
2009-08-19 08:37:00 +00:00
Erick Tryzelaar
fd529d7dc4
Expose some extra functions to llvm-c
...
llvm-svn: 79413
2009-08-19 08:36:49 +00:00
Eli Friedman
5ae98ee006
Make integer promotions work correctly on PIC16 and other platforms
...
where sizeof(short) == sizeof(int). Move UsualArithmeticConversionsType
out of Sema, since it was only there as a historical artifact. Patch by
Enea Zaffanella.
llvm-svn: 79412
2009-08-19 07:44:53 +00:00
Nick Lewycky
cbfe9b195c
Fix up PHI nodes correctly in the presence of unreachable BBs, part two. Also
...
delete a newed pointer, and improve readability a little bit.
llvm-svn: 79411
2009-08-19 07:16:57 +00:00
Erick Tryzelaar
5c35b5cf91
Allow passing around LLVMContext in ocaml.
...
llvm-svn: 79410
2009-08-19 06:40:29 +00:00
Chris Lattner
79cbb75e69
ExuberantAsm is no more.
...
llvm-svn: 79409
2009-08-19 06:36:30 +00:00
Chris Lattner
78b23b0e3f
fix asmstreaming of 2/4 byte elements with pow-2 alignments.
...
llvm-svn: 79408
2009-08-19 06:35:36 +00:00
Nick Lewycky
9ddc52d5b8
Be more careful when modifying PHI nodes. Patch by Andre Tavares.
...
llvm-svn: 79407
2009-08-19 06:24:33 +00:00
Chris Lattner
37b7234a75
switch asmprinter to emit alignments through OutStreamer.
...
llvm-svn: 79406
2009-08-19 06:12:02 +00:00
Chris Lattner
4b7dadb76e
eliminate AsmPrinter::SwitchToSection and just have clients
...
talk to the MCStreamer directly instead.
llvm-svn: 79405
2009-08-19 05:49:37 +00:00