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

39825 Commits

Author SHA1 Message Date
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
Dan Gohman
c97817aac3 Make DenseMap's insert return a pair, to more closely resemble std::map.
llvm-svn: 53177
2008-07-07 17:46:23 +00:00
Ted Kremenek
1d321b8875 Removed ImmutableMap::SlimFind and replaced it with ImmutableMap::lookup. The new method does the same thing, except that it returns a pointer to the mapped data type, and not to an internal tree node.
llvm-svn: 53171
2008-07-07 16:20:55 +00:00
Evan Cheng
38ce408540 LegalizeSetCCOperands should legalize the result of ExpandLibCall. Patch by Richard Osborne.
llvm-svn: 53169
2008-07-07 07:18:09 +00:00
Nick Lewycky
5b1024c386 Handle 'lshr' instruction with SCEVUDiv object.
Comment the xor %x, -1 case.

llvm-svn: 53167
2008-07-07 06:15:49 +00:00
Bill Wendling
d6bd5ea0b7 Prevent option name conflict.
llvm-svn: 53166
2008-07-07 05:42:27 +00:00
Duncan Sands
0caf597378 LegalizeTypes soft-float support for stores of a
float value.

llvm-svn: 53165
2008-07-07 00:08:12 +00:00
Anton Korobeynikov
47e1a76977 Add convenient helper for checking whether global is weak in linker sense
having weak or linkonce or common or extweak LLVM linkage.

llvm-svn: 53158
2008-07-05 23:48:30 +00:00
Anton Korobeynikov
d1b5a2bf91 Testcase for PR2463
llvm-svn: 53157
2008-07-05 23:33:40 +00:00
Anton Korobeynikov
302db24cf1 Override weak stuff during linking of aliases. This fixes PR2463.
llvm-svn: 53156
2008-07-05 23:33:22 +00:00
Anton Korobeynikov
69c88b40ed Testcase for PR2146
llvm-svn: 53155
2008-07-05 23:03:46 +00:00
Anton Korobeynikov
3593f9f7f1 Properly link alias and function decls. This fixes PR2146
llvm-svn: 53154
2008-07-05 23:03:21 +00:00
Nick Lewycky
e85e0b1bbc 80col
llvm-svn: 53153
2008-07-05 22:41:37 +00:00
Nick Lewycky
94f9c5a42e Fix missed optimization opportunity when analyzing cast of mul and select.
llvm-svn: 53151
2008-07-05 21:19:34 +00:00
Mon P Wang
a43d6758ac Fixed generating incorrect aligned stores that I backout of r53031
that fixed problems in EmitStackConvert where the source and target type
have different alignment by creating a stack slot with the max
alignment of source and target type.

llvm-svn: 53150
2008-07-05 20:40:31 +00:00
Bruno Cardoso Lopes
d738f1e6c7 Several changes to Mips backend, experimental fp support being the most
important.
- Cleanup in the Subtarget info with addition of new features, not all support
  yet, but they allow the future inclusion of features easier. Among new features,
  we have : Arch family info (mips1, mips2, ...), ABI info (o32, eabi), 64-bit
  integer
  and float registers, allegrex vector FPU (VFPU), single float only support.
- TargetMachine now detects allegrex core.
- Added allegrex (Mips32r2) sext_inreg instructions.
- *Added Float Point Instructions*, handling single float only, and
  aliased accesses for 32-bit FPUs.
- Some cleanup in FP instruction formats and FP register classes.
- Calling conventions improved to support mips 32-bit EABI.
- Added Asm Printer support for fp cond codes.
- Added support for sret copy to a return register.
- EABI support added into LowerCALL and FORMAL_ARGS.
- MipsFunctionInfo now keeps a virtual register per function to track the
  sret on function entry until function ret.
- MipsInstrInfo FP support into methods (isMoveInstr, isLoadFromStackSlot, ...),
  FP cond codes mapping and initial FP Branch Analysis.
- Two new Mips SDNode to handle fp branch and compare instructions : FPBrcond,
  FPCmp
- MipsTargetLowering : handling different FP classes, Allegrex support, sret
  return copy, no homing location within EABI, non 32-bit stack objects
  arguments, and asm constraint for float.

llvm-svn: 53146
2008-07-05 19:05:21 +00:00
Duncan Sands
3ea6f15708 Rather than having a different custom legalization
hook for each way in which a result type can be
legalized (promotion, expansion, softening etc),
just use one: ReplaceNodeResults, which returns
a node with exactly the same result types as the
node passed to it, but presumably with a bunch of
custom code behind the scenes.  No change if the
new LegalizeTypes infrastructure is not turned on.

llvm-svn: 53137
2008-07-04 11:47:58 +00:00
Duncan Sands
aac5c915ed Linux also does not require exception handling
moves in order to get correct debug info.  Since
I can't imagine how any target could possibly
be any different, I've just stripped out the
option: now all the world's like Darwin!

llvm-svn: 53134
2008-07-04 09:55:48 +00:00