oota-llvm.git
14 years agorestrict dyn_cast_or_null to pointer types, just like cast_or_null
Gabor Greif [Sat, 18 Sep 2010 12:30:15 +0000 (12:30 +0000)]
restrict dyn_cast_or_null to pointer types, just like cast_or_null

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

14 years agodo not rely on the implicit-dereference semantics of dyn_cast_or_null
Gabor Greif [Sat, 18 Sep 2010 11:55:34 +0000 (11:55 +0000)]
do not rely on the implicit-dereference semantics of dyn_cast_or_null

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

14 years agodo not rely on the implicit-dereference semantics of dyn_cast_or_null
Gabor Greif [Sat, 18 Sep 2010 11:53:39 +0000 (11:53 +0000)]
do not rely on the implicit-dereference semantics of dyn_cast_or_null

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

14 years agoremove CallSite::get; it is still present (as protected) in the baseclass, use one...
Gabor Greif [Sat, 18 Sep 2010 11:48:36 +0000 (11:48 +0000)]
remove CallSite::get; it is still present (as protected) in the baseclass, use one of the constructors intead

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

14 years agoFixed non-const iterator error.
Lang Hames [Sat, 18 Sep 2010 09:49:08 +0000 (09:49 +0000)]
Fixed non-const iterator error.

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

14 years agoAdded a separate class (PBQPBuilder) for PBQP Problem construction. This class can...
Lang Hames [Sat, 18 Sep 2010 09:07:10 +0000 (09:07 +0000)]
Added a separate class (PBQPBuilder) for PBQP Problem construction. This class can be extended to support custom constraints.

For now the allocator still uses the old (internal) construction mechanism by default. This will be phased out soon assuming
no issues with the builder system come up.

To invoke the new construction mechanism just pass '-regalloc=pbqp -pbqp-builder' to llc. To provide custom constraints a
Target just needs to extend PBQPBuilder and pass an instance of their derived builder to the RegAllocPBQP constructor.

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

14 years agodocs: Tweak wording.
Michael J. Spencer [Sat, 18 Sep 2010 08:32:32 +0000 (08:32 +0000)]
docs: Tweak wording.

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

14 years agoFix code that break critical edges for PHI uses. Watch out for multiple PHIs in diffe...
Evan Cheng [Sat, 18 Sep 2010 06:42:17 +0000 (06:42 +0000)]
Fix code that break critical edges for PHI uses. Watch out for multiple PHIs in different blocks.

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

14 years agoInvert the logic of reachesChainWithoutSideEffects(). What we want to check is that...
Owen Anderson [Sat, 18 Sep 2010 04:45:14 +0000 (04:45 +0000)]
Invert the logic of reachesChainWithoutSideEffects().  What we want to check is that there is
NO path to the destination containing side effects, not that SOME path contains no side effects.
In  practice, this only manifests with CombinerAA enabled, because otherwise the chain has little
to no branching, so "any" is effectively equivalent to "all".

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

14 years agoThumb opcodes for thumb calls.
Eric Christopher [Sat, 18 Sep 2010 02:32:38 +0000 (02:32 +0000)]
Thumb opcodes for thumb calls.

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

14 years agolit: Bump version to 0.2.0dev, for no apparent reason.
Daniel Dunbar [Sat, 18 Sep 2010 02:28:15 +0000 (02:28 +0000)]
lit: Bump version to 0.2.0dev, for no apparent reason.

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

14 years agolit: Tweak setup.py.
Daniel Dunbar [Sat, 18 Sep 2010 02:28:12 +0000 (02:28 +0000)]
lit: Tweak setup.py.

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

14 years agolit: These TODOs are done(ish).
Daniel Dunbar [Sat, 18 Sep 2010 02:28:09 +0000 (02:28 +0000)]
lit: These TODOs are done(ish).

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

14 years agoAdd addrmode5 fp load support. Swap float/thumb operand adding to handle
Eric Christopher [Sat, 18 Sep 2010 01:59:37 +0000 (01:59 +0000)]
Add addrmode5 fp load support.  Swap float/thumb operand adding to handle
thumb with floating point.

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

14 years agoFloating point stores have a 3rd addressing mode type.
Eric Christopher [Sat, 18 Sep 2010 01:23:38 +0000 (01:23 +0000)]
Floating point stores have a 3rd addressing mode type.

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

14 years agoAdd test that was missing in my previous commit.
Rafael Espindola [Sat, 18 Sep 2010 00:37:27 +0000 (00:37 +0000)]
Add test that was missing in my previous commit.

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

14 years agofactor out a simple helper function to create a label for PC-relative
Jim Grosbach [Sat, 18 Sep 2010 00:05:05 +0000 (00:05 +0000)]
factor out a simple helper function to create a label for PC-relative
instructions (PICADD, PICLDR, et.al.)

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

14 years agoPC-relative pseudo instructions are lowered and printed directly. Any encounter
Jim Grosbach [Sat, 18 Sep 2010 00:04:53 +0000 (00:04 +0000)]
PC-relative pseudo instructions are lowered and printed directly. Any encounter
with one in the generic printing code is an error.

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

14 years agoAttempt to XFAIL this test on arm-linux, which is inexplicably failing.
Dan Gohman [Sat, 18 Sep 2010 00:04:37 +0000 (00:04 +0000)]
Attempt to XFAIL this test on arm-linux, which is inexplicably failing.

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

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