oota-llvm.git
14 years agoMake NEON ld/st pseudo instruction classes take the instruction itinerary as
Bob Wilson [Tue, 14 Sep 2010 20:59:49 +0000 (20:59 +0000)]
Make NEON ld/st pseudo instruction classes take the instruction itinerary as
an argument, so that we can distinguish instructions with the same register
classes but different numbers of registers (e.g., vld3 and vld4).  Fix some
of the non-pseudo NEON ld/st instruction itineraries to reflect the number
of registers loaded or stored, not just the opcode name.

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

14 years agoRemove the option to disable LazyValueInfo in JumpThreading, as it is now
Owen Anderson [Tue, 14 Sep 2010 20:57:41 +0000 (20:57 +0000)]
Remove the option to disable LazyValueInfo in JumpThreading, as it is now
on by default and has received significant testing.

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

14 years agoPrune includes.
Benjamin Kramer [Tue, 14 Sep 2010 20:49:00 +0000 (20:49 +0000)]
Prune includes.

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

14 years agoset comparable for a bunch of Thumb instructions
Gabor Greif [Tue, 14 Sep 2010 20:47:43 +0000 (20:47 +0000)]
set comparable for a bunch of Thumb instructions

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

14 years agomust not peephole away side effects
Gabor Greif [Tue, 14 Sep 2010 20:46:08 +0000 (20:46 +0000)]
must not peephole away side effects

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

14 years agoDon't ignore the CPSR implicit def when lowering a MachineInstruction to an MCInst.
Jim Grosbach [Tue, 14 Sep 2010 20:41:27 +0000 (20:41 +0000)]
Don't ignore the CPSR implicit def when lowering a MachineInstruction to an MCInst.

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

14 years agoClarify comment
Jim Grosbach [Tue, 14 Sep 2010 20:35:46 +0000 (20:35 +0000)]
Clarify comment

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

14 years agoAfter Dan's recent commit this is no longer true.
Devang Patel [Tue, 14 Sep 2010 20:32:58 +0000 (20:32 +0000)]
After Dan's recent commit this is no longer true.
Now isFunctionLocal is reset, if required,  when operands are modified.

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

14 years agoUse frame index, if available for byval argument while lowering dbg_declare. Otherwis...
Devang Patel [Tue, 14 Sep 2010 20:29:31 +0000 (20:29 +0000)]
Use frame index, if available for byval argument while lowering dbg_declare. Otherwise let getRegForValue() find register for this argument.

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

14 years agoforgot the testcase change for r113839
Gabor Greif [Tue, 14 Sep 2010 09:30:17 +0000 (09:30 +0000)]
forgot the testcase change for r113839

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

14 years agoEliminate a 'tst' that immediately follows an 'and'
Gabor Greif [Tue, 14 Sep 2010 09:23:22 +0000 (09:23 +0000)]
Eliminate a 'tst' that immediately follows an 'and'
by morphing the 'and' to its recording form 'andS'.

This is basically a test commit into this area, to
see whether the bots like me. Several generalizations
can be applied and various avenues of code simplification
are open. I'll introduce those as I go.

I am aware of stylistic input from Bill Wendling, about
where put the analysis complexity, but I am positive
that we can move things around easily and will find a
satisfactory solution.

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

14 years agotest for and-tst peephole optimization
Gabor Greif [Tue, 14 Sep 2010 08:50:43 +0000 (08:50 +0000)]
test for and-tst peephole optimization
documents the status-quo with its opportunities

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

14 years agoFix QOpcode assignment to Opc.
Eric Christopher [Tue, 14 Sep 2010 08:31:25 +0000 (08:31 +0000)]
Fix QOpcode assignment to Opc.

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

14 years agoCBackend: Fix MSVC build.
Michael J. Spencer [Tue, 14 Sep 2010 04:27:38 +0000 (04:27 +0000)]
CBackend: Fix MSVC build.

This may produce warnings on MSVS, but it's better than failures.

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

14 years agoCBackend: Cleanup whitespace before I do this next commit.
Michael J. Spencer [Tue, 14 Sep 2010 04:27:26 +0000 (04:27 +0000)]
CBackend: Cleanup whitespace before I do this next commit.

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

14 years agoWhen a function-local value with function-local metadata uses gets RAUWed with a
Dan Gohman [Tue, 14 Sep 2010 01:37:57 +0000 (01:37 +0000)]
When a function-local value with function-local metadata uses gets RAUWed with a
non-function-local value, it may result in the metadata no longer needing to be
function-local. Check for this condition, and clear the isFunctionLocal flag, if
it's still in the uniquing map, since any node in the uniquing map needs to have
an accurate function-local flag.

Also, add an assert to help catch problematic cases.

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

14 years agoRemove apparently unnecessary forward declaration.
Eric Christopher [Tue, 14 Sep 2010 01:18:15 +0000 (01:18 +0000)]
Remove apparently unnecessary forward declaration.

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

14 years agoAttempt to unbreak the FreeBSD buildbot by XFAILing a unit test that seems to be
Jakob Stoklund Olesen [Tue, 14 Sep 2010 00:51:58 +0000 (00:51 +0000)]
Attempt to unbreak the FreeBSD buildbot by XFAILing a unit test that seems to be
miscompiled by the system gcc-4.2.1

The test remains enabled for the second-stage test.

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

14 years agofix PR8102, a case where we'd copyValue from a value that we already
Chris Lattner [Tue, 14 Sep 2010 00:19:00 +0000 (00:19 +0000)]
fix PR8102, a case where we'd copyValue from a value that we already
deleted.  Fix this by doing the copyValue's before we delete stuff!

The testcase only repros the problem on my system with valgrind.

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

14 years agoRevert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."
Michael J. Spencer [Mon, 13 Sep 2010 23:59:48 +0000 (23:59 +0000)]
Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."

This reverts commit r113632

Conflicts:

cmake/modules/AddLLVM.cmake

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

14 years agoConvert some VTBL and VTBX instructions to use pseudo instructions prior to
Bob Wilson [Mon, 13 Sep 2010 23:55:10 +0000 (23:55 +0000)]
Convert some VTBL and VTBX instructions to use pseudo instructions prior to
register allocation.  Remove the NEONPreAllocPass, which is no longer needed.
Yeah!!

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

14 years agoMechanically replace LiveInterval* with LiveIntervalMap for intervals being
Jakob Stoklund Olesen [Mon, 13 Sep 2010 23:29:11 +0000 (23:29 +0000)]
Mechanically replace LiveInterval* with LiveIntervalMap for intervals being
edited without actually using LiveIntervalMap functionality.

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

14 years agoAllow LiveIntervalMap to be reused by resetting the current live interval.
Jakob Stoklund Olesen [Mon, 13 Sep 2010 23:29:09 +0000 (23:29 +0000)]
Allow LiveIntervalMap to be reused by resetting the current live interval.

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

14 years agoSwitch all the NEON vld-lane and vst-lane instructions over to the new
Bob Wilson [Mon, 13 Sep 2010 23:01:35 +0000 (23:01 +0000)]
Switch all the NEON vld-lane and vst-lane instructions over to the new
pseudo-instruction approach.  Change ARMExpandPseudoInsts to use a table
to record all the NEON load/store information.

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

14 years agoLet's just declare that it is impossible to construct a std::pair from a null
Jakob Stoklund Olesen [Mon, 13 Sep 2010 21:29:45 +0000 (21:29 +0000)]
Let's just declare that it is impossible to construct a std::pair from a null
pointer and work around that.

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

14 years agoFix typo in temp. script file name.
Devang Patel [Mon, 13 Sep 2010 21:23:17 +0000 (21:23 +0000)]
Fix typo in temp. script file name.

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

14 years agoFix typos. 128-bit PSHUFB takes 128-bit memory op.
Dale Johannesen [Mon, 13 Sep 2010 21:15:43 +0000 (21:15 +0000)]
Fix typos.  128-bit PSHUFB takes 128-bit memory op.
v8i16 is not an MMX type; put it where it belongs.

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

14 years agoBasic smoke test for new x86mmx type.
Dale Johannesen [Mon, 13 Sep 2010 21:01:36 +0000 (21:01 +0000)]
Basic smoke test for new x86mmx type.

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

14 years agoAdd little test script to check debug info.
Devang Patel [Mon, 13 Sep 2010 20:42:15 +0000 (20:42 +0000)]
Add little test script to check debug info.

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

14 years agoFix linux/msvc build, move include.
Benjamin Kramer [Mon, 13 Sep 2010 20:04:49 +0000 (20:04 +0000)]
Fix linux/msvc build, move include.

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

14 years agoAttempt to fix the Linux build.
Owen Anderson [Mon, 13 Sep 2010 19:47:32 +0000 (19:47 +0000)]
Attempt to fix the Linux build.

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

14 years agoMinimize #includes in a top-level header.
Owen Anderson [Mon, 13 Sep 2010 18:47:42 +0000 (18:47 +0000)]
Minimize #includes in a top-level header.

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

14 years agoSilence more warnings. Two more unused variables.
Eric Christopher [Mon, 13 Sep 2010 18:30:57 +0000 (18:30 +0000)]
Silence more warnings.  Two more unused variables.

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

14 years agoAdd a reduced testcase for the infinite loop fixed in r113763.
Owen Anderson [Mon, 13 Sep 2010 18:28:40 +0000 (18:28 +0000)]
Add a reduced testcase for the infinite loop fixed in r113763.

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

14 years agoRemove unused variable.
Eric Christopher [Mon, 13 Sep 2010 18:27:59 +0000 (18:27 +0000)]
Remove unused variable.

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

14 years agotrailing whitespace
Jim Grosbach [Mon, 13 Sep 2010 18:25:42 +0000 (18:25 +0000)]
trailing whitespace

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

14 years agoSilence some constructor ordering warnings.
Eric Christopher [Mon, 13 Sep 2010 18:25:05 +0000 (18:25 +0000)]
Silence some constructor ordering warnings.

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

14 years agoAdded skeleton for inline asm multiple alternative constraint support.
John Thompson [Mon, 13 Sep 2010 18:15:37 +0000 (18:15 +0000)]
Added skeleton for inline asm multiple alternative constraint support.

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

14 years agoUse ParseIRFile to auto-detect LLVM Assembly automatically.
Dan Gohman [Mon, 13 Sep 2010 18:02:47 +0000 (18:02 +0000)]
Use ParseIRFile to auto-detect LLVM Assembly automatically.

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

14 years agoAdd full auto-upgrade support for LLVM 2.7 bitcode metadata.
Dan Gohman [Mon, 13 Sep 2010 18:00:48 +0000 (18:00 +0000)]
Add full auto-upgrade support for LLVM 2.7 bitcode metadata.

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

14 years agoRe-apply r113679, which was reverted in r113720, which added a paid of new instcombin...
Owen Anderson [Mon, 13 Sep 2010 17:59:27 +0000 (17:59 +0000)]
Re-apply r113679, which was reverted in r113720, which added a paid of new instcombine transforms
to expose greater opportunities for store narrowing in codegen.  This patch fixes a potential
infinite loop in instcombine caused by one of the introduced transforms being overly aggressive.

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

14 years agoCMake: Add llvm-lit to CMake build.
Michael J. Spencer [Mon, 13 Sep 2010 17:52:38 +0000 (17:52 +0000)]
CMake: Add llvm-lit to CMake build.

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

14 years agoFactoring and potential bug fix. The elf "flags" cannot be used as masks.
Rafael Espindola [Mon, 13 Sep 2010 17:39:45 +0000 (17:39 +0000)]
Factoring and potential bug fix. The elf "flags" cannot be used as masks.
For example, setting STT_OBJECT (1) and STT_FUNC (2), should not produce
a STT_SECTION (3).

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

14 years agoFix formatting tags.
Bob Wilson [Mon, 13 Sep 2010 17:39:35 +0000 (17:39 +0000)]
Fix formatting tags.

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

14 years agoDocument NEON intrinsic changes for 2.8.
Bob Wilson [Mon, 13 Sep 2010 17:37:55 +0000 (17:37 +0000)]
Document NEON intrinsic changes for 2.8.

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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

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

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

14 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

14 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

14 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

14 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

14 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

14 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
string.

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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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
them.

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

14 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
about.

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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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