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

12588 Commits

Author SHA1 Message Date
Chris Lattner
9e35d96cea two changes: 1) make AliasSet hold the list of call sites with an
assertingvh so we get a violent explosion if the pointer dangles.

2) Fix AliasSetTracker::deleteValue to remove call sites with
   by-pointer comparisons instead of by-alias queries.  Using
   findAliasSetForCallSite can cause alias sets to get merged
   when they shouldn't, and can also miss alias sets when the
   call is readonly.

#2 fixes PR6889, which only repros with a .c file :(

llvm-svn: 112452
2010-08-29 18:42:23 +00:00
Dan Gohman
9ea315c5ca Make IVUsers iterative instead of recursive.
This has the side effect of reversing the order of most of
IVUser's results.

llvm-svn: 112442
2010-08-29 16:40:03 +00:00
Dan Gohman
5110488830 Delete an unused declaration.
llvm-svn: 112424
2010-08-29 14:48:15 +00:00
Chris Lattner
875b659115 Stop explicitly scheduling domfrontier before the loop passes,
since none of them use it.  With this, we now only run 
domfrontier (an N^2 analysis) 3 times at clang -O3: once for 
"early" per-function cleanup, once at the start of the
per-function pipeline to support SRoA, and once late because
the EHPrepare class uses it.

EHPrepare needs to stop using it, this is silly and wasteful.

llvm-svn: 112420
2010-08-29 07:05:51 +00:00
Bob Wilson
807d004452 Remove NEON vaddl, vaddw, vsubl, and vsubw intrinsics. Instead, use llvm
IR add/sub operations with one or both operands sign- or zero-extended.
Auto-upgrade the old intrinsics.

llvm-svn: 112416
2010-08-29 05:57:34 +00:00
Chris Lattner
fac07b1dca implement SSAUpdater::RewriteUseAfterInsertions, a helpful form of RewriteUse.
llvm-svn: 112409
2010-08-29 04:54:06 +00:00
Chris Lattner
ecf276b787 remove unions from LLVM IR. They are severely buggy and not
being actively maintained, improved, or extended.

llvm-svn: 112356
2010-08-28 04:09:24 +00:00
Chris Lattner
4b49ada02c remove the ABCD and SSI passes. They don't have any clients that
I'm aware of, aren't maintained, and LVI will be replacing their value.
nlewycky approved this on irc.

llvm-svn: 112355
2010-08-28 03:51:24 +00:00
Owen Anderson
dc4703bcd5 Add a prototype of a new peephole optimizing pass that uses LazyValue info to simplify PHIs and select's.
This pass addresses the missed optimizations from PR2581 and PR4420.

llvm-svn: 112325
2010-08-27 23:31:36 +00:00
Eric Christopher
67801775eb Fix a couple of typos.
Patch by Cameron Esfahani!

llvm-svn: 112297
2010-08-27 21:38:11 +00:00
Dan Gohman
636c57c5de Switch ScalarEvolution's main Value*->SCEV* map from std::map
to DenseMap.

llvm-svn: 112281
2010-08-27 18:55:03 +00:00
Bob Wilson
c01101e76c Add alignment arguments to all the NEON load/store intrinsics.
Update all the tests using those intrinsics and add support for
auto-upgrading bitcode files with the old versions of the intrinsics.

llvm-svn: 112271
2010-08-27 17:13:24 +00:00
Jim Grosbach
2b81a07dc7 Simplify eliminateFrameIndex() interface back down now that PEI doesn't need
to try to re-use scavenged frame index reference registers. rdar://8277890

llvm-svn: 112241
2010-08-26 23:32:16 +00:00
Jim Grosbach
d21756ab1e tidy up a bit. no functional change.
llvm-svn: 112228
2010-08-26 21:56:30 +00:00
Chris Lattner
57e5760947 add m_BitCast for matching a bitcast.
llvm-svn: 112222
2010-08-26 21:35:52 +00:00
Bruno Cardoso Lopes
6150648a64 zap the now unused MVT::getIntVectorWithNumElements
llvm-svn: 112218
2010-08-26 20:53:12 +00:00
Devang Patel
83384fcb5c Fix prototypes.
llvm-svn: 112200
2010-08-26 17:47:45 +00:00
Dan Gohman
8088d5e31d Reapply r112091 and r111922, support for metadata linking, with a
fix: add a flag to MapValue and friends which indicates whether
any module-level mappings are being made. In the common case of
inlining, no module-level mappings are needed, so MapValue doesn't
need to examine non-function-local metadata, which can be very
expensive in the case of a large module with really deep metadata
(e.g. a large C++ program compiled with -g).

This flag is a little awkward; perhaps eventually it can be moved
into the ClonedCodeInfo class.

llvm-svn: 112190
2010-08-26 15:41:53 +00:00
John McCall
33faad67cc SmallVector's growth policies don't like starting from zero capacity.
I think there are good reasons to change this, but in the interests
of short-term stability, make SmallVector<...,0> reserve non-zero
capacity in its constructors.  This means that SmallVector<...,0>
uses more memory than SmallVector<...,1> and should really only be
used (unless/until this workaround is removed) by clients that
care about using SmallVector with an incomplete type.

llvm-svn: 112147
2010-08-26 02:11:48 +00:00
Dan Gohman
c7605a66b7 Rewrite ExtractGV, removing a bunch of stuff that didn't fully work,
and was over-complicated, and replacing it with a simple implementation.

llvm-svn: 112120
2010-08-26 00:22:55 +00:00
John McCall
0c3659857d Provide an explicit specialization of SmallVector at N=0 which does
not require its type argument to be complete if no members are
actually used.

llvm-svn: 112106
2010-08-25 23:11:24 +00:00
Chris Lattner
36e90f42f3 add a specialization for the MVT form of getTypeAction, since it is
trivial.

llvm-svn: 112105
2010-08-25 23:05:45 +00:00
Chris Lattner
ef3055ca05 remove some llvmcontext arguments that are now dead post-refactoring.
llvm-svn: 112104
2010-08-25 23:00:45 +00:00
Chris Lattner
fe7c4ec039 Change handling of illegal vector types to widen when possible instead of
expanding: e.g. <2 x float> -> <4 x float> instead of -> 2 floats.  This
affects two places in the code: handling cross block values and handling
function return and arguments.  Since vectors are already widened by 
legalizetypes, this gives us much better code and unblocks x86-64 abi
and SPU abi work.

For example, this (which is a silly example of a cross-block value):
define <4 x float> @test2(<4 x float> %A) nounwind {
 %B = shufflevector <4 x float> %A, <4 x float> undef, <2 x i32> <i32 0, i32 1>
 %C = fadd <2 x float> %B, %B
  br label %BB
BB:
 %D = fadd <2 x float> %C, %C
 %E = shufflevector <2 x float> %D, <2 x float> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
 ret <4 x float> %E
}

Now compiles into:

_test2:                                 ## @test2
## BB#0:
 addps %xmm0, %xmm0
 addps %xmm0, %xmm0
 ret

previously it compiled into:

_test2:                                 ## @test2
## BB#0:
 addps %xmm0, %xmm0
 pshufd $1, %xmm0, %xmm1
                                        ## kill: XMM0<def> XMM0<kill> XMM0<def>
 insertps $0, %xmm0, %xmm0
 insertps $16, %xmm1, %xmm0
 addps %xmm0, %xmm0
 ret

This implements rdar://8230384

llvm-svn: 112101
2010-08-25 22:49:25 +00:00
Chris Lattner
56bc3bc1af tidy up
llvm-svn: 112099
2010-08-25 22:45:53 +00:00
Eric Christopher
6263463ccb Fix header define to reflect the name of the file.
Patch by Adam Treat!

llvm-svn: 112077
2010-08-25 19:28:39 +00:00
Dan Gohman
6300d80566 lto_codegen_set_gcc_path was removed.
llvm-svn: 112069
2010-08-25 18:37:04 +00:00
Eric Christopher
d0404930db Regenerate.
llvm-svn: 112042
2010-08-25 08:45:06 +00:00
Jim Grosbach
1b102f0b63 Add ARM heuristic for when to allocate a virtual base register for stack
access. rdar://8277890&7352504

llvm-svn: 111968
2010-08-24 21:19:33 +00:00
Kevin Enderby
024b04ad93 First bit of support for the dwarf .loc directive. This patch updates the
needed parsing for the .loc directive and saves the current info from that
into the context.  The next patch will take the current loc info after an
instruction is assembled and save that info into a vector for each section for
use to build the line number tables.  The patch after that will encode the info
from those vectors into the output file as the dwarf line tables.

llvm-svn: 111956
2010-08-24 20:32:42 +00:00
Jim Grosbach
0c3eb7ca50 Move enabling the local stack allocation pass into the target where it belongs.
For now it's still a command line option, but the interface to the generic
code doesn't need to know that.

llvm-svn: 111942
2010-08-24 19:05:43 +00:00
Dan Gohman
30fd721e48 Use MapValue in the Linker instead of having a private function
which does the same thing. This eliminates redundant code and
handles MDNodes better. MDNode linking still doesn't fully
work yet though.

llvm-svn: 111941
2010-08-24 18:50:07 +00:00
Dan Gohman
50869535fc MDNode, MDString, and NamedMDNode are not meant to be subclassed;
make their protected members private. And remove an unnecessary
explicit keyword.

llvm-svn: 111915
2010-08-24 15:34:03 +00:00
Mikhail Glushenkov
8001ceb30e llvmc: Make syntax more consistent.
CompilationGraph and LanguageMap definitions do not use special syntax anymore.

llvm-svn: 111862
2010-08-23 23:21:23 +00:00
Jim Grosbach
33f85d977a Remove the MFI storage of the local allocation block size. It's not needed.
llvm-svn: 111847
2010-08-23 21:29:29 +00:00
Chris Lattner
f0f35c4aea Add a new llvm.x86.int intrinsic, allowing access to the
x86 int and int3 instructions.  Patch by Peter Housel!

llvm-svn: 111831
2010-08-23 19:39:25 +00:00
Mikhail Glushenkov
14e2900dfd llvmc: Properly handle (error) in edge properties.
llvm-svn: 111827
2010-08-23 19:24:08 +00:00
Mikhail Glushenkov
7128448296 Trailing whitespace.
llvm-svn: 111825
2010-08-23 19:23:54 +00:00
Dan Gohman
602bb31883 formatted_tool_output_file::close needs to flush its buffer before
closing the underlying stream.

llvm-svn: 111822
2010-08-23 18:43:24 +00:00
Devang Patel
cf6c6b4038 Handle qualified constants that are directly folded by FE.
PR 7920.

llvm-svn: 111820
2010-08-23 18:25:56 +00:00
Benjamin Kramer
926ba6058b Avoid O(n*m) complexity in StringRef::find_first(_not)_of(StringRef).
- Cache used characters in a bitset to reduce memory overhead to just 32 bytes.
- On my core2 this code is faster except when the checked string was very short
  (smaller than the list of delimiters).

llvm-svn: 111817
2010-08-23 18:16:08 +00:00
Benjamin Kramer
e4c21a06f7 StringRef tweaks:
- Respect find_first_of(char's From parameter instead of silently dropping it.
- Prefer std::string() to std::string("")

llvm-svn: 111814
2010-08-23 17:44:13 +00:00
Michael J. Spencer
18689045ce MC: Add partial x86-64 support to COFF.
llvm-svn: 111728
2010-08-21 05:58:13 +00:00
Bruno Cardoso Lopes
28d9071635 This is the first step towards refactoring the x86 vector shuffle code. The
general idea here is to have a group of x86 target specific nodes which are
going to be selected during lowering and then directly matched in isel.

The commit includes the addition of those specific nodes and a *bunch* of
patterns, and incrementally we're going to switch between them and what we
have right now. Both the patterns and target specific nodes can change as
we move forward with this work.

llvm-svn: 111691
2010-08-20 22:55:05 +00:00
Dan Gohman
31ab7e6b8c CreateTemporaryType doesn't needs its Context argument.
llvm-svn: 111687
2010-08-20 22:39:47 +00:00
Bill Wendling
163660135e Create the new linker type "linker_private_weak_def_auto".
It's similar to "linker_private_weak", but it's known that the address of the
object is not taken. For instance, functions that had an inline definition, but
the compiler decided not to inline it. Note, unlike linker_private and
linker_private_weak, linker_private_weak_def_auto may have only default
visibility.  The symbols are removed by the linker from the final linked image
(executable or dynamic library).

llvm-svn: 111684
2010-08-20 22:05:50 +00:00
Dan Gohman
072e7bdcd4 Introduce a new temporary MDNode concept. Temporary MDNodes are
not part of the IR, are not uniqued, and may be safely RAUW'd.
This replaces a variety of alternate mechanisms for achieving
the same effect.

llvm-svn: 111681
2010-08-20 22:02:26 +00:00
Dan Gohman
63286950ea Reword NamedMDNode's comment.
llvm-svn: 111663
2010-08-20 18:22:57 +00:00
Dan Gohman
730afb791f Delete SlowOperationInformer, which is no longer used.
llvm-svn: 111661
2010-08-20 18:07:37 +00:00
Mikhail Glushenkov
e351eb2c3a Add include guards to Support/Regex.h.
If the omission was intentional, please add a comment.

llvm-svn: 111657
2010-08-20 17:38:44 +00:00