Owen Anderson
9df206d02d
Push LLVMContexts through the IntegerType APIs.
...
llvm-svn: 78948
2009-08-13 21:58:54 +00:00
Daniel Dunbar
3a5a25d5d5
Convert APint::{fromString,APInt,getBitsNeeded} to use StringRef.
...
- Patch by Erick Tryzelaar, with some edits (and a bug fix) from me.
llvm-svn: 78885
2009-08-13 02:33:34 +00:00
Benjamin Kramer
a191584fca
Fix unit test on FreeBSD. We need to make sure there is enough space to save the pointer even if the memory returned from malloc was already aligned.
...
llvm-svn: 78805
2009-08-12 12:31:02 +00:00
Daniel Dunbar
f4e8af6ecc
StringRef: Add find(char) and find(StringRef).
...
Also, regroup functions.
llvm-svn: 78712
2009-08-11 20:47:15 +00:00
Jeffrey Yasskin
20848835bf
To catch bugs like the one fixed in
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=78127 , I'm changing the
ExecutionEngine's global mappings to hold AssertingVH<const GlobalValue>. That
way, if unregistering a mapping fails to actually unregister it, we'll get an
assert. Running the jit nightly tests didn't uncover any actual instances of
the problem.
This also uncovered the fact that AssertingVH<const X> didn't work, so I fixed
that too.
llvm-svn: 78400
2009-08-07 19:54:29 +00:00
Owen Anderson
b904acbec0
Update unit test.
...
llvm-svn: 78260
2009-08-05 23:28:57 +00:00
Jeffrey Yasskin
61af405985
Make ExecutionEngine::updateGlobalMapping(GV, NULL) properly remove GV's old
...
address from the reverse mapping, and add a test that this works now.
llvm-svn: 78127
2009-08-04 23:53:16 +00:00
Benjamin Kramer
44b1be9788
Remove now empty unit test directory.
...
llvm-svn: 77790
2009-08-01 19:07:29 +00:00
Chris Lattner
c0be87a893
daniel says it's fine to nuke this.
...
llvm-svn: 77789
2009-08-01 18:38:21 +00:00
Chris Lattner
4efd0874b1
update for new api
...
llvm-svn: 77788
2009-08-01 18:35:49 +00:00
Owen Anderson
f86b0eb2a0
Fix unit tests.
...
llvm-svn: 77734
2009-07-31 21:38:10 +00:00
Benjamin Kramer
3f60efddfa
Update unittest for LLVM API change.
...
llvm-svn: 77730
2009-07-31 20:56:31 +00:00
Owen Anderson
1dc40e205b
Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
...
metadata related, which I'm waiting on to avoid conflicting with Devang.
llvm-svn: 77721
2009-07-31 20:28:14 +00:00
Benjamin Kramer
95715c96f3
Adjust unit test for the MCSection changes.
...
llvm-svn: 77714
2009-07-31 19:12:33 +00:00
Owen Anderson
93ccaf5c60
Move more code back to 2.5 APIs.
...
llvm-svn: 77635
2009-07-30 23:03:37 +00:00
Daniel Dunbar
edd0313a36
Twine: Use raw_ostream::write_hex, remove unused itohexstr method.
...
llvm-svn: 77617
2009-07-30 18:30:19 +00:00
Benjamin Kramer
85fa67c3c5
fix a unitialized pointer in NamedMDNode (and reenable unittest)
...
llvm-svn: 77597
2009-07-30 15:35:55 +00:00
Daniel Dunbar
4d8b1776b4
Twine: Provide [u]int{32,64} conversions via implicit constructors instead of
...
explicitly.
llvm-svn: 77576
2009-07-30 03:47:15 +00:00
Daniel Dunbar
9ac19401cd
Disable the NamedMDNodeTest, it is failing everywhere.
...
llvm-svn: 77569
2009-07-30 02:08:27 +00:00
Devang Patel
fc9ef39a7e
Add NamedMDNode test.
...
llvm-svn: 77550
2009-07-30 00:03:41 +00:00
Owen Anderson
881d928f9b
Move types back to the 2.5 API.
...
llvm-svn: 77516
2009-07-29 22:17:13 +00:00
Benjamin Kramer
2464dfa8df
Update unittest for LLVM API change.
...
llvm-svn: 77496
2009-07-29 19:18:13 +00:00
Benjamin Kramer
276a105601
fix unittest on platforms with unsigned chars (e.g. linux-ppc)
...
llvm-svn: 77471
2009-07-29 16:48:32 +00:00
Daniel Dunbar
d13fcdaae5
Twines: Support numeric conversion directly (uitostr, etc).
...
- 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.
llvm-svn: 77445
2009-07-29 07:08:44 +00:00
Benjamin Kramer
bb77e8e124
fix unittest
...
llvm-svn: 77375
2009-07-28 22:03:24 +00:00
Benjamin Kramer
6e3704568e
Remove trailing slashes from include paths. Some versions of mingw don't like them.
...
llvm-svn: 77188
2009-07-27 09:39:18 +00:00
Daniel Dunbar
5a9d56ab90
Update Triple to use StringRef/Twine based APIs.
...
- This is now shorter, simpler, safer, and more efficient, what a deal.
llvm-svn: 77119
2009-07-26 03:31:47 +00:00
Daniel Dunbar
b97f9fc3f5
Add StringRef::{slice, split}, two convenient string operations which are simple
...
and efficient on a StringRef.
llvm-svn: 77117
2009-07-26 03:18:15 +00:00
Reid Kleckner
b159a2bad6
Added a test and fixed a bug in BumpPtrAllocator relating to large alignment
...
values. Hopefully this fixes PR4622.
llvm-svn: 77088
2009-07-25 21:26:02 +00:00
Daniel Dunbar
9f50ab3c49
Finish migrating VMCore to StringRef/Twine based APIs.
...
llvm-svn: 77051
2009-07-25 06:02:13 +00:00
Jeffrey Yasskin
da42799098
Add a missing ilist_node.h #include to SparseBitVector, and add a very short
...
test for it. The test is by no means complete, but it tests the problem I was
fixing.
llvm-svn: 77025
2009-07-25 00:33:57 +00:00
Owen Anderson
cc33e89571
Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
...
llvm-svn: 77011
2009-07-24 23:12:02 +00:00
Daniel Dunbar
6f78d7ac27
Add Twine ADT.
...
- Not currently used.
llvm-svn: 76956
2009-07-24 07:04:27 +00:00
Reid Kleckner
74ff34ab48
Fixing unittests on 32-bit Darwin, using 0x...ULL instead of 0x...U .
...
llvm-svn: 76904
2009-07-23 22:27:18 +00:00
Reid Kleckner
3f197c850d
Re-committing r76828 with the JIT memory manager changes now that the build
...
bots like the BumpPtrAllocator changes.
llvm-svn: 76902
2009-07-23 21:46:56 +00:00
Reid Kleckner
5a7816053e
Re-committing changes from r76825 to BumpPtrAllocator with a fix and tests for
...
an off-by-one error.
llvm-svn: 76891
2009-07-23 18:34:13 +00:00
Daniel Dunbar
b5adc13728
Convert StringMap to using StringRef for its APIs.
...
- Yay for '-'s and simplifications!
- I kept StringMap::GetOrCreateValue for compatibility purposes, this can
eventually go away. Likewise the StringMapEntry Create functions still follow
the old style.
- NIFC.
llvm-svn: 76888
2009-07-23 18:17:34 +00:00
Devang Patel
45ce5c2ac1
MDString
...
- Rename member function size(). New name is length().
- Store string beginning and length. Earlier it used to store string end.
llvm-svn: 76841
2009-07-23 02:00:51 +00:00
Reid Kleckner
6f9bf7f028
Reverting r76825 and r76828, since they caused clang runtime errors and some build failure involving memset.
...
llvm-svn: 76838
2009-07-23 01:40:54 +00:00
Devang Patel
6b2162686a
Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into METADATA_BLOCK in bitcode file.
...
llvm-svn: 76834
2009-07-23 01:07:34 +00:00
Reid Kleckner
b500f07edf
Make the JIT code emitter properly retry and ask for more memory when it runs
...
out of memory, and also make the default memory manager allocate more memory
when it runs out.
Also, switch function stubs and global data over to using the BumpPtrAllocator.
This makes it so the JIT no longer mmaps (or the equivalent on Windows) 16 MB
of memory, and instead allocates in 512K slabs. I suspect this size could go
lower, especially on embedded platforms, now that more slabs can be allocated.
llvm-svn: 76828
2009-07-23 00:49:59 +00:00
Reid Kleckner
4c892c05ec
Parameterize the BumpPtrAllocator over a slab allocator. It defaults to using
...
malloc, so there should be no functional changes to other code.
These changes are necessary since I have plans to use this allocator in the JIT
memory manager, and it needs a special allocator.
I also added some tests which helped me pinpoint some bugs.
llvm-svn: 76825
2009-07-23 00:30:41 +00:00
Daniel Dunbar
6bbe0f1151
Support writing a StringRef to a raw_ostream directly.
...
llvm-svn: 76754
2009-07-22 17:13:20 +00:00
Ryan Flynn
a78abdc35e
cast signed APInt constructor params to uint64_t to suppress signedness warning
...
llvm-svn: 76744
2009-07-22 16:17:36 +00:00
Daniel Dunbar
30c92a0aee
Add StringRef::{substr, startswith}.
...
llvm-svn: 76559
2009-07-21 09:18:49 +00:00
Daniel Dunbar
8ab30670cc
Add StringRef class, with fixes.
...
llvm-svn: 76543
2009-07-21 07:28:51 +00:00
Torok Edwin
4f4888bcf0
unbreak unit-tests on gcc-4.4.
...
llvm-svn: 76542
2009-07-21 07:09:05 +00:00
Nick Lewycky
3b459607de
Fix ConstantRange::unionWith. Also make it work a little hard in some cases to
...
return the smallest union of two ranges instead of just any range that happens
to contain the union.
llvm-svn: 76360
2009-07-19 03:44:35 +00:00
Nick Lewycky
ec10fcbd04
Replace intersectWith with maximalIntersectWith. The latter guarantees that
...
all values belonging to the intersection will belong to the resulting range.
The former was inconsistent about that point (either way is fine, just pick
one.) This is part of PR4545.
llvm-svn: 76289
2009-07-18 06:34:42 +00:00
Daniel Dunbar
cf0c706052
Unbreak unittests build.
...
- Reid, please check, I'm not sure if this is what was intended.
llvm-svn: 76286
2009-07-18 06:08:49 +00:00