1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

3650 Commits

Author SHA1 Message Date
Oscar Fuentes
a6ffccab95 Build with RTTI and exceptions disabled. Only in GCC for now.
llvm-svn: 116682
2010-10-17 02:26:16 +00:00
Owen Anderson
63f757463c Begin adding static dependence information to passes, which will allow us to
perform initialization without static constructors AND without explicit initialization
by the client.  For the moment, passes are required to initialize both their
(potential) dependencies and any passes they preserve.  I hope to be able to relax
the latter requirement in the future.

llvm-svn: 116334
2010-10-12 19:48:12 +00:00
Dan Gohman
d1789c3cef Delete a redundant check.
llvm-svn: 116280
2010-10-12 00:19:24 +00:00
Dan Gohman
3b55a1294e More SmallVectorImpls.
llvm-svn: 116279
2010-10-12 00:15:27 +00:00
Dan Gohman
cca2c82199 Shrink a SmallVector with a known maximum size.
llvm-svn: 116278
2010-10-12 00:13:43 +00:00
Dan Gohman
c49d367fb9 Constify.
llvm-svn: 116277
2010-10-12 00:12:29 +00:00
Dan Gohman
dbb5a62aba Use SmallVectorImpl in a bunch of places.
llvm-svn: 116276
2010-10-12 00:11:18 +00:00
Dan Gohman
3d1fa9f524 Fix the pass manager's search order for immutable passes, and make it
stop searching when it has found a match.

llvm-svn: 116262
2010-10-11 23:19:01 +00:00
Owen Anderson
69cbf2e8b7 Now with fewer extraneous semicolons!
llvm-svn: 115996
2010-10-07 22:25:06 +00:00
Owen Anderson
c49384836e Add initialization routines for VMCore.
llvm-svn: 115963
2010-10-07 19:51:21 +00:00
Owen Anderson
4a9acfa34a Next step on the getting-rid-of-static-ctors train: begin adding per-library
initialization functions that initialize the set of passes implemented in
that library.  Add C bindings for these functions as well.

llvm-svn: 115927
2010-10-07 17:55:47 +00:00
Owen Anderson
38e84dd7ea Another step towards getting rid of static ctors for pass registration: have INITIALIZE_PASS AND INITIALIZE_AG_PASS
expand to an initializeMyPass() function (in additional to the extant static ctors).  Eventually, these will be called
from a big InitializeAllPasses() function, and the PassInfo's they create (which would be leaked if this code were used
at the moment) will be handed off to a PassRegistry for ownership.

llvm-svn: 115703
2010-10-05 22:58:16 +00:00
Bill Wendling
b94ade249a The pshufw instruction came about in MMX2 when SSE was introduced. Don't place
it in with the SSSE3 instructions.

Steward! Could you place this chair by the aft sun deck? I'm trying to get away
from the Astors. They are such boors!

llvm-svn: 115552
2010-10-04 20:24:01 +00:00
Bill Wendling
07640330f3 Cleanup. Get rid of extraneous variable.
llvm-svn: 115453
2010-10-03 00:46:06 +00:00
Dale Johannesen
f97d3fcccd Attempt to outwit overly smart compiler.
llvm-svn: 115251
2010-10-01 00:21:24 +00:00
Dale Johannesen
c14a1eda84 Massive rewrite of MMX:
The x86_mmx type is used for MMX intrinsics, parameters and
return values where these use MMX registers, and is also
supported in load, store, and bitcast.

Only the above operations generate MMX instructions, and optimizations
do not operate on or produce MMX intrinsics. 

MMX-sized vectors <2 x i32> etc. are lowered to XMM or split into
smaller pieces.  Optimizations may occur on these forms and the
result casted back to x86_mmx, provided the result feeds into a
previous existing x86_mmx operation.

The point of all this is prevent optimizations from introducing
MMX operations, which is unsafe due to the EMMS problem.

llvm-svn: 115243
2010-09-30 23:57:10 +00:00
Talin
ee60bd194c Allow llvm.gcroot to work with non-pointer allocas.
llvm-svn: 115198
2010-09-30 20:23:47 +00:00
Dan Gohman
898f765c13 When an MDNode changes to become identical to another MDNode,
delete the MDNode that changed, rather than the other MDNode.
This is less work, because it doesn't require the changed node
to be re-inserted into the uniquing map and it doesn't require
the is-function-local flag to be recomputed. Also, it avoids
trouble when the existing node is part of a complicated
data structure.

llvm-svn: 114996
2010-09-28 22:07:19 +00:00
Dan Gohman
e6de2f7a66 Scope a varible inside an if statement, to make it clear that
it's not used afterwards.

llvm-svn: 114986
2010-09-28 21:02:55 +00:00
Dan Gohman
a9f0ee47d1 Make this code 65-bit clean.
llvm-svn: 114828
2010-09-27 15:15:44 +00:00
Che-Liang Chiou
0eaf890a31 Add ret instruction to PTX backend
llvm-svn: 114788
2010-09-25 07:46:17 +00:00
Owen Anderson
c71f165f28 Allow the PassRegistry mutex to be lazily initialized, and clean up the global namespace at the same time.
llvm-svn: 114131
2010-09-16 23:44:50 +00:00
Owen Anderson
56bc6a9391 Do not expose the locking for the PassRegistry in the header. Be careful to
synchronize any method that might lazily initialize the pImpl.

llvm-svn: 114130
2010-09-16 23:32:35 +00:00
Owen Anderson
7321210916 Fix a threaded LLVM bug due the need for operator= on reference counted AttrListImpl's. It might
be possible to implement this very carefully to allow a lock-free implementation while still
avoiding illegal interleavings, but I haven't been able to figure one out.

llvm-svn: 114046
2010-09-16 00:27:35 +00:00
Owen Anderson
445e4de610 Since PassRegistry is currently a shared global object, it needs locking. While it might intuitively seem
that all the setup of this class currently happens at static initialization time, this misses the fact
that some later events can cause mutation of the PassRegistrationListeners list, and thus cause race issues.

llvm-svn: 114036
2010-09-15 23:03:33 +00:00
Dale Johannesen
c7739ca945 Add x86MMX a few more places.
llvm-svn: 113914
2010-09-15 00:52:23 +00:00
Dan Gohman
ebbc4df924 Remove the experimental AliasAnalysis::getDependency interface, which
isn't a good level of abstraction for memdep. Instead, generalize
AliasAnalysis::alias and related interfaces with a new Location
class for describing a memory location. For now, this is the same
Pointer and Size as before, plus an additional field for a TBAA tag.

Also, introduce a fixed MD_tbaa metadata tag kind.

llvm-svn: 113858
2010-09-14 21:25:10 +00:00
Dan Gohman
2a6b987773 When a function-local value with function-local metadata uses gets RAUWed with a
non-function-local value, it may result in the metadata no longer needing to be
function-local. Check for this condition, and clear the isFunctionLocal flag, if
it's still in the uniquing map, since any node in the uniquing map needs to have
an accurate function-local flag.

Also, add an assert to help catch problematic cases.

llvm-svn: 113828
2010-09-14 01:37:57 +00:00
Owen Anderson
ae195f79a4 Minimize #includes in a top-level header.
llvm-svn: 113772
2010-09-13 18:47:42 +00:00
Eric Christopher
591bd5b692 Silence some constructor ordering warnings.
llvm-svn: 113767
2010-09-13 18:25:05 +00:00
John Thompson
ae3a86d6de Added skeleton for inline asm multiple alternative constraint support.
llvm-svn: 113766
2010-09-13 18:15:37 +00:00
Dale Johannesen
b3df2ff13d Add X86 MMX type to bitcode and Type.
(The Ada bindings probably need it too, but all the
obvious places to change say "do not edit this file".)

llvm-svn: 113618
2010-09-10 20:55:01 +00:00
Bill Wendling
51019d366e Use StringRef which performs the "early exit" when compared against a constant
string.

llvm-svn: 113615
2010-09-10 20:42:26 +00:00
Bill Wendling
b3818f7584 Early exit with simple checks.
llvm-svn: 113603
2010-09-10 19:06:58 +00:00
Bill Wendling
f6ee5c5231 Auto-upgrade the magic ".llvm.eh.catch.all.value" global to
"llvm.eh.catch.all.value". Only the name needs to be changed.

llvm-svn: 113600
2010-09-10 18:51:56 +00:00
Dan Gohman
3c81335a10 MDNodes are not Constants.
llvm-svn: 113539
2010-09-09 20:54:24 +00:00
Dan Gohman
2a0bee3d07 Print invalid metadata references as <badref>, for consistency with
regular value references.

llvm-svn: 113538
2010-09-09 20:53:58 +00:00
Owen Anderson
c7dd9d3840 Clarify the ownership model of LLVMContext and Module. Namely, contexts own
modules are instantiated in them.  If the context is deleted, all of its owned
modules are also deleted.

llvm-svn: 113374
2010-09-08 18:03:32 +00:00
Owen Anderson
94ae132fc8 Fix PR7972, in which the PassRegistry was being leaked. As part of this,
switch to using a ManagedStatic for the global PassRegistry instead of a
ManagedCleanup, and fix a destruction ordering bug this exposed.

llvm-svn: 113283
2010-09-07 20:48:10 +00:00
Bill Wendling
9bb7ac566f Add an MVT::x86mmx type. It will take the place of all current MMX vector types.
llvm-svn: 113261
2010-09-07 20:03:56 +00:00
Owen Anderson
e15120e561 Clean up some of the PassRegistry implementation, and pImpl-ize it to reduce #include clutter
and exposing internal details.

llvm-svn: 113252
2010-09-07 19:16:25 +00:00
Bob Wilson
24fa0b33b1 Replace NEON vabdl, vaba, and vabal intrinsics with combinations of the
vabd intrinsic and add and/or zext operations.  In the case of vaba, this
also avoids the need for a DAG combine pattern to combine vabd with add.
Update tests.  Auto-upgrade the old intrinsics.

llvm-svn: 112941
2010-09-03 01:35:08 +00:00
Chris Lattner
0f0c0967e4 lets get crazy and name the header file the exact class name,
not a scrunched version of it.

llvm-svn: 112904
2010-09-02 23:09:42 +00:00
Chris Lattner
fad92eae5f reapply 112894:
Remove #uses comments from functions: they we're padded out to column 50
and were potentially confusing for externally visible functions.

going further, remove the "<i8**> [#uses=3]" comments entirely. They
add a lot of noise, confuse people about what the IR is, and don't add 
any particular value.  When the types are long it makes it really really
hard to read IR.

If someone is interested in this sort of thing, the right way to do this
is to implement an AsmAnnotationWriter that produces the same output, and
add a flag to llvm-dis (only) to produce this output.

llvm-svn: 112899
2010-09-02 22:52:10 +00:00
Chris Lattner
fb0dc5c3ba revert patch, need to update clang tests too
llvm-svn: 112895
2010-09-02 22:42:07 +00:00
Chris Lattner
ae715d8b70 Remove #uses comments from functions: they we're padded out to column 50
and were potentially confusing for externally visible functions.

going further, remove the "<i8**> [#uses=3]" comments entirely. They
add a lot of noise, confuse people about what the IR is, and don't add 
any particular value.  When the types are long it makes it really really
hard to read IR.

If someone is interested in this sort of thing, the right way to do this
is to implement an AsmAnnotationWriter that produces the same output, and
add a flag to llvm-dis (only) to produce this output.

llvm-svn: 112894
2010-09-02 22:41:24 +00:00
Duncan Sands
6b382d04f4 Print the number of uses of a function in the .ll since it can be informative
and there seems to be no reason not to.

llvm-svn: 112812
2010-09-02 08:52:23 +00:00
Bob Wilson
3348d2eb50 Remove NEON vmull, vmlal, and vmlsl intrinsics, replacing them with multiply,
add, and subtract operations with zero-extended or sign-extended vectors.
Update tests.  Add auto-upgrade support for the old intrinsics.

llvm-svn: 112773
2010-09-01 23:50:19 +00:00
Dan Gohman
6909a51674 Add comments explaining why it's not necessary to include the
is-function-local flag in metadata uniquing bits.

llvm-svn: 112528
2010-08-30 21:18:41 +00:00
Bob Wilson
826a677f94 Remove NEON vmovn intrinsic, replacing it with vector truncate operations.
Auto-upgrade the old intrinsic and update tests.

llvm-svn: 112507
2010-08-30 20:02:30 +00:00