12 years agoNowadays a release build has assertions off.
Duncan Sands [Mon, 13 Sep 2010 13:45:33 +0000 (13:45 +0000)]
Nowadays a release build has assertions off.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113747 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSpelling fixes in comments.
Duncan Sands [Mon, 13 Sep 2010 13:32:22 +0000 (13:32 +0000)]
Spelling fixes in comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113746 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix comment typo.
Dale Johannesen [Sun, 12 Sep 2010 22:36:13 +0000 (22:36 +0000)]
Fix comment typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113728 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCMake: Fix MSVS build. Although I don't know why this didn't break other build systems...
Michael J. Spencer [Sun, 12 Sep 2010 18:32:57 +0000 (18:32 +0000)]
CMake: Fix MSVS build. Although I don't know why this didn't break other build systems...

This problem is unrelated to the recent dependency tracking change. It
seems like noone noticed the problem because I don't think anyone compiles
any target other than X86 on windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113727 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRevert 113679, it was causing an infinite loop in a testcase that I've sent
Eric Christopher [Sun, 12 Sep 2010 06:09:23 +0000 (06:09 +0000)]
Revert 113679, it was causing an infinite loop in a testcase that I've sent
on to Owen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113720 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCMake: Fix mingw32 build.
Michael J. Spencer [Sun, 12 Sep 2010 03:47:31 +0000 (03:47 +0000)]
CMake: Fix mingw32 build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113712 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoadd some documentation for the most important MC-level classes along with
Chris Lattner [Sat, 11 Sep 2010 23:02:10 +0000 (23:02 +0000)]
add some documentation for the most important MC-level classes along with
an overview of mc and the idea of the code emission phase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113707 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoadd a missed cmov alias, part of rdar://8416805
Chris Lattner [Sat, 11 Sep 2010 17:08:22 +0000 (17:08 +0000)]
add a missed cmov alias, part of rdar://8416805

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113693 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoadd support for all the setCC aliases. Part of rdar://8416805
Chris Lattner [Sat, 11 Sep 2010 17:06:05 +0000 (17:06 +0000)]
add support for all the setCC aliases.  Part of rdar://8416805

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113692 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd support for leb128 of absolute expressions.
Rafael Espindola [Sat, 11 Sep 2010 16:45:15 +0000 (16:45 +0000)]
Add support for leb128 of absolute expressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113691 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoadd support for pushfd/popfd which are aliases for pushfl/popfl.
Chris Lattner [Sat, 11 Sep 2010 16:39:16 +0000 (16:39 +0000)]
add support for pushfd/popfd which are aliases for pushfl/popfl.
This fixes rdar://8408129 - pushfd and popfd get invalid instruction mnemonic errors

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113690 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoimplement rdar://8407928 - support for in/out with a missing "a" register.
Chris Lattner [Sat, 11 Sep 2010 16:32:12 +0000 (16:32 +0000)]
implement rdar://8407928 - support for in/out with a missing "a" register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113689 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agofix the asmparser so that the target is responsible for skipping to
Chris Lattner [Sat, 11 Sep 2010 16:18:25 +0000 (16:18 +0000)]
fix the asmparser so that the target is responsible for skipping to
the end of the line on a parser error, allowing skipping to happen
for syntactic errors but not for semantic errors.  Before we would
miss emitting a diagnostic about the second line, because we skipped
it due to the semantic error on the first line:

  foo %eax
  bar %al

This fixes rdar://8414033 - llvm-mc ignores lines after an invalid instruction mnemonic errors

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113688 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd missing single quotes.
Rafael Espindola [Sat, 11 Sep 2010 15:45:48 +0000 (15:45 +0000)]
Add missing single quotes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113687 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoChange section_data dumping to print hex numbers instead of using
Rafael Espindola [Sat, 11 Sep 2010 15:25:58 +0000 (15:25 +0000)]
Change section_data dumping to print hex numbers instead of using
python's %r.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113685 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoInvert and-of-or into or-of-and when doing so would allow us to clear bits of the...
Owen Anderson [Sat, 11 Sep 2010 05:48:06 +0000 (05:48 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113679 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCMake: Fix mingw32 build.
Michael J. Spencer [Sat, 11 Sep 2010 02:13:39 +0000 (02:13 +0000)]
CMake: Fix mingw32 build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113676 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd x86mmx to TableGen.
Dale Johannesen [Sat, 11 Sep 2010 00:16:46 +0000 (00:16 +0000)]
Add x86mmx to TableGen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113671 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRename ConvertToSetZeroFlag to something more general.
Bill Wendling [Sat, 11 Sep 2010 00:13:50 +0000 (00:13 +0000)]
Rename ConvertToSetZeroFlag to something more general.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113670 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoNo need to recompute the SrcReg and CmpValue.
Bill Wendling [Fri, 10 Sep 2010 23:46:12 +0000 (23:46 +0000)]
No need to recompute the SrcReg and CmpValue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113666 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMove some of the decision logic for converting an instruction into one that sets
Bill Wendling [Fri, 10 Sep 2010 23:34:19 +0000 (23:34 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113665 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoStart sketching out ARM fast-isel calls.
Eric Christopher [Fri, 10 Sep 2010 23:18:12 +0000 (23:18 +0000)]
Start sketching out ARM fast-isel calls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113662 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFor consistency.
Eric Christopher [Fri, 10 Sep 2010 23:10:30 +0000 (23:10 +0000)]
For consistency.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113659 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoNewline at end of file.
Eric Christopher [Fri, 10 Sep 2010 22:46:03 +0000 (22:46 +0000)]
Newline at end of file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113654 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix a comment typo.
Bob Wilson [Fri, 10 Sep 2010 22:42:21 +0000 (22:42 +0000)]
Fix a comment typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113653 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSplit out some of the calling convention bits so that they can be
Eric Christopher [Fri, 10 Sep 2010 22:42:06 +0000 (22:42 +0000)]
Split out some of the calling convention bits so that they can be
used for fast-isel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113652 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTeach InstructionSimplify to fold (A & B) & A -> A & B and (A | B) | A -> A | B.
Benjamin Kramer [Fri, 10 Sep 2010 22:39:55 +0000 (22:39 +0000)]
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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113651 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agotypoes
Gabor Greif [Fri, 10 Sep 2010 22:25:58 +0000 (22:25 +0000)]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113647 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd missing X86 MMX declarations. Hopefully fixes buildbot?
Dale Johannesen [Fri, 10 Sep 2010 21:58:02 +0000 (21:58 +0000)]
Add missing X86 MMX declarations.  Hopefully fixes buildbot?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113643 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoModify the comparison optimizations in the peephole optimizer to update the
Bill Wendling [Fri, 10 Sep 2010 21:55:43 +0000 (21:55 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113640 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd a missing case to duplicateCPV() for LSDA constants. Add a FIXME. rdar://8302157
Jim Grosbach [Fri, 10 Sep 2010 21:38:22 +0000 (21:38 +0000)]
Add a missing case to duplicateCPV() for LSDA constants. Add a FIXME. rdar://8302157

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113637 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.
Michael J. Spencer [Fri, 10 Sep 2010 21:14:25 +0000 (21:14 +0000)]
CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113632 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd X86 MMX type to bitcode and Type.
Dale Johannesen [Fri, 10 Sep 2010 20:55:01 +0000 (20:55 +0000)]
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".)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113618 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUse StringRef which performs the "early exit" when compared against a constant
Bill Wendling [Fri, 10 Sep 2010 20:42:26 +0000 (20:42 +0000)]
Use StringRef which performs the "early exit" when compared against a constant

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113615 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd DEBUG message.
Devang Patel [Fri, 10 Sep 2010 20:32:09 +0000 (20:32 +0000)]
Add DEBUG message.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113614 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoReapply r113585. The msvc machine is mercurial.
Bill Wendling [Fri, 10 Sep 2010 20:20:28 +0000 (20:20 +0000)]
Reapply r113585. The msvc machine is mercurial.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113610 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThis transform is also performed by InstructionSimplify, remove the duplicate.
Benjamin Kramer [Fri, 10 Sep 2010 19:52:35 +0000 (19:52 +0000)]
This transform is also performed by InstructionSimplify, remove the duplicate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113608 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agor113585 was causing clang-i686-xp-msvc9 to fail in mysterious ways that I can't
Bill Wendling [Fri, 10 Sep 2010 19:20:47 +0000 (19:20 +0000)]
r113585 was causing clang-i686-xp-msvc9 to fail in mysterious ways that I can't
understand (the log file was no help).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113605 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoEarly exit with simple checks.
Bill Wendling [Fri, 10 Sep 2010 19:06:58 +0000 (19:06 +0000)]
Early exit with simple checks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113603 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAuto-upgrade the magic ".llvm.eh.catch.all.value" global to
Bill Wendling [Fri, 10 Sep 2010 18:51:56 +0000 (18:51 +0000)]
Auto-upgrade the magic ".llvm.eh.catch.all.value" global to
"llvm.eh.catch.all.value". Only the name needs to be changed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113600 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCalculate the number of VLDM/VSTM registers by subtracting the number of
Bob Wilson [Fri, 10 Sep 2010 18:25:35 +0000 (18:25 +0000)]
Calculate the number of VLDM/VSTM registers by subtracting the number of
fixed operands from the total number of operands (including the variadic ones).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113597 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoLower the unrolling theshold to 150. Empirical tests indicate that this is a sweet...
Owen Anderson [Fri, 10 Sep 2010 17:57:00 +0000 (17:57 +0000)]
Lower the unrolling theshold to 150.  Empirical tests indicate that this is a sweet spot in the performance per
code size increase curve.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113595 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agox86mmx is 64 bits.
Dale Johannesen [Fri, 10 Sep 2010 17:51:47 +0000 (17:51 +0000)]
x86mmx is 64 bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113594 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoadd a comment explicitly calling out that allocation orders may include
Jim Grosbach [Fri, 10 Sep 2010 17:51:34 +0000 (17:51 +0000)]
add a comment explicitly calling out that allocation orders may include
reserved regs and that register allocators need to explicitly check for

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113593 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMark the sse_load_f32 and sse_load_f64 load patterns as having memoperands so
Bill Wendling [Fri, 10 Sep 2010 10:34:22 +0000 (10:34 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113585 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoReword since this may not be a bug but intended behavior.
Bill Wendling [Fri, 10 Sep 2010 10:31:11 +0000 (10:31 +0000)]
Reword since this may not be a bug but intended behavior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113584 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMakefile.rules: LOADABLE_MODULE/Win32: "all" components may be linked
NAKAMURA Takumi [Fri, 10 Sep 2010 06:27:02 +0000 (06:27 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113579 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDon't build redundant libLLVMgold.a.
NAKAMURA Takumi [Fri, 10 Sep 2010 06:26:57 +0000 (06:26 +0000)]
Don't build redundant libLLVMgold.a.

Building archive would be executed due to definition of BUILD_ARCHIVE,
even if BUILD_ARCHIVE = "0".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113578 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix test so it passes on non-Darwin hosts.
Evan Cheng [Fri, 10 Sep 2010 06:20:01 +0000 (06:20 +0000)]
Fix test so it passes on non-Darwin hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113577 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix merging base-updates for VLDM/VSTM: Before I switched these instructions
Bob Wilson [Fri, 10 Sep 2010 05:15:04 +0000 (05:15 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113576 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTeach if-converter to be more careful with predicating instructions that would
Evan Cheng [Fri, 10 Sep 2010 01:29:16 +0000 (01:29 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113570 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix build error.
Eric Christopher [Fri, 10 Sep 2010 00:35:09 +0000 (00:35 +0000)]
Fix build error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113566 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUpdate comments, reorganize some code, rename variables to be
Eric Christopher [Fri, 10 Sep 2010 00:34:35 +0000 (00:34 +0000)]
Update comments, reorganize some code, rename variables to be
more clear.  No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113565 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago64-bit fp loads can come straight out of the constant pool, not as
Eric Christopher [Thu, 9 Sep 2010 23:50:00 +0000 (23:50 +0000)]
64-bit fp loads can come straight out of the constant pool, not as
bad as I'd thought.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113561 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDiscard metadata produced by LLVM 2.7. The value enumeration it used
Dan Gohman [Thu, 9 Sep 2010 23:12:39 +0000 (23:12 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113557 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agollvm-mc: Don't crash when using -n and we see a directive before the initial section.
Daniel Dunbar [Thu, 9 Sep 2010 22:42:59 +0000 (22:42 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113552 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agollvm-mc: Make sure we exit != 0 if any errors are encountered.
Daniel Dunbar [Thu, 9 Sep 2010 22:42:56 +0000 (22:42 +0000)]
llvm-mc: Make sure we exit != 0 if any errors are encountered.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113551 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoXFAIL test under valgrind. It is not really our problem if sh is leaking.
Jakob Stoklund Olesen [Thu, 9 Sep 2010 22:02:13 +0000 (22:02 +0000)]
XFAIL test under valgrind. It is not really our problem if sh is leaking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113550 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSIToFP and FPToSI conversions work only on fp-reg to fp-reg. Move
Eric Christopher [Thu, 9 Sep 2010 21:44:45 +0000 (21:44 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113546 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMDNodes are not Constants.
Dan Gohman [Thu, 9 Sep 2010 20:54:24 +0000 (20:54 +0000)]
MDNodes are not Constants.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113539 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPrint invalid metadata references as <badref>, for consistency with
Dan Gohman [Thu, 9 Sep 2010 20:53:58 +0000 (20:53 +0000)]
Print invalid metadata references as <badref>, for consistency with
regular value references.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113538 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoNew "move to fp reg" routine. Use it.
Eric Christopher [Thu, 9 Sep 2010 20:49:25 +0000 (20:49 +0000)]
New "move to fp reg" routine.  Use it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113537 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago"Strike that, reverse it." -- Mr. Wonka.
Eric Christopher [Thu, 9 Sep 2010 20:36:19 +0000 (20:36 +0000)]
"Strike that, reverse it." -- Mr. Wonka.

Truncate when truncating, extend when extending.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113536 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhat the loop unroller cares about, rather than just not unrolling loops with calls, is
Owen Anderson [Thu, 9 Sep 2010 20:32:23 +0000 (20:32 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113535 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd FPTrunc, fix some bugs where I forgot to update the value map.
Eric Christopher [Thu, 9 Sep 2010 20:26:31 +0000 (20:26 +0000)]
Add FPTrunc, fix some bugs where I forgot to update the value map.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113533 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRevert r113439, which relaxed the requirement that loops containing calls cannot...
Owen Anderson [Thu, 9 Sep 2010 20:02:23 +0000 (20:02 +0000)]
Revert r113439, which relaxed the requirement that loops containing calls cannot be unrolled.  After some discussion,
there seems to be a better way to achieve the same effect.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113528 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agor113526 introduced an unintended change to the loop unrolling threshold. Revert it.
Owen Anderson [Thu, 9 Sep 2010 19:11:57 +0000 (19:11 +0000)]
r113526 introduced an unintended change to the loop unrolling threshold.  Revert it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113527 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix typo in code to cap the loop code size reduction calculation.
Owen Anderson [Thu, 9 Sep 2010 19:08:59 +0000 (19:08 +0000)]
Fix typo in code to cap the loop code size reduction calculation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113526 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUse code-size reduction metrics to estimate the amount of savings we'll get when...
Owen Anderson [Thu, 9 Sep 2010 19:07:31 +0000 (19:07 +0000)]
Use code-size reduction metrics to estimate the amount of savings we'll get when we unroll a loop.
Next step is to recalculate the threshold values given this new heuristic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113525 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoBasic FP->Int, Int->FP conversions.
Eric Christopher [Thu, 9 Sep 2010 18:54:59 +0000 (18:54 +0000)]
Basic FP->Int, Int->FP conversions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113523 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd one more pattern to fallback movddup
Bruno Cardoso Lopes [Thu, 9 Sep 2010 18:48:34 +0000 (18:48 +0000)]
Add one more pattern to fallback movddup

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113522 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoExtend the getDependence query with support for PHI translation.
Dan Gohman [Thu, 9 Sep 2010 18:37:31 +0000 (18:37 +0000)]
Extend the getDependence query with support for PHI translation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113521 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd a getPointerOperand() helper function to VAArgInst, for consistency
Dan Gohman [Thu, 9 Sep 2010 18:32:40 +0000 (18:32 +0000)]
Add a getPointerOperand() helper function to VAArgInst, for consistency
with LoadInst and StoreInst.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113520 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFor each instruction itinerary class, specify the number of micro-ops each
Evan Cheng [Thu, 9 Sep 2010 18:18:55 +0000 (18:18 +0000)]
For each instruction itinerary class, specify the number of micro-ops each
instruction in the class would be decoded to. Or zero if the number of
uOPs must be determined dynamically.

This will be used to determine the cost-effectiveness of predicating a
micro-coded instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113513 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix this comment.
Dan Gohman [Thu, 9 Sep 2010 18:04:22 +0000 (18:04 +0000)]
Fix this comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113511 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMCELF: Write relocation fragments in the right endian.
Benjamin Kramer [Thu, 9 Sep 2010 18:01:29 +0000 (18:01 +0000)]
MCELF: Write relocation fragments in the right endian.

- This code is gross, but does the job for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113509 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake ELF OS ABI dependent on the OS from target triple.
Roman Divacky [Thu, 9 Sep 2010 17:57:50 +0000 (17:57 +0000)]
Make ELF OS ABI dependent on the OS from target triple.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113508 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agobuild: Allow subdir Makefiles to provide an alternate location for the SRCDIR
Daniel Dunbar [Thu, 9 Sep 2010 17:38:11 +0000 (17:38 +0000)]
build: Allow subdir Makefiles to provide an alternate location for the SRCDIR
Makefile, which can be used to allow building out of tree sources.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113503 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMove remaining MMX instructions from SSE to MMX.
Dale Johannesen [Thu, 9 Sep 2010 17:13:07 +0000 (17:13 +0000)]
Move remaining MMX instructions from SSE to MMX.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113501 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRefactor code-size reduction estimation methods out of InlineCostAnalyzer and into...
Owen Anderson [Thu, 9 Sep 2010 16:56:42 +0000 (16:56 +0000)]
Refactor code-size reduction estimation methods out of InlineCostAnalyzer and into CodeMetrics.  They
don't use any InlineCostAnalyzer state, and are useful for other clients who don't necessarily want to use
all of InlineCostAnalyzer's logic, some of which is fairly inlining-specific.

No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113499 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMC: Give a (lame) hard error if a .org directive would create an unreasonably
Daniel Dunbar [Thu, 9 Sep 2010 16:23:33 +0000 (16:23 +0000)]
MC: Give a (lame) hard error if a .org directive would create an unreasonably
large object file (> 1GB).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113494 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agotests: XFAIL a handful of tests on the vg_leak builder, so we can get back to
Daniel Dunbar [Thu, 9 Sep 2010 15:50:19 +0000 (15:50 +0000)]
tests: XFAIL a handful of tests on the vg_leak builder, so we can get back to

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113491 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoprojects: Don't try to build libcxx if one happens to have it checked out into
Daniel Dunbar [Thu, 9 Sep 2010 15:49:32 +0000 (15:49 +0000)]
projects: Don't try to build libcxx if one happens to have it checked out into

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113490 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd an elf-dumper utility.
Benjamin Kramer [Thu, 9 Sep 2010 15:00:41 +0000 (15:00 +0000)]
Add an elf-dumper utility.

- Output format and some of the code stolen from macho-dump.
- Somewhat incomplete and probably buggy.
- Comes with a very basic test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113488 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agolib/System/Host.cpp: 7bit-ize. Eliminate "TM" and "(R)" in comments.
NAKAMURA Takumi [Thu, 9 Sep 2010 13:30:48 +0000 (13:30 +0000)]
lib/System/Host.cpp: 7bit-ize. Eliminate "TM" and "(R)" in comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113486 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoGet rid of the last use of -m64 in FrontendC. This solution
Duncan Sands [Thu, 9 Sep 2010 12:57:29 +0000 (12:57 +0000)]
Get rid of the last use of -m64 in FrontendC.  This solution
of checking for either 4 or 8 is not very satisfactory, but
it would catch the original problem (an alignment of 1).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113485 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAnother test that uses -m64. Here too it looks like it can be
Duncan Sands [Thu, 9 Sep 2010 12:48:04 +0000 (12:48 +0000)]
Another test that uses -m64.  Here too it looks like it can be
removed.  Not that the XTARGET wasn't doing anything since it
does nothing without an accompanying XFAIL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113484 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoOn i386, llvm-gcc cannot be assumed to support -m64. Since these
Duncan Sands [Thu, 9 Sep 2010 12:43:44 +0000 (12:43 +0000)]
On i386, llvm-gcc cannot be assumed to support -m64.  Since these
tests pass here (i686-linux and x86-64-linux) without -m64, simply
remove the -m64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113483 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThis script is executable.
Duncan Sands [Thu, 9 Sep 2010 09:37:54 +0000 (09:37 +0000)]
This script is executable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113479 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSilence compiler warning.
Kalle Raiskila [Thu, 9 Sep 2010 07:30:15 +0000 (07:30 +0000)]
Silence compiler warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113478 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix NEON VLD pseudo instruction itineraries that were incorrectly copied from
Bob Wilson [Thu, 9 Sep 2010 05:40:26 +0000 (05:40 +0000)]
Fix NEON VLD pseudo instruction itineraries that were incorrectly copied from
the VST pseudos.  The VLD/VST scheduling still needs work (see pr6722), but
at least we shouldn't confuse the loads with the stores.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113473 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoNuke whitespace and fix some indenting.
Eric Christopher [Thu, 9 Sep 2010 01:06:51 +0000 (01:06 +0000)]
Nuke whitespace and fix some indenting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113463 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMove most MMX instructions (defined as anything that
Dale Johannesen [Thu, 9 Sep 2010 01:02:39 +0000 (01:02 +0000)]
Move most MMX instructions (defined as anything that
uses MMX, even if it also uses other things) from InstrSSE
into InstrMMX.  No (intended) functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113462 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoHandle 64-bit floating point binops as well.
Eric Christopher [Thu, 9 Sep 2010 01:02:03 +0000 (01:02 +0000)]
Handle 64-bit floating point binops as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113461 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoBasic 32-bit FP operations.
Eric Christopher [Thu, 9 Sep 2010 00:53:57 +0000 (00:53 +0000)]
Basic 32-bit FP operations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113459 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFor double-spaced VLD3/VLD4 instructions, copy the explicit super-register use
Bob Wilson [Thu, 9 Sep 2010 00:38:32 +0000 (00:38 +0000)]
For double-spaced VLD3/VLD4 instructions, copy the explicit super-register use
operand from the pseudo instruction to the new instruction as an implicit use.
This will preserve any other flags (e.g., kill) on the operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113456 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoHandle float->double extension.
Eric Christopher [Thu, 9 Sep 2010 00:26:48 +0000 (00:26 +0000)]
Handle float->double extension.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113455 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRewrite TargetMaterializeConstant splitting it out into two functions
Eric Christopher [Thu, 9 Sep 2010 00:19:41 +0000 (00:19 +0000)]
Rewrite TargetMaterializeConstant splitting it out into two functions
for integer and fp constants. Implement todo to use vfp3 instructions
to materialize easy constants if we can.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113453 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSimplify copying over operands from pseudo NEON load/store instructions.
Bob Wilson [Thu, 9 Sep 2010 00:15:32 +0000 (00:15 +0000)]
Simplify copying over operands from pseudo NEON load/store instructions.
For VLD3/VLD4 with double-spaced registers, add the implicit use of the
super register for both the instruction loading the even registers and the
instruction loading the odd registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113452 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRearrange for better alignment and less padding
Jakob Stoklund Olesen [Wed, 8 Sep 2010 23:54:00 +0000 (23:54 +0000)]
Rearrange for better alignment and less padding

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113445 91177308-0d34-0410-b5e6-96231b3b80d8