1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 04:52:54 +02:00
Commit Graph

681 Commits

Author SHA1 Message Date
Dan Gohman
50b57a3cc7 Change TargetFolder's TD member from a reference to a
pointer, now that ConstantFoldConstantExpression can
accept a null TargetData pointer.

llvm-svn: 72744
2009-06-03 00:13:48 +00:00
Dan Gohman
76f405a65f Fix the name of the function in this comment.
llvm-svn: 72666
2009-05-31 16:18:03 +00:00
Bruno Cardoso Lopes
d9c92b3825 Add AMD64 elf machine type
llvm-svn: 72635
2009-05-30 21:05:47 +00:00
Dan Gohman
17d7639520 Add an accessor method to return the insertion point.
llvm-svn: 72184
2009-05-20 21:45:41 +00:00
Owen Anderson
4f6709ebd6 Have llvm_start_multithreaded return a bool indicating whether multithreaded
initialization succeeded or not, rather than just asserting.

llvm-svn: 72182
2009-05-20 21:03:06 +00:00
Owen Anderson
47460293cf Add llvm_start_multithreaded(), which starts up the LLVM internals in thread-safe mode. Provide double-check locking
initialization of ManagedStatic's when running in thread-safe mode.

llvm-svn: 72151
2009-05-20 00:39:20 +00:00
Owen Anderson
a5fc80c2c6 Back out the thread-safe ManagedStatic for now. Too many people have too many problems with it for the moment.
llvm-svn: 71931
2009-05-16 07:20:52 +00:00
Owen Anderson
f77567f7ac Factor out some common code, fix more typoes, and add a memory fence that might be needed.
llvm-svn: 71853
2009-05-15 08:22:07 +00:00
Owen Anderson
c69f0d9a11 Fix an unfortunate typo.
llvm-svn: 71852
2009-05-15 08:07:23 +00:00
Owen Anderson
7ded7b9a62 Now with working on Leopard!
llvm-svn: 71819
2009-05-15 00:01:40 +00:00
Owen Anderson
3451ee22e8 Make ManagedStatic threadsafe by using atomic operations.
llvm-svn: 71796
2009-05-14 21:26:50 +00:00
Dale Johannesen
18cc7c12b7 Add an int64_t variant of abs, for host environments
without one.  Use it where we were using abs on
int64_t objects.
(I strongly suspect the casts to unsigned in the
fragments in LoopStrengthReduce are not doing whatever
the original intent was, but the obvious change to
uint64_t doesn't work.  Maybe later.)

llvm-svn: 71612
2009-05-13 00:24:22 +00:00
Mike Stump
6ee41e64c8 Add DW_AT_APPLE_isa and DW_AT_APPLE_block. Radar 6867696
llvm-svn: 71479
2009-05-11 21:58:01 +00:00
Dan Gohman
3817464c23 Add simplify_type specializations to allow WeakVH, AssertingVH, and
CallbackVH to participate in dyn_cast, isa, etc. without needing
an explicit conversion.

llvm-svn: 71087
2009-05-06 17:12:48 +00:00
Evan Cheng
0d781df8dc Quotes should be printed before private prefix; some code clean up.
llvm-svn: 71032
2009-05-05 22:50:29 +00:00
Dan Gohman
6d1ffab07b Add an explicit keyword.
llvm-svn: 71022
2009-05-05 21:23:20 +00:00
Dan Gohman
dc96a23780 Apply Jeffrey Yasskin's CallbackVH patch, with minor tweaks from me
to make the copy constructor and destructor protected, and corresponding
adjustments to the unittests.

llvm-svn: 70644
2009-05-02 21:10:48 +00:00
Dan Gohman
8b692f87a7 Include <limits.h> to get the definition of CHAR_BIT.
llvm-svn: 70643
2009-05-02 21:03:21 +00:00
Chris Lattner
b7947ae607 Drop the default assumption about alignment down to 2 bits from 3. This apparently
helps some problems on win32 platforms (PR4119)

llvm-svn: 70603
2009-05-01 23:48:33 +00:00
Jeffrey Yasskin
7263dc71e2 Add a mention of TypeBuilder to the programmer's manual, and clean up the class
comment a bit.

llvm-svn: 70515
2009-04-30 22:33:41 +00:00
Torok Edwin
1400b41bf1 Make dataflow iteration possible on Value*, not only on User*: df_ext_iterator<Value*, SmallPtrSet<const Value*, 16> >
llvm-svn: 70496
2009-04-30 17:09:22 +00:00
Bill Wendling
3f4c6171d1 Add support for a character after a command line option. Like '-Os'.
llvm-svn: 70437
2009-04-29 23:26:16 +00:00
Jeffrey Yasskin
114afdef8b Add tests for WeakVH and AssertingVH. These pointed out that the overloads for
the comparison operators were not only unnecessary in the presence of the
implicit conversion; they caused ambiguous overload errors. So I deleted them.

llvm-svn: 70243
2009-04-27 20:32:07 +00:00
Chris Lattner
46c25c1285 Add a new TypeBuilder helper class, which eases making LLVM IR types.
Patch by Jeffrey Yasskin!

llvm-svn: 70084
2009-04-25 22:14:04 +00:00
Owen Anderson
1cf271e1d8 Add caching of predecessor counts as well as predecessors themselves.
llvm-svn: 69791
2009-04-22 08:46:33 +00:00
Douglas Gregor
bdeba00c46 Make all raw_ostreams support the tell() function.
llvm-svn: 69583
2009-04-20 07:34:17 +00:00
Nick Lewycky
3e04213f1f Fix missing text in doxygen documentation.
llvm-svn: 69529
2009-04-19 18:20:21 +00:00
Nick Lewycky
e5b361c13a Cleanup. Remove redundant llvm:: , we don't need them since we're inside
namespace llvm already.

llvm-svn: 68774
2009-04-10 06:54:06 +00:00
Nick Lewycky
0f4dbe06e7 Add utility function to IRBuilder that takes the difference between two
pointers, taking into account the size of the pointed-to object.
Patch by Jeffrey Yasskin!

llvm-svn: 68768
2009-04-10 05:30:48 +00:00
Chris Lattner
fc47fb0629 Remove AllowInverse: it leaks memory and is not the right
abstraction for CommandLine.

llvm-svn: 68588
2009-04-08 03:43:51 +00:00
Mikhail Glushenkov
80402f1dc8 Add segment flag bits to ELF.h.
llvm-svn: 68438
2009-04-05 09:07:08 +00:00
Daniel Dunbar
7c98197368 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.

llvm-svn: 68396
2009-04-03 18:43:17 +00:00
Chris Lattner
108305e9d3 Work around an apparent GCC miscompilation by specializing different,
this fixes a regression on some compilers from r68147.

llvm-svn: 68356
2009-04-03 00:26:01 +00:00
Chris Lattner
67af801e8b add missing *
llvm-svn: 68350
2009-04-02 23:53:03 +00:00
Dan Gohman
770f4158e5 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.

llvm-svn: 68227
2009-04-01 18:45:54 +00:00
Misha Brukman
ea884c9e5e * Fixed spelling of `invertible'
* Simplified if statement

llvm-svn: 68163
2009-04-01 00:15:46 +00:00
Chris Lattner
2dd3b48ac1 add a converting operator
llvm-svn: 68158
2009-03-31 23:09:51 +00:00
Chris Lattner
939313c44a 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.

llvm-svn: 68149
2009-03-31 22:11:05 +00:00
Chris Lattner
982ca20570 teach PointerLikeTypeTraits that all pointers to pointers may only be 4-byte aligned.
llvm-svn: 68147
2009-03-31 21:28:39 +00:00
Bill Wendling
668e03b2b8 Constify check. This fixes PR3900.
llvm-svn: 68013
2009-03-29 20:08:56 +00:00
Chris Lattner
afd5e460c3 Add a PointerLikeTypeTraits specialization for uintptr_t
llvm-svn: 67985
2009-03-29 06:00:21 +00:00
Chris Lattner
9dc97aa7bf Replace the PointerLikeTypeTraits::getNumLowBitsAvailable
function with a new NumLowBitsAvailable enum, which makes the
value available as an integer constant expression.

Add PointerLikeTypeTraits specializations for Instruction* and
Use** since they are only guaranteed 4-byte aligned.

Enhance PointerIntPair to know about (and enforce) the alignment
specified by PointerLikeTypeTraits.  This should allow things 
like PointerIntPair<PointerIntPair<void*, 1,bool>, 1, bool> 
because the inner one knows that 2 low bits are free.

llvm-svn: 67979
2009-03-29 04:32:37 +00:00
Chris Lattner
a78775615b rename PointerLikeTypeInto to PointerLikeTypeTraits, add trait for
# low bits free, and move to its own header.

llvm-svn: 67973
2009-03-29 00:39:30 +00:00
Chris Lattner
601a4d8c70 move a large method out of line.
llvm-svn: 67892
2009-03-28 02:08:47 +00:00
Mike Stump
f25de0da23 Allow invertable -xno- style optins as well.
llvm-svn: 67862
2009-03-27 20:12:55 +00:00
Chris Lattner
4fe63a51eb add method to access a template argument.
llvm-svn: 67458
2009-03-22 00:18:18 +00:00
Sebastian Redl
e4e5b1c2f2 Fix the Win32 VS2008 build:
- Make type declarations match the struct/class keyword of the definition.
 - Move AddSignalHandler into the namespace where it belongs.
 - Correctly call functions from template base.
 - Some other small changes.
With this patch, LLVM and Clang should build properly and with far less noise under VS2008.

llvm-svn: 67347
2009-03-19 23:26:52 +00:00
Daniel Dunbar
7c9dba0950 Add BUILTIN_EXPECT Support/Compiler macro.
- Use for exceptional buffer conditions in raw_ostream:write to shave
   off a cycle or two.

 - Please rename if you have a better one.

llvm-svn: 67103
2009-03-17 21:15:18 +00:00
Daniel Dunbar
e9d33b08eb raw_ostream: Return '*this' explicitly (instead of implicitly via
write) to expose more alias information.

llvm-svn: 67070
2009-03-17 01:53:36 +00:00
Daniel Dunbar
b04be1838d raw_ostream: Rework implementation of unbuffered streams so outputting
a single character requires only one branch to follow slow path.
 - Never use a buffer when writing on an unbuffered stream.

 - Move default buffer size to header.

llvm-svn: 67066
2009-03-17 01:13:35 +00:00