1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

39892 Commits

Author SHA1 Message Date
Duncan Sands
9255845ac7 Remove custom expansion from LegalizeTypes when doing
soft float: experiments show that targets aren't
expecting this for results or for operands.  Add
support select/select_cc result soft float and
correct operand soft float for these.

llvm-svn: 53245
2008-07-08 20:03:24 +00:00
Duncan Sands
a41982af51 Add missing select_cc libcall line, somehow omitted
in LegalizeTypes.

llvm-svn: 53244
2008-07-08 20:00:05 +00:00
Chris Lattner
6163b7a5ad improve comment
llvm-svn: 53243
2008-07-08 18:47:38 +00:00
Chris Lattner
12ebc344e1 'Optimize' test
llvm-svn: 53242
2008-07-08 18:33:33 +00:00
Chris Lattner
c5d6ef88ff Add a new hidden option to the interpreter to cause it to print
out every volatile load and store.  This is useful for tracking 
down insane volatile memory bugs.

llvm-svn: 53241
2008-07-08 17:25:49 +00:00
Chris Lattner
c144216d78 Fix PR2496, a really nasty bug which involved sinking volatile loads
into phis.  This is actually the same bug as PR2262 /
2008-04-29-VolatileLoadDontMerge.ll, but I missed checking the first 
predecessor for multiple successors.  Testcase here:
InstCombine/2008-07-08-VolatileLoadMerge.ll

llvm-svn: 53240
2008-07-08 17:18:32 +00:00
Chris Lattner
7f0adf0b34 new testcase for PR2496
llvm-svn: 53239
2008-07-08 17:18:05 +00:00
Evan Cheng
6af015292e Unbreak C++ tests on x86 Darwin.
llvm-svn: 53237
2008-07-08 16:40:43 +00:00
Owen Anderson
1aebb33c1d Global variables beginning with \01 have special meaning on Darwin, so we need to remove
the name prefix when we change them from internal to external.  This allows bugpointing
of codegen miscompilations to work more reliably on Darwin.

llvm-svn: 53236
2008-07-08 16:38:42 +00:00
Duncan Sands
f9f4389fb7 LegalizeTypes support for FP_ROUND and FP_EXTEND
soft float.

llvm-svn: 53231
2008-07-08 10:50:55 +00:00
Duncan Sands
a6a427cb61 Testcase for PR2520.
llvm-svn: 53230
2008-07-08 10:11:36 +00:00
Duncan Sands
65028bf60d Add some helpers for manipulating function
parameter attributes.

llvm-svn: 53228
2008-07-08 09:41:30 +00:00
Duncan Sands
f21350341b Pacify gcc-4.3.
llvm-svn: 53227
2008-07-08 09:33:14 +00:00
Duncan Sands
7a6ba3f3a4 Note that 'nest' only applies to pointers.
llvm-svn: 53226
2008-07-08 09:27:25 +00:00
Matthijs Kooijman
4cf0a68307 Add CallSite::getArgumentNo() to be able to translate an operand number into a
argument number.

llvm-svn: 53225
2008-07-08 08:51:47 +00:00
Matthijs Kooijman
8aaa85f108 Add CallSite::getArgumentOffset() to hide the differences in operands betwen
Call and Invoke in a single method instead of having it hardcoded in multiple
places.

llvm-svn: 53224
2008-07-08 08:50:32 +00:00
Duncan Sands
b854603cb5 Add some convenience methods for manipulating
call attributes.

llvm-svn: 53223
2008-07-08 08:38:44 +00:00
Chris Lattner
d4bcc9011b Fix three bugs:
1) evaluate [v]fcmp true/false with undefs to true or false instead
   of undef.
2) fix vector comparisons with undef to return a vector result instead 
   of i1
3) fix vector comparisons with evaluatable results to return vector
   true/false instead of i1 true/false (PR2529)

llvm-svn: 53220
2008-07-08 05:46:34 +00:00
Chris Lattner
a046dec1c1 clarify :)
llvm-svn: 53218
2008-07-08 05:12:37 +00:00
Nick Lewycky
9cecc07bec Expand SCEVUDiv of power of 2 to a lshr instruction.
llvm-svn: 53217
2008-07-08 05:05:37 +00:00
Evan Cheng
5be1103646 Avoid unnecessary string construction during asm printing.
llvm-svn: 53215
2008-07-08 00:55:58 +00:00
Nick Kledzik
fb163aa055 add _lto_codegen_debug_options so that linker can use it
llvm-svn: 53213
2008-07-07 23:24:06 +00:00
Dan Gohman
cd25487258 Pool-allocation for MachineInstrs, MachineBasicBlocks, and
MachineMemOperands. The pools are owned by MachineFunctions.

This drastically reduces the number of calls to malloc/free made
during the "Emit" phase of scheduling, as well as later phases
in CodeGen. Combined with other changes, this speeds up the
"instruction selection" phase of CodeGen by 10% in some cases.

llvm-svn: 53212
2008-07-07 23:14:23 +00:00
Dan Gohman
93e0208361 Pool-allocation for SDNodes. The pool is allocated once for each function,
and reused across SelectionDAGs.

This drastically reduces the number of calls to malloc/free made during
instruction selection, and improves memory locality.

llvm-svn: 53211
2008-07-07 23:02:41 +00:00
Dan Gohman
60e964b34c Add some basic Pool-allocation infrastructure. This adds a Recycler class,
for handling bookkeeping for deleted objects, as well as the alist class
template, for keeping lists of objects allocated from Recyclers, and some
related utilities.

llvm-svn: 53210
2008-07-07 22:58:06 +00:00
Evan Cheng
ba25ca4b1b Clean up PPC register specification.
llvm-svn: 53209
2008-07-07 22:22:07 +00:00
Evan Cheng
688a8070f4 ATT asm printer just print register AsmName's instead of calling tolower on each charater of Name. This speeds it up by 10%.
llvm-svn: 53208
2008-07-07 22:21:06 +00:00
Evan Cheng
c8c4503279 TargetRegisterDesc::Name field is the same as the abstract register name. There is no need for targets to specify register names in addition to their AsmName's.
llvm-svn: 53207
2008-07-07 22:19:41 +00:00
Bill Wendling
b30a16ca2c Use the canonical way to get an empty structure.
llvm-svn: 53206
2008-07-07 21:41:57 +00:00
Dan Gohman
6057cf766c Refactor the tablegen DAGISelEmitter code for outputing calls to
getTargetNode and SelectNodeTo to reduce duplication, and to
make some of the getTargetNode code available to SelectNodeTo.
Use SelectNodeTo instead of getTargetNode in several new
interesting cases, as it mutates nodes in place instead of
creating new ones.

This triggers some scheduling behavior differences due to nodes
being presented to the scheduler in a different order. Some of the
arbitrary scheduling decisions it makes are now arbitrarily made
differently. This is visible in CodeGen/PowerPC/LargeAbsoluteAddr.ll,
where a trivial scheduling difference led to a trivial register
allocation difference.

llvm-svn: 53203
2008-07-07 21:00:17 +00:00
Bill Wendling
d7da49634d Use StringMap for greater justice!
llvm-svn: 53202
2008-07-07 20:59:31 +00:00
Dan Gohman
d787dcfa3d Fix SDNode::MorphNodeTo (a function used by by SelectNodeTo) to
properly track dead nodes that are on the original SDNode's operand
list but not the new one, and have no other uses.

llvm-svn: 53201
2008-07-07 20:57:48 +00:00
Dan Gohman
255eb1d296 Move MachineMemOperand's constructor out of line, to avoid a
#include dependency on Support/MathExtras.h in the header file.

llvm-svn: 53200
2008-07-07 20:32:02 +00:00
Dan Gohman
c81274ae95 Simplify this use of BuildMI. This is also in preparation for
pool-allocating MachineInstrs.

llvm-svn: 53198
2008-07-07 20:09:12 +00:00
Dan Gohman
ed34aec9a8 Use of operator* is redundant and confusing here.
llvm-svn: 53197
2008-07-07 20:08:05 +00:00
Dan Gohman
7fb6670108 Minor const-correctness fixes.
llvm-svn: 53196
2008-07-07 20:06:06 +00:00
Dan Gohman
f2b95cb24f Shrink MachineMemOperand by storing the alignment in log form
and rearranging the fields.

llvm-svn: 53195
2008-07-07 20:05:04 +00:00
Dan Gohman
713d153ea3 Assert that all MachineInstrs update PhysRegUseDefLists in
their cleanup code. 

llvm-svn: 53194
2008-07-07 19:55:35 +00:00
Evan Cheng
cf3a4ad46d Fix two serious LSR bugs.
1. LSR runOnLoop is always returning false regardless if any transformation is made.
2. AddUsersIfInteresting can create new instructions that are added to DeadInsts. But there is a later early exit which prevents them from being freed.

llvm-svn: 53193
2008-07-07 19:51:32 +00:00
Bruno Cardoso Lopes
b0c10c758e fixed 32-bit fp_to_sint pattern
llvm-svn: 53192
2008-07-07 19:11:24 +00:00
Dan Gohman
1834981eb0 Make ilist noncopyable too.
llvm-svn: 53190
2008-07-07 18:43:32 +00:00
Dan Gohman
fca9922b1b Don't use std::advance just to increment or decrement by one.
llvm-svn: 53189
2008-07-07 18:39:33 +00:00
Dan Gohman
ddcc08e98f Make BumpPtrAllocator noncopyable.
llvm-svn: 53188
2008-07-07 18:38:14 +00:00
Dan Gohman
68abfdf98d Add a space between * and /* to help simple-minded lexers.
llvm-svn: 53187
2008-07-07 18:34:27 +00:00
Dan Gohman
d263602463 Remove most of the uses of SDOperandPtr, usually replacing it with a
simple const SDOperand*, which is what's usually needed.

For AddNodeIDOperands, which is small, just duplicate the function to
accept an SDUse*.

For SelectionDAG::getNode - Add an overload that accepts SDUse* that
copies the operands into a temporary SDOperand array, but also has
special-case checks for 0 through 3 operands to avoid the copy in
the common cases.

llvm-svn: 53183
2008-07-07 18:26:29 +00:00
Dan Gohman
dd9c91e583 Remove uses of "llvm/Support/Debug.h" from LLVM include files, which
all happened be unnecessary.

llvm-svn: 53182
2008-07-07 18:14:29 +00:00
Dan Gohman
3755664b6d Remove unnecessary static_casts.
llvm-svn: 53181
2008-07-07 18:08:20 +00:00
Dan Gohman
9112a5463e Remove an unnecessary reinterpret_cast.
llvm-svn: 53180
2008-07-07 18:07:36 +00:00
Dan Gohman
955fdc7a4c Add explicit keywords.
llvm-svn: 53179
2008-07-07 18:00:37 +00:00
Dan Gohman
6c9a53ffac Use empty() instead of size().
llvm-svn: 53178
2008-07-07 17:52:43 +00:00