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

64703 Commits

Author SHA1 Message Date
Rafael Espindola
f926b1b27d Change section_data dumping to print hex numbers instead of using
python's %r.

llvm-svn: 113685
2010-09-11 15:25:58 +00:00
Owen Anderson
d4ebde12ce Invert and-of-or into or-of-and when doing so would allow us to clear bits of the and's mask.
This can result in increased opportunities for store narrowing in code generation.  Update a number of
tests for this change.  This fixes <rdar://problem/8285027>.

Additionally, because this inverts the order of ors and ands, some patterns for optimizing or-of-and-of-or
no longer fire in instances where they did originally.  Add a simple transform which recaptures most of these
opportunities: if we have an or-of-constant-or and have failed to fold away the inner or, commute the order 
of the two ors, to give the non-constant or a chance for simplification instead.

llvm-svn: 113679
2010-09-11 05:48:06 +00:00
Michael J. Spencer
60e98e663a CMake: Fix mingw32 build.
llvm-svn: 113676
2010-09-11 02:13:39 +00:00
Dale Johannesen
9dad72e011 Add x86mmx to TableGen.
llvm-svn: 113671
2010-09-11 00:16:46 +00:00
Bill Wendling
038bcd275f Rename ConvertToSetZeroFlag to something more general.
llvm-svn: 113670
2010-09-11 00:13:50 +00:00
Bill Wendling
f2b0c99610 No need to recompute the SrcReg and CmpValue.
llvm-svn: 113666
2010-09-10 23:46:12 +00:00
Bill Wendling
e54ebc2cbe Move some of the decision logic for converting an instruction into one that sets
the 'zero' bit down into the back-end. There are other cases where this logic
isn't sufficient, so they should be handled separately.

llvm-svn: 113665
2010-09-10 23:34:19 +00:00
Eric Christopher
01d361f9ed Start sketching out ARM fast-isel calls.
llvm-svn: 113662
2010-09-10 23:18:12 +00:00
Eric Christopher
1364e542aa For consistency.
llvm-svn: 113659
2010-09-10 23:10:30 +00:00
Eric Christopher
4bfc1207f1 Newline at end of file.
llvm-svn: 113654
2010-09-10 22:46:03 +00:00
Bob Wilson
cc4cd788ec Fix a comment typo.
llvm-svn: 113653
2010-09-10 22:42:21 +00:00
Eric Christopher
ae179e4cbd Split out some of the calling convention bits so that they can be
used for fast-isel.

llvm-svn: 113652
2010-09-10 22:42:06 +00:00
Benjamin Kramer
6110efbf8c Teach InstructionSimplify to fold (A & B) & A -> A & B and (A | B) | A -> A | B.
Reassociate does this but it doesn't catch all cases (e.g. if the operands are i1).

llvm-svn: 113651
2010-09-10 22:39:55 +00:00
Gabor Greif
dfe6dea95f typoes
llvm-svn: 113647
2010-09-10 22:25:58 +00:00
Dale Johannesen
da0804f6a1 Add missing X86 MMX declarations. Hopefully fixes buildbot?
llvm-svn: 113643
2010-09-10 21:58:02 +00:00
Bill Wendling
dc260a07f6 Modify the comparison optimizations in the peephole optimizer to update the
iterator when an optimization took place. This allows us to do more insane
things with the code than just remove an instruction or two.

llvm-svn: 113640
2010-09-10 21:55:43 +00:00
Jim Grosbach
ee00b86416 Add a missing case to duplicateCPV() for LSDA constants. Add a FIXME. rdar://8302157
llvm-svn: 113637
2010-09-10 21:38:22 +00:00
Michael J. Spencer
98ad3f2ea7 CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.
llvm-svn: 113632
2010-09-10 21:14:25 +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
Devang Patel
346f59b31c Add DEBUG message.
llvm-svn: 113614
2010-09-10 20:32:09 +00:00
Bill Wendling
d7f4e62200 Reapply r113585. The msvc machine is mercurial.
llvm-svn: 113610
2010-09-10 20:20:28 +00:00
Benjamin Kramer
cd84f14639 This transform is also performed by InstructionSimplify, remove the duplicate.
llvm-svn: 113608
2010-09-10 19:52:35 +00:00
Bill Wendling
ddfcd9b819 r113585 was causing clang-i686-xp-msvc9 to fail in mysterious ways that I can't
understand (the log file was no help).

llvm-svn: 113605
2010-09-10 19:20:47 +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
Bob Wilson
027c57accb Calculate the number of VLDM/VSTM registers by subtracting the number of
fixed operands from the total number of operands (including the variadic ones).

llvm-svn: 113597
2010-09-10 18:25:35 +00:00
Owen Anderson
c0664eb99a Lower the unrolling theshold to 150. Empirical tests indicate that this is a sweet spot in the performance per
code size increase curve.

llvm-svn: 113595
2010-09-10 17:57:00 +00:00
Dale Johannesen
545bd92baf x86mmx is 64 bits.
llvm-svn: 113594
2010-09-10 17:51:47 +00:00
Jim Grosbach
bee860c7c2 add a comment explicitly calling out that allocation orders may include
reserved regs and that register allocators need to explicitly check for
them.

llvm-svn: 113593
2010-09-10 17:51:34 +00:00
Bill Wendling
bbdc6c49bf Mark the sse_load_f32 and sse_load_f64 load patterns as having memoperands so
that the memoperands are properly set after DAG building and general mucking
about.

llvm-svn: 113585
2010-09-10 10:34:22 +00:00
Bill Wendling
6cc7baa725 Reword since this may not be a bug but intended behavior.
llvm-svn: 113584
2010-09-10 10:31:11 +00:00
NAKAMURA Takumi
9c328040a6 Makefile.rules: LOADABLE_MODULE/Win32: "all" components may be linked
only when ENABLE_SHARED=1.

Loadable module for Win32 requires all symbols resolved for linking.

llvm-svn: 113579
2010-09-10 06:27:02 +00:00
NAKAMURA Takumi
7857655635 Don't build redundant libLLVMgold.a.
Building archive would be executed due to definition of BUILD_ARCHIVE,
even if BUILD_ARCHIVE = "0".

llvm-svn: 113578
2010-09-10 06:26:57 +00:00
Evan Cheng
e2425602c5 Fix test so it passes on non-Darwin hosts.
llvm-svn: 113577
2010-09-10 06:20:01 +00:00
Bob Wilson
01b7bf3510 Fix merging base-updates for VLDM/VSTM: Before I switched these instructions
to use AddrMode4, there was a count of the registers stored in one of the
operands.  I changed that to just count the operands but forgot to adjust for
the size of D registers.  This was noticed by Evan as a performance problem
but it is a potential correctness bug as well, since it is possible that this
could merge a base update with a non-matching immediate.

llvm-svn: 113576
2010-09-10 05:15:04 +00:00
Evan Cheng
c9cb37516d Teach if-converter to be more careful with predicating instructions that would
take multiple cycles to decode.
For the current if-converter clients (actually only ARM), the instructions that
are predicated on false are not nops. They would still take machine cycles to
decode. Micro-coded instructions such as LDM / STM can potentially take multiple
cycles to decode. If-converter should take treat them as non-micro-coded
simple instructions.

llvm-svn: 113570
2010-09-10 01:29:16 +00:00
Eric Christopher
54e138031e Fix build error.
llvm-svn: 113566
2010-09-10 00:35:09 +00:00
Eric Christopher
92506682eb Update comments, reorganize some code, rename variables to be
more clear.  No functional change.

llvm-svn: 113565
2010-09-10 00:34:35 +00:00
Eric Christopher
06f4af2ef4 64-bit fp loads can come straight out of the constant pool, not as
bad as I'd thought.

llvm-svn: 113561
2010-09-09 23:50:00 +00:00
Dan Gohman
a9936d3f97 Discard metadata produced by LLVM 2.7. The value enumeration it used
is different from what the code now uses in a two ways: NamedMDNodes
were considered Values and included in the numbering, and the
function-local metadata counter wasn't reset between functions.

The later problem breaks lazy deserialization, so instead of trying
to emulate the old numbering, just drop the old metadata. The only
in-tree use case is debug info with LTO, where the QOI loss is
considered acceptable.

llvm-svn: 113557
2010-09-09 23:12:39 +00:00
Daniel Dunbar
547563df12 llvm-mc: Don't crash when using -n and we see a directive before the initial section.
- This is annoying, because we have to scatter this check everywhere that could emit real data, but I see no better solution.

llvm-svn: 113552
2010-09-09 22:42:59 +00:00
Daniel Dunbar
07c0ca2a51 llvm-mc: Make sure we exit != 0 if any errors are encountered.
llvm-svn: 113551
2010-09-09 22:42:56 +00:00
Jakob Stoklund Olesen
79f7387096 XFAIL test under valgrind. It is not really our problem if sh is leaking.
llvm-svn: 113550
2010-09-09 22:02:13 +00:00
Eric Christopher
3c86728bd6 SIToFP and FPToSI conversions work only on fp-reg to fp-reg. Move
some data around and implement a couple of move routines to do this.

llvm-svn: 113546
2010-09-09 21:44:45 +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
Eric Christopher
d5f271d31e New "move to fp reg" routine. Use it.
llvm-svn: 113537
2010-09-09 20:49:25 +00:00
Eric Christopher
7208671884 "Strike that, reverse it." -- Mr. Wonka.
Truncate when truncating, extend when extending.

llvm-svn: 113536
2010-09-09 20:36:19 +00:00
Owen Anderson
f7276d42d3 What the loop unroller cares about, rather than just not unrolling loops with calls, is
not unrolling loops that contain calls that would be better off getting inlined.  This mostly
comes up when an interleaved devirtualization pass has devirtualized a call which the inliner
will inline on a future pass.  Thus, rather than blocking all loops containing calls, add
a metric for "inline candidate calls" and block loops containing those instead.

llvm-svn: 113535
2010-09-09 20:32:23 +00:00