oota-llvm.git
14 years agoFix vmov.f64 disassembly on targets where sizeof(long) != 8.
Benjamin Kramer [Fri, 17 Sep 2010 23:48:07 +0000 (23:48 +0000)]
Fix vmov.f64 disassembly on targets where sizeof(long) != 8.

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

14 years agoAdd MC-inst handling for tPICADD
Jim Grosbach [Fri, 17 Sep 2010 23:41:53 +0000 (23:41 +0000)]
Add MC-inst handling for tPICADD

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

14 years agoAdd target-specific DAG combiner for BUILD_VECTOR and VMOVRRD. An i64
Bob Wilson [Fri, 17 Sep 2010 22:59:05 +0000 (22:59 +0000)]
Add target-specific DAG combiner for BUILD_VECTOR and VMOVRRD.  An i64
value should be in GPRs when it's going to be used as a scalar, and we use
VMOVRRD to make that happen, but if the value is converted back to a vector
we need to fold to a simple bit_convert.  Radar 8407927.

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

14 years agoTeach the (non-MC) instruction printer to use the cannonical names for push/pop,
Jim Grosbach [Fri, 17 Sep 2010 22:36:38 +0000 (22:36 +0000)]
Teach the (non-MC) instruction printer to use the cannonical names for push/pop,
and shift instructions on ARM. Update the tests to match.

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

14 years agoAvoid relocations in a common case.
Rafael Espindola [Fri, 17 Sep 2010 22:34:41 +0000 (22:34 +0000)]
Avoid relocations in a common case.

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

14 years agoTeach machine sink to
Evan Cheng [Fri, 17 Sep 2010 22:28:18 +0000 (22:28 +0000)]
Teach machine sink to
1) Do forward copy propagation. This makes it easier to estimate the cost of the
   instruction being sunk.
2) Break critical edges on demand, including cases where the value is used by
   PHI nodes.
Critical edge splitting is not yet enabled by default.

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

14 years agoRework arm fast isel branch and compare code.
Eric Christopher [Fri, 17 Sep 2010 22:28:18 +0000 (22:28 +0000)]
Rework arm fast isel branch and compare code.

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

14 years agoMachine CSE was forgetting to clear some data structures.
Evan Cheng [Fri, 17 Sep 2010 21:59:42 +0000 (21:59 +0000)]
Machine CSE was forgetting to clear some data structures.

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

14 years agoUpdate tests to handle MC-inst instruction printing of shift operations. The
Jim Grosbach [Fri, 17 Sep 2010 21:58:46 +0000 (21:58 +0000)]
Update tests to handle MC-inst instruction printing of shift operations. The
legacy asm printer uses instructions of the form, "mov r0, r0, lsl #3", while
the MC-instruction printer uses the form "lsl r0, r0, #3". The latter mnemonic
is correct and preferred according the ARM documentation (A8.6.98). The former
are pseudo-instructions for the latter.

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

14 years agoFix a potential bug that can cause miscomparison with and without debug info.
Evan Cheng [Fri, 17 Sep 2010 21:56:26 +0000 (21:56 +0000)]
Fix a potential bug that can cause miscomparison with and without debug info.

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

14 years agoDon't include <fenv.h> now that we have llvm/System/FEnv.h.
Jakob Stoklund Olesen [Fri, 17 Sep 2010 21:47:03 +0000 (21:47 +0000)]
Don't include <fenv.h> now that we have llvm/System/FEnv.h.

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

14 years agoFileCheck-ize
Jim Grosbach [Fri, 17 Sep 2010 21:46:16 +0000 (21:46 +0000)]
FileCheck-ize

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

14 years agoHook up verbose asm comment printing for SOImm operands in MC printer
Jim Grosbach [Fri, 17 Sep 2010 21:33:25 +0000 (21:33 +0000)]
Hook up verbose asm comment printing for SOImm operands in MC printer

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

14 years agotrailing whitespace
Jim Grosbach [Fri, 17 Sep 2010 21:25:10 +0000 (21:25 +0000)]
trailing whitespace

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

14 years agotrailing whitespace
Jim Grosbach [Fri, 17 Sep 2010 21:23:56 +0000 (21:23 +0000)]
trailing whitespace

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

14 years agoMove thumb2 tests to the thumb2 directory
Jim Grosbach [Fri, 17 Sep 2010 20:34:09 +0000 (20:34 +0000)]
Move thumb2 tests to the thumb2 directory

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

14 years agocmake: test for the presence of fenv.h
Oscar Fuentes [Fri, 17 Sep 2010 20:30:48 +0000 (20:30 +0000)]
cmake: test for the presence of fenv.h

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

14 years agotweak test to check instructions rather than relying on the comment string
Jim Grosbach [Fri, 17 Sep 2010 20:27:26 +0000 (20:27 +0000)]
tweak test to check instructions rather than relying on the comment string

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

14 years agoFix this test to avoid an "inexact" fold.
Dan Gohman [Fri, 17 Sep 2010 20:25:43 +0000 (20:25 +0000)]
Fix this test to avoid an "inexact" fold.

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

14 years agoAvoid emitting a PIC base register if no PIC addresses are needed.
Dan Gohman [Fri, 17 Sep 2010 20:24:24 +0000 (20:24 +0000)]
Avoid emitting a PIC base register if no PIC addresses are needed.
This fixes rdar://8396318.

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

14 years agotweak test to check instructions rather than relying on the comment string
Jim Grosbach [Fri, 17 Sep 2010 20:21:03 +0000 (20:21 +0000)]
tweak test to check instructions rather than relying on the comment string

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

14 years agotweak test to check instructions rather than relying on the comment string
Jim Grosbach [Fri, 17 Sep 2010 20:17:41 +0000 (20:17 +0000)]
tweak test to check instructions rather than relying on the comment string

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

14 years agoFix this test so that folding doesn't depend on a potentially
Dan Gohman [Fri, 17 Sep 2010 20:15:53 +0000 (20:15 +0000)]
Fix this test so that folding doesn't depend on a potentially
"inexact" result.

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

14 years agoRegenerate.
Dan Gohman [Fri, 17 Sep 2010 20:08:35 +0000 (20:08 +0000)]
Regenerate.

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

14 years agoAttempt to support platforms which don't have fenv.h.
Dan Gohman [Fri, 17 Sep 2010 20:06:27 +0000 (20:06 +0000)]
Attempt to support platforms which don't have fenv.h.

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

14 years agoAdd skeleton infrastructure for the ARMMCCodeEmitter class. Patch by Jason Kim!
Jim Grosbach [Fri, 17 Sep 2010 18:46:17 +0000 (18:46 +0000)]
Add skeleton infrastructure for the ARMMCCodeEmitter class. Patch by Jason Kim!

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

14 years agohandle the upper16/lower16 target operand flags on symbol references for MC
Jim Grosbach [Fri, 17 Sep 2010 18:25:25 +0000 (18:25 +0000)]
handle the upper16/lower16 target operand flags on symbol references for MC
instruction lowering.

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

14 years agofix rdar://8444631 - encoder crash on 'enter'
Chris Lattner [Fri, 17 Sep 2010 18:02:29 +0000 (18:02 +0000)]
fix rdar://8444631 - encoder crash on 'enter'
What a weird instruction.

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

14 years agofix comments; patch by Edmund Grimley-Evans\!
Gabor Greif [Fri, 17 Sep 2010 17:52:00 +0000 (17:52 +0000)]
fix comments; patch by Edmund Grimley-Evans\!

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

14 years agoSome of the tests build an executable with llvm-gcc. For this to work, llvm-gcc
Duncan Sands [Fri, 17 Sep 2010 17:05:27 +0000 (17:05 +0000)]
Some of the tests build an executable with llvm-gcc.  For this to work, llvm-gcc
needs to find some libraries, which may require searching the directories given
by LIBRARY_PATH on curiously configured systems.  So pass on LIBRARY_PATH.

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

14 years agoFix an MSVC warning.
Daniel Dunbar [Fri, 17 Sep 2010 16:34:24 +0000 (16:34 +0000)]
Fix an MSVC warning.

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

14 years agoexpand PICLDR MC lowering to handle other PICLDR and PICSTR versions.
Jim Grosbach [Fri, 17 Sep 2010 16:25:52 +0000 (16:25 +0000)]
expand PICLDR MC lowering to handle other PICLDR and PICSTR versions.

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

14 years agoMC/Mach-O/i386: Fix a crash in relocation handling.
Daniel Dunbar [Fri, 17 Sep 2010 15:21:50 +0000 (15:21 +0000)]
MC/Mach-O/i386: Fix a crash in relocation handling.

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

14 years agoMove the declaration SetInformationJobObject() outside of namespace.
NAKAMURA Takumi [Fri, 17 Sep 2010 11:14:18 +0000 (11:14 +0000)]
Move the declaration SetInformationJobObject() outside of namespace.

It is also workaround for PR7927.

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

14 years agoAlphaSchedule.td: 7bit-ize.
NAKAMURA Takumi [Fri, 17 Sep 2010 09:56:43 +0000 (09:56 +0000)]
AlphaSchedule.td: 7bit-ize.

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

14 years agodocs: Update GettingStartedVS to reflect current state.
Michael J. Spencer [Fri, 17 Sep 2010 06:33:20 +0000 (06:33 +0000)]
docs: Update GettingStartedVS to reflect current state.

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

14 years agoSystem: Don't reexport ___eprintf when building with Clang; this symbol isn't
Daniel Dunbar [Fri, 17 Sep 2010 04:25:24 +0000 (04:25 +0000)]
System: Don't reexport ___eprintf when building with Clang; this symbol isn't
used on Darwin anymore, and Clang might not always link with the library it is
currently found in.

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

14 years agotests/CMakeLists.txt: use `configure_file' instead of `sed'.
Oscar Fuentes [Fri, 17 Sep 2010 03:22:21 +0000 (03:22 +0000)]
tests/CMakeLists.txt: use `configure_file' instead of `sed'.

The Windows users will appreciate this.

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

14 years agoMC/AsmParser: Add support for 'a + 4@GOTPCREL' and friends, by reconsing the
Daniel Dunbar [Fri, 17 Sep 2010 02:47:07 +0000 (02:47 +0000)]
MC/AsmParser: Add support for 'a + 4@GOTPCREL' and friends, by reconsing the
expression to include the modifier.
 - Gross, but this a corner case we don't expect to see often in practice, but
   it is worth accepting.
 - Also improves diagnostics on invalid modifiers.

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

14 years agoUpdated GettingStartedVS.html to reflect current state.
Oscar Fuentes [Fri, 17 Sep 2010 02:17:13 +0000 (02:17 +0000)]
Updated GettingStartedVS.html to reflect current state.

Reorganized it too.

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

14 years agoFix the folding of floating-point math library calls, like sin(infinity),
Dan Gohman [Fri, 17 Sep 2010 01:38:06 +0000 (01:38 +0000)]
Fix the folding of floating-point math library calls, like sin(infinity),
so that it detects errors on platforms where libm doesn't set errno.
It's still subject to host libm details though.

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

14 years agoUpdated LLVMLibDeps.cmake
Oscar Fuentes [Fri, 17 Sep 2010 00:43:53 +0000 (00:43 +0000)]
Updated LLVMLibDeps.cmake

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

14 years agoAdd an #include of raw_ostream.h. Previously, this only compiled
Dan Gohman [Fri, 17 Sep 2010 00:33:43 +0000 (00:33 +0000)]
Add an #include of raw_ostream.h. Previously, this only compiled
because it was using Twine.h's declaration of operator<<(const Twine &).

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

14 years agoAdd "pointer to x86mmx" type to the intrinsics.
Bill Wendling [Fri, 17 Sep 2010 00:33:03 +0000 (00:33 +0000)]
Add "pointer to x86mmx" type to the intrinsics.

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

14 years agoDirect CMake users to the right place for up-to-date info about using
Oscar Fuentes [Fri, 17 Sep 2010 00:30:52 +0000 (00:30 +0000)]
Direct CMake users to the right place for up-to-date info about using
LLVM libraries.

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

14 years agoAllow the PassRegistry mutex to be lazily initialized, and clean up the global namesp...
Owen Anderson [Thu, 16 Sep 2010 23:44:50 +0000 (23:44 +0000)]
Allow the PassRegistry mutex to be lazily initialized, and clean up the global namespace at the same time.

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

14 years agoDo not expose the locking for the PassRegistry in the header. Be careful to
Owen Anderson [Thu, 16 Sep 2010 23:32:35 +0000 (23:32 +0000)]
Do not expose the locking for the PassRegistry in the header.  Be careful to
synchronize any method that might lazily initialize the pImpl.

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

14 years agoUpdate CMake build.
Benjamin Kramer [Thu, 16 Sep 2010 23:06:18 +0000 (23:06 +0000)]
Update CMake build.

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

14 years agoRename a variable to avoid a declaration conflict.
Dan Gohman [Thu, 16 Sep 2010 22:50:09 +0000 (22:50 +0000)]
Rename a variable to avoid a declaration conflict.

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

14 years agoAdd a pass which prints out all the memdep dependencies.
Dan Gohman [Thu, 16 Sep 2010 22:08:32 +0000 (22:08 +0000)]
Add a pass which prints out all the memdep dependencies.

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

14 years agoIf FE forgot to provide a file name (usually it uses "stdin" as name in such situatio...
Devang Patel [Thu, 16 Sep 2010 20:57:49 +0000 (20:57 +0000)]
If FE forgot to provide a file name (usually it uses "stdin" as name in such situation) then make one up to ensure that debug info is not malformed.

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

14 years agoRevert r114097, adding back in the assertion against replacing an Instruction by...
Owen Anderson [Thu, 16 Sep 2010 20:51:41 +0000 (20:51 +0000)]
Revert r114097, adding back in the assertion against replacing an Instruction by itself.  Now that CorrelatedValuePropagation is
more careful not to call SimplifyInstructionsInBlock() on an unreachable block, the issue has been fixed at a higher level.  Add
a big warning to SimplifyInstructionsInBlock() to hopefully prevent this in the future.

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

14 years agofix rdar://8438816 - unrecognized 'fildq' instruction
Chris Lattner [Thu, 16 Sep 2010 20:46:38 +0000 (20:46 +0000)]
fix rdar://8438816 - unrecognized 'fildq' instruction

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

14 years agoPrint the address of sections as 0 and create the metadata sections in the
Rafael Espindola [Thu, 16 Sep 2010 19:46:31 +0000 (19:46 +0000)]
Print the address of sections as 0 and create the metadata sections in the
same order as gnu as.

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

14 years agoAdd missing RUN line to this test.
Owen Anderson [Thu, 16 Sep 2010 18:46:23 +0000 (18:46 +0000)]
Add missing RUN line to this test.

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

14 years agoUse a depth-first iteratation in CorrelatedValuePropagation to avoid wasting time...
Owen Anderson [Thu, 16 Sep 2010 18:35:07 +0000 (18:35 +0000)]
Use a depth-first iteratation in CorrelatedValuePropagation to avoid wasting time trying
to optimize unreachable blocks.

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

14 years agoWhen substituting sunkaddrs into indirect arguments an asm, we were
Dale Johannesen [Thu, 16 Sep 2010 18:30:55 +0000 (18:30 +0000)]
When substituting sunkaddrs into indirect arguments an asm, we were
walking the asm arguments once and stashing their Values.  This is
wrong because the same memory location can be in the list twice, and
if the first one has a sunkaddr substituted, the stashed value for the
second one will be wrong (use-after-free).  PR 8154.

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

14 years agoIt is possible, under specific circumstances involving ptrtoint ConstantExpr's, for...
Owen Anderson [Thu, 16 Sep 2010 18:28:33 +0000 (18:28 +0000)]
It is possible, under specific circumstances involving ptrtoint ConstantExpr's, for LVI to end up trying to merge
a Constant into a ConstantRange.  Handle this conservatively for now, rather than asserting.  The testcase is
more complex that I would like, but the manifestation of the problem is sensitive to iteration orders and the state of the
LVI cache, and I have not been able to reproduce it with manually constructed or simplified cases.

Fixes PR8162.

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

14 years agomake this non brain dead...
Jim Grosbach [Thu, 16 Sep 2010 17:48:08 +0000 (17:48 +0000)]
make this non brain dead...

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

14 years agoRemove unnecessary by-reference return.
Jim Grosbach [Thu, 16 Sep 2010 17:45:21 +0000 (17:45 +0000)]
Remove unnecessary by-reference return.

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

14 years agoMC-ization of the PICLDR pseudo. Next up, adding the other variants
Jim Grosbach [Thu, 16 Sep 2010 17:43:25 +0000 (17:43 +0000)]
MC-ization of the PICLDR pseudo. Next up, adding the other variants
(PICLDRB, et. al.) and PICSTR*

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

14 years agoFix PR8161, in which an unreachable loop causes recursive instruction simplification...
Owen Anderson [Thu, 16 Sep 2010 17:42:36 +0000 (17:42 +0000)]
Fix PR8161, in which an unreachable loop causes recursive instruction simplification to try
to replace an instruction with itself.  Add a predicate to the simplifier to prevent this case.

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

14 years agoMake sure to promote single precision floats to double before extracting them
Jim Grosbach [Thu, 16 Sep 2010 17:37:30 +0000 (17:37 +0000)]
Make sure to promote single precision floats to double before extracting them
from the APFloat.

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

14 years agoMake sure that names like .note.GNU-stack are accepted as valid section names.
Rafael Espindola [Thu, 16 Sep 2010 17:05:55 +0000 (17:05 +0000)]
Make sure that names like .note.GNU-stack are accepted as valid section names.

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

14 years agoAdd support for the .zero directive.
Rafael Espindola [Thu, 16 Sep 2010 15:03:59 +0000 (15:03 +0000)]
Add support for the .zero directive.

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

14 years agoChange SPU register re-interpretations from OR to COPY_TO_REGCLASS instruction.
Kalle Raiskila [Thu, 16 Sep 2010 12:29:33 +0000 (12:29 +0000)]
Change SPU register re-interpretations from OR to COPY_TO_REGCLASS instruction.

This cleans up after the mess r108567 left in the CellSPU backend.
ORCvt-instruction were used to reinterpret registers, and the ORs were then
removed by isMoveInstr(). This patch now removes 350 instrucions of format:
or $3, $3, $3
(from the 52 testcases in CodeGen/CellSPU). One case of a nonexistant or is
checked for.

Some moves of the form 'ori $., $., 0' and 'ai $., $., 0' still remain.

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

14 years agoAdd better support for environment portion of triple. Original patch by
Duncan Sands [Thu, 16 Sep 2010 08:25:48 +0000 (08:25 +0000)]
Add better support for environment portion of triple.  Original patch by
Cameron Esfahani, tweaked to use array_lengthof.

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

14 years agoSome versions of gcc still warn about "ignoring return value ... declared
Duncan Sands [Thu, 16 Sep 2010 08:20:49 +0000 (08:20 +0000)]
Some versions of gcc still warn about "ignoring return value ... declared
with attribute warn_unused_result" here - suppress the warning harder.

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

14 years agoRemove support for "dregpair" operand modifier, now that it is no longer being
Bob Wilson [Thu, 16 Sep 2010 04:55:00 +0000 (04:55 +0000)]
Remove support for "dregpair" operand modifier, now that it is no longer being
used for anything.

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

14 years agoWhen expanding ARM pseudo registers, copy the existing predicate operands
Bob Wilson [Thu, 16 Sep 2010 04:25:37 +0000 (04:25 +0000)]
When expanding ARM pseudo registers, copy the existing predicate operands
instead of using default predicates on the expanded instructions.

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

14 years agostore MC FP immediates as a double instead of as an APFloat, thus avoiding an
Jim Grosbach [Thu, 16 Sep 2010 03:45:21 +0000 (03:45 +0000)]
store MC FP immediates as a double instead of as an APFloat, thus avoiding an
unnecessary dtor for MCOperand.

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

14 years agollvm-mc: Teach -as-lex to print more token kinds.
Daniel Dunbar [Thu, 16 Sep 2010 00:42:35 +0000 (00:42 +0000)]
llvm-mc: Teach -as-lex to print more token kinds.

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

14 years agobuild: Add support for a TOOL_ORDER_FILE variable so commands can build with an
Daniel Dunbar [Thu, 16 Sep 2010 00:42:32 +0000 (00:42 +0000)]
build: Add support for a TOOL_ORDER_FILE variable so commands can build with an
order file on Darwin.

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

14 years agoAdd missing break.
Bob Wilson [Thu, 16 Sep 2010 00:31:32 +0000 (00:31 +0000)]
Add missing break.

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

14 years agoChange VLDMQ and VSTMQ to be pseudo instructions. They are expanded after
Bob Wilson [Thu, 16 Sep 2010 00:31:02 +0000 (00:31 +0000)]
Change VLDMQ and VSTMQ to be pseudo instructions.  They are expanded after
register allocation to VLDMD and VSTMD respectively.  This avoids using the
dregpair operand modifier.

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

14 years agoFix a threaded LLVM bug due the need for operator= on reference counted AttrListImpl...
Owen Anderson [Thu, 16 Sep 2010 00:27:35 +0000 (00:27 +0000)]
Fix a threaded LLVM bug due the need for operator= on reference counted AttrListImpl's.  It might
be possible to implement this very carefully to allow a lock-free implementation while still
avoiding illegal interleavings, but I haven't been able to figure one out.

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

14 years agoUse the value mapping provided by LiveIntervalMap. This simplifies the code a
Jakob Stoklund Olesen [Thu, 16 Sep 2010 00:01:36 +0000 (00:01 +0000)]
Use the value mapping provided by LiveIntervalMap. This simplifies the code a
great deal because we don't have to worry about maintaining SSA form.

Unconditionally copy back to dupli when the register is live out of the split
range, even if the live-out value was defined outside the range. Skipping the
back-copy only makes sense when the live range is going to spill outside the
split range, and we don't know that it will. Besides, this was a hack to avoid
SSA update issues.

Clear up some confusion about the end point of a half-open LiveRange. Methinks
LiveRanges need to be closed so both start and end are included in the range.
The low bits of a SlotIndex are symbolic, so a half-open range doesn't really
make sense. This would be a pervasive change, though.

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

14 years agoSystem/Path: Add x86-64 COFF to IdentifyFileType.
Michael J. Spencer [Wed, 15 Sep 2010 23:04:14 +0000 (23:04 +0000)]
System/Path: Add x86-64 COFF to IdentifyFileType.

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

14 years agoSince PassRegistry is currently a shared global object, it needs locking. While...
Owen Anderson [Wed, 15 Sep 2010 23:03:33 +0000 (23:03 +0000)]
Since PassRegistry is currently a shared global object, it needs locking.  While it might intuitively seem
that all the setup of this class currently happens at static initialization time, this misses the fact
that some later events can cause mutation of the PassRegistrationListeners list, and thus cause race issues.

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

14 years agoSystem/Path: Add isObjectFile().
Michael J. Spencer [Wed, 15 Sep 2010 22:45:45 +0000 (22:45 +0000)]
System/Path: Add isObjectFile().

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

14 years agoAdd support for the 'lane' modifier on vdup operands
Jim Grosbach [Wed, 15 Sep 2010 22:13:23 +0000 (22:13 +0000)]
Add support for the 'lane' modifier on vdup operands

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

14 years agoadd a test of an edge case value for the FP immediate (needs all digits of
Jim Grosbach [Wed, 15 Sep 2010 21:52:13 +0000 (21:52 +0000)]
add a test of an edge case value for the FP immediate (needs all digits of
precision)

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

14 years agoAdd a InitSections method to the streamer interface.
Rafael Espindola [Wed, 15 Sep 2010 21:48:40 +0000 (21:48 +0000)]
Add a InitSections method to the streamer interface.

The ELF implementation now creates text, data and bss to match the gnu as
behavior.

The text streamer still has the old MachO specific behavior since
the testsuite checks that it will error when a directive is given
before a setting the current section for example.

A nice benefit is that -n is not required anymore when producing
ELF files.

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

14 years agoRemember VLDMQ.
Jakob Stoklund Olesen [Wed, 15 Sep 2010 21:40:11 +0000 (21:40 +0000)]
Remember VLDMQ.

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

14 years agoAdd missing break.
Jakob Stoklund Olesen [Wed, 15 Sep 2010 21:40:09 +0000 (21:40 +0000)]
Add missing break.

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

14 years agoTeach the MC disassembler to handle vmov.f32 and vmov.f64 immediate to register
Jim Grosbach [Wed, 15 Sep 2010 21:04:54 +0000 (21:04 +0000)]
Teach the MC disassembler to handle vmov.f32 and vmov.f64 immediate to register
moves. Previously, the immediate was printed as the encoded integer value,
which is incorrect.

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

14 years agomove getRegisterNumbering() to out of ARMBaseRegisterInfo into the helper
Jim Grosbach [Wed, 15 Sep 2010 20:26:25 +0000 (20:26 +0000)]
move getRegisterNumbering() to out of ARMBaseRegisterInfo into the helper
functions in ARMBaseInfo.h so it can be used in the MC library as well.
For anything bigger than this, we may want a means to have a small support
library for shared helper functions like this. Cross that bridge when we
come to it.

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

14 years agoPR7959: Handle negative scales in GEPs correctly in BasicAA for non-64-bit
Eli Friedman [Wed, 15 Sep 2010 20:08:03 +0000 (20:08 +0000)]
PR7959: Handle negative scales in GEPs correctly in BasicAA for non-64-bit
targets.

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

14 years agosimplify getRegisterNumbering(). Remove the unused isSPVFP argument and
Jim Grosbach [Wed, 15 Sep 2010 19:52:17 +0000 (19:52 +0000)]
simplify getRegisterNumbering(). Remove the unused isSPVFP argument and
merge the common cases.

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

14 years agoRefactor uses of getRegisterNumbering() to not need the isSPVFP argument. Check
Jim Grosbach [Wed, 15 Sep 2010 19:44:57 +0000 (19:44 +0000)]
Refactor uses of getRegisterNumbering() to not need the isSPVFP argument. Check
if the register is a member of the SPR register class directly instead.

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

14 years agoReduce dependencies in the ARM MC instruction printer.
Jim Grosbach [Wed, 15 Sep 2010 19:27:50 +0000 (19:27 +0000)]
Reduce dependencies in the ARM MC instruction printer.

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

14 years agoFix spelling typo.
Jim Grosbach [Wed, 15 Sep 2010 19:26:50 +0000 (19:26 +0000)]
Fix spelling typo.

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

14 years agoFactor out basic enums and hleper functions from ARM.h for cleaner sharing
Jim Grosbach [Wed, 15 Sep 2010 19:26:06 +0000 (19:26 +0000)]
Factor out basic enums and hleper functions from ARM.h for cleaner sharing
between the compiler back end and the MC libraries.

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

14 years agoAdd support for floating point immediates to MC instruction printing. ARM
Jim Grosbach [Wed, 15 Sep 2010 18:47:08 +0000 (18:47 +0000)]
Add support for floating point immediates to MC instruction printing. ARM
VFP instructions use it for loading some constants, so implement that
handling.

Not thrilled with adding a member to MCOperand, but not sure there's much of
a better option that's not pretty fragile (like putting a double in the
union instead and just assuming that's good enough). Suggestions welcome...

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

14 years agoCheck bb to ensure that alloca is in separate basic block.
Devang Patel [Wed, 15 Sep 2010 18:13:55 +0000 (18:13 +0000)]
Check bb to ensure that alloca is in separate basic block.
This fixes funcargs.exp regression reported by gdb testsuite.

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

14 years agoRecognize VST1q64Pseudo and VSTMQ as stack slot stores.
Jakob Stoklund Olesen [Wed, 15 Sep 2010 17:27:09 +0000 (17:27 +0000)]
Recognize VST1q64Pseudo and VSTMQ as stack slot stores.
Recognize VLD1q64Pseudo as a stack slot load.

Reject these if they are loading or storing a subregister. The API (and
VirtRegRewriter) doesn't know how to deal with that.

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

14 years agoReapply Gabor's 113839, 113840, and 113876 with a fix for a problem
Bob Wilson [Wed, 15 Sep 2010 17:12:08 +0000 (17:12 +0000)]
Reapply Gabor's 113839, 113840, and 113876 with a fix for a problem
encountered while building llvm-gcc for arm.  This is probably the same issue
that the ppc buildbot hit. llvm::prior works on a MachineBasicBlock::iterator,
not a plain MachineInstr.

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

14 years agothe darwin9-powerpc buildbot keeps consistently crashing,
Gabor Greif [Wed, 15 Sep 2010 16:53:07 +0000 (16:53 +0000)]
the darwin9-powerpc buildbot keeps consistently crashing,
backing out following to get it back to green,
so I can investigate in peace:

svn merge -c -113840  llvm/test/CodeGen/ARM/arm-and-tst-peephole.ll
svn merge -c -113876 -c -113839 llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp

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

14 years agoMove ARM is{LoadFrom,StoreTo}StackSlot closer to their siblings so they won't be
Jakob Stoklund Olesen [Wed, 15 Sep 2010 16:36:26 +0000 (16:36 +0000)]
Move ARM is{LoadFrom,StoreTo}StackSlot closer to their siblings so they won't be
forgotten in the future.

Coalesce identical cases in switch.

No functional changes intended.

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

14 years agoSpelling fix.
Bob Wilson [Wed, 15 Sep 2010 16:28:21 +0000 (16:28 +0000)]
Spelling fix.

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