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

53023 Commits

Author SHA1 Message Date
Andrew Trick
1caa19b613 misched: Use SparseSet for VRegDegs for constant time clear().
llvm-svn: 151205
2012-02-22 21:59:00 +00:00
Hal Finkel
cfc8c850f6 Allow the use of an alternate symbol for calculating a function's size.
The standard function epilog includes a .size directive, but ppc64 uses
an alternate local symbol to tag the actual start of each function.

Until recently, binutils accepted the .size directive as:
 .size	test1, .Ltmp0-test1
however, using this directive with recent binutils will result in the error:
 .size expression for XXX does not evaluate to a constant
so we must use the label which actually tags the start of the function.

llvm-svn: 151200
2012-02-22 21:11:47 +00:00
Michael J. Spencer
24f6d49962 Properly emit _fltused with FastISel. Refactor to share code with SDAG.
Patch by Joe Groff!

llvm-svn: 151183
2012-02-22 19:06:13 +00:00
Andrew Trick
8827848788 Comment from code review
llvm-svn: 151178
2012-02-22 18:34:49 +00:00
Chad Rosier
3703a1917a Remove extra semi-colons.
llvm-svn: 151169
2012-02-22 17:25:00 +00:00
Jakob Stoklund Olesen
c68efb4311 80 col.
llvm-svn: 151167
2012-02-22 16:50:46 +00:00
Sirish Pande
5df82d1745 Efficient pattern for store truncate. Patch by Evandro Menezes.
llvm-svn: 151166
2012-02-22 16:45:10 +00:00
David Greene
7cabd2e787 Add Foreach Loop
Add some data structures to represent for loops.  These will be
referenced during object processing to do any needed iteration and
instantiation.

Add foreach keyword support to the lexer.

Add a mode to indicate that we're parsing a foreach loop.  This allows
the value parser to early-out when processing the foreach value list.

Add a routine to parse foreach iteration declarations.  This is
separate from ParseDeclaration because the type of the named value
(the iterator) doesn't match the type of the initializer value (the
value list).  It also needs to add two values to the foreach record:
the iterator and the value list.

Add parsing support for foreach.

Add the code to process foreach loops and create defs based
on iterator values.

Allow foreach loops to be matched at the top level.

When parsing an IDValue check if it is a foreach loop iterator for one
of the active loops.  If so, return a VarInit for it.

Add Emacs keyword support for foreach.

Add VIM keyword support for foreach.

Add tests to check foreach operation.

Add TableGen documentation for foreach.

Support foreach with multiple objects.

Support non-braced foreach body with one object.

Do not require types for the foreach declaration.  Assume the iterator
type from the iteration list element type.

llvm-svn: 151164
2012-02-22 16:09:41 +00:00
Benjamin Kramer
4d0ae7cfef Remove static ctor.
llvm-svn: 151160
2012-02-22 13:42:11 +00:00
Chandler Carruth
c5b687b241 Support was removed from LLVM's MIPS backend for the PSP variant of that
chip in r139383, and the PSP components of the triple are really
annoying to parse. Let's leave this chapter behind. There is no reason
to expect LLVM to see a PSP-related triple these days, and so no
reasonable motivation to support them.

It might be reasonable to prune a few of the older MIPS triple forms in
general, but as those at least cause no burden on parsing (they aren't
both a chip and an OS!), I'm happy to leave them in for now.

llvm-svn: 151156
2012-02-22 11:32:54 +00:00
Eric Christopher
9f47c92b48 Only add DW_AT_prototyped if we're working with a C-like language.
Worth another 45k (1%) off of a large C++ testcase.

rdar://10909458

llvm-svn: 151144
2012-02-22 08:46:21 +00:00
Eric Christopher
32802595f6 Add the source language into the compile unit.
llvm-svn: 151143
2012-02-22 08:46:13 +00:00
Eric Christopher
61c6749e44 Remove extra semi-colon.
llvm-svn: 151142
2012-02-22 08:46:02 +00:00
Craig Topper
d8faffd93b Declare register classes as const. Fix a couple pointers to register classes that weren't already const.
llvm-svn: 151138
2012-02-22 07:28:11 +00:00
Andrew Trick
98a6abc9f6 misched: DAG builder should not track dependencies for SSA defs.
The vast majority of virtual register definitions don't need an entry
in the DAG builder's VRegDefs set.

llvm-svn: 151136
2012-02-22 06:08:13 +00:00
Andrew Trick
5c61d0befc Initialize SUnits before DAG building.
Affect on SD scheduling and postRA scheduling:
Printing the DAG will display the nodes in top-down topological order.
This matches the order within the MBB and makes my life much easier in general.

Affect on misched:
We don't need to track virtual register uses at all. This is awesome.
I also intend to rely on the SUnit ID as a topo-sort index. So if A < B then we cannot have an edge B -> A.

llvm-svn: 151135
2012-02-22 06:08:11 +00:00
Craig Topper
3ed929de0a Make all pointers to TargetRegisterClass const since they are all pointers to static data that should not be modified.
llvm-svn: 151134
2012-02-22 05:59:10 +00:00
Rafael Espindola
4f3e648dd0 Improve comment. Thanks for Andrew for the suggestion.
llvm-svn: 151127
2012-02-22 03:44:46 +00:00
Rafael Espindola
23cd372dbf Semantically revert 151015. Add a comment on why we should be able to assert
the dominance once the dominates method is fixed and why we can use the builder's
insertion point.
Fixes pr12048.

llvm-svn: 151125
2012-02-22 03:21:39 +00:00
Aaron Ballman
a76a5b7265 Adding support for Microsoft's thiscall calling convention. LLVM side of the patch.
llvm-svn: 151123
2012-02-22 03:04:40 +00:00
Jakob Stoklund Olesen
fdda2fc23a Clarify ARM calling conventions.
llvm-svn: 151113
2012-02-22 01:07:19 +00:00
Jakob Stoklund Olesen
a1db1a4669 Use SparseSet for the RAFast live virtual register map.
This makes RAFast 4% faster, and it gets rid of the dodgy DenseMap
iteration.

This also revealed that RAFast would sometimes dereference DenseMap
iterators after erasing other elements from the map. That does seem to
work in the current DenseMap implementation, but SparseSet doesn't allow
it.

llvm-svn: 151111
2012-02-22 01:02:37 +00:00
Akira Hatanaka
4330fc73ec Use a function in MathExtras to do sign extension.
llvm-svn: 151107
2012-02-22 00:16:54 +00:00
Jakob Stoklund Olesen
f585983be9 Calls don't really change the stack pointer.
Even if a call instruction has %SP<imp-def> operands, it doesn't change
the value of the stack pointer.

llvm-svn: 151104
2012-02-21 23:47:43 +00:00
Lang Hames
15c7539a46 Add API "handleMoveIntoBundl" for updating liveness when moving instructions into
bundles. This method takes a bundle start and an MI being bundled, and makes
the intervals for the MI's operands appear to start/end on the bundle start.

Also fixes some minor cosmetic issues (whitespace, naming convention) in the
HMEditor code.

llvm-svn: 151099
2012-02-21 22:29:38 +00:00
Eric Christopher
7b19cf8b2a There's no need for a DW_AT_byte_size on a pointer type.
Part of rdar://10493979 where it reduces by about .5% (10k)

llvm-svn: 151097
2012-02-21 22:25:53 +00:00
Nick Lewycky
664d5b131f Use the target-aware constant folder on expressions to improve the chance
they'll be simple enough to simulate, and to reduce the chance we'll encounter
equal but different simple pointer constants.

This removes the symptoms from PR11352 but is not a full fix. A proper fix would
either require a guarantee that two constant objects we simulate are folded
when equal, or a different way of handling equal pointers (ie., trying a
constantexpr icmp on them to see whether we know they're equal or non-equal or
unsure).

llvm-svn: 151093
2012-02-21 22:08:06 +00:00
Evan Cheng
9759637dc1 Proper support for a bastardized darwin-eabi hybird ABI.
llvm-svn: 151083
2012-02-21 20:46:00 +00:00
Rafael Espindola
8d727cc0cb s/the the/the/
llvm-svn: 151079
2012-02-21 19:27:16 +00:00
Benjamin Kramer
bc60ae1e71 Fix unsigned off-by-one in comment.
llvm-svn: 151056
2012-02-21 13:40:06 +00:00
Benjamin Kramer
dacc2e8edb InstCombine: Don't transform a signed icmp of two GEPs into a signed compare of the indices.
This transformation is not safe in some pathological cases (signed icmp of pointers should be an
extremely rare thing, but it's valid IR!). Add an explanatory comment.

Kudos to Duncan for pointing out this edge case (and not giving up explaining it until I finally got it).

llvm-svn: 151055
2012-02-21 13:31:09 +00:00
Duncan Sands
cb8147cfe5 Move the implementation of StringRef::split out of StringExtras.cpp
and into StringRef.cpp, which is where the other StringRef stuff is.

llvm-svn: 151054
2012-02-21 12:00:25 +00:00
Jay Foad
aea6e7df6b Revert r151049 cos it broke the buildbots.
llvm-svn: 151052
2012-02-21 11:44:46 +00:00
Chandler Carruth
4cc3bda4d3 Tiny cosmetic change to use the same style for all of the while loops in
the normalize routine, especially the empty while loops.

llvm-svn: 151050
2012-02-21 09:29:14 +00:00
Jay Foad
9034028575 PR1210: make uniquing of struct and function types more efficient by
using a DenseMap and Talin's new GeneralHash, avoiding the need for a
temporary std::vector on every lookup.

Patch by Meador Inge!

llvm-svn: 151049
2012-02-21 09:25:52 +00:00
Chandler Carruth
22537f932d Replace a hand rolled loop with a lovely StringRef helper we have these
days. No functionality changed.

llvm-svn: 151048
2012-02-21 09:12:48 +00:00
Chandler Carruth
b2adf74ff3 Pull the parsing helper functions out of the Triple interface entirely.
They're private static methods but we can just make them static
functions in the implementation. It makes the implementations a touch
more wordy, but takes another chunk out of the header file.

Also, take the opportunity to switch the names to the new coding
conventions.

No functionality changed here.

llvm-svn: 151047
2012-02-21 08:53:32 +00:00
Chandler Carruth
12774336b5 Clean up comments that I missed when changing the triple representation.
Somehow, I even missed the ones I wrote just the other day...

Thanks to Matt for the code review.

llvm-svn: 151045
2012-02-21 08:31:18 +00:00
Andrew Trick
25ec43e9fe Clear virtual registers after they are no longer referenced.
Passes after RegAlloc should be able to rely on MRI->getNumVirtRegs() == 0.
This makes sharing code for pre/postRA passes more robust.
Now, to check if a pass is running before the RA pipeline begins, use MRI->isSSA().
To check if a pass is running after the RA pipeline ends, use !MRI->getNumVirtRegs().

PEI resets virtual regs when it's done scavenging.

PTX will either have to provide its own PEI pass or assign physregs.

llvm-svn: 151032
2012-02-21 04:51:23 +00:00
Andrew Trick
719b2521ef StackSlotColoring does not use a VirtRegMap
llvm-svn: 151031
2012-02-21 04:51:19 +00:00
Rafael Espindola
8ef9503d71 Use more idiomatic assert.
llvm-svn: 151026
2012-02-21 03:51:14 +00:00
Rafael Espindola
aec58a4177 Avoid warning on non assert builds.
llvm-svn: 151025
2012-02-21 03:48:30 +00:00
Chandler Carruth
34c9c293e1 Switch the llvm::Triple class to immediately parse the triple string on
construction. Simplify its interface, implementation, and users
accordingly as there is no longer an 'uninitialized' state to check for.
Also, fixes a bug lurking in the interface as there was one method that
didn't correctly check for initialization.

llvm-svn: 151024
2012-02-21 03:39:36 +00:00
Rafael Espindola
232a730f45 It turns out that with the current scev organization ReuseOrCreateCast cannot
know where users will be added. Because of this, it cannot use
Builder.GetInsertPoint at all.

This patch
* removes the FIXME about adding the assert.
* adds a comment explaining hy we don't have one.
* removes a broken logic that only works for some callers and is not needed
  since r150884.
* adds an assert to caller that would have caught the bug fixed by r150884.

llvm-svn: 151015
2012-02-21 01:19:51 +00:00
Lang Hames
1b774db571 Fix some bugs in HMEditor's moveAllOperandsInto logic.
llvm-svn: 151006
2012-02-21 00:00:36 +00:00
Nick Lewycky
b9cf2477b9 Check for the correct size in the invariant marker.
llvm-svn: 151003
2012-02-20 23:32:26 +00:00
Evan Cheng
3bffc22fc2 Fix machine-cp by having it to check sub-register indicies. e.g.
ecx = mov eax
al  = mov ch
The second copy is not a nop because the sub-indices of ecx,ch is not the
same of that of eax/al.

Re-enabled machine-cp.
PR11940

llvm-svn: 151002
2012-02-20 23:28:17 +00:00
Chad Rosier
b98a4accfa Fix 80-column violation.
llvm-svn: 150998
2012-02-20 23:13:17 +00:00
Benjamin Kramer
0dac66d9a2 InstCombine: Removing the base from the address calculation is only safe when the GEPs are inbounds.
llvm-svn: 150978
2012-02-20 18:45:10 +00:00
Eric Christopher
742c530fa0 Make this a bit prettier and more obvious when a derived type isn't
derived from anything.

llvm-svn: 150975
2012-02-20 18:04:39 +00:00