oota-llvm.git
13 years agoFix typo: Exectuable -> Executable
Peter Collingbourne [Wed, 17 Nov 2010 00:43:43 +0000 (00:43 +0000)]
Fix typo: Exectuable -> Executable

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

13 years agoUse new neon_vector_type and neon_polyvector_type attributes for Neon vectors.
Bob Wilson [Tue, 16 Nov 2010 23:57:06 +0000 (23:57 +0000)]
Use new neon_vector_type and neon_polyvector_type attributes for Neon vectors.

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

13 years agoChange Neon polynomial types to be signed to match GCC.
Bob Wilson [Tue, 16 Nov 2010 23:57:03 +0000 (23:57 +0000)]
Change Neon polynomial types to be signed to match GCC.

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

13 years agoRefactor to new GetNumElements function.
Bob Wilson [Tue, 16 Nov 2010 23:57:01 +0000 (23:57 +0000)]
Refactor to new GetNumElements function.
No functional change.

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

13 years agoUse the correct variable names so that the encodings will be correct.
Bill Wendling [Tue, 16 Nov 2010 23:44:49 +0000 (23:44 +0000)]
Use the correct variable names so that the encodings will be correct.

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

13 years agoReapply r118917. With pseudo-instruction expansion moved to
Dan Gohman [Tue, 16 Nov 2010 22:43:23 +0000 (22:43 +0000)]
Reapply r118917. With pseudo-instruction expansion moved to
a different pass, the complicated interaction between cmov expansion
and fast isel is no longer a concern.

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

13 years agoupdate coding standards. Partial specialization is now ok,
Chris Lattner [Tue, 16 Nov 2010 22:19:06 +0000 (22:19 +0000)]
update coding standards.  Partial specialization is now ok,
though possibly not a good idea.

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

13 years agoFix assembling X86CompilationCallback_Win64.asm on VS 10.
Oscar Fuentes [Tue, 16 Nov 2010 22:07:47 +0000 (22:07 +0000)]
Fix assembling X86CompilationCallback_Win64.asm on VS 10.

Patch by Louis Zhuang!

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

13 years agoTest for llvm-gcc patch 119392.
Dale Johannesen [Tue, 16 Nov 2010 21:57:15 +0000 (21:57 +0000)]
Test for llvm-gcc patch 119392.

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

13 years agolibc++ and compiler_rt are now dual licensed under UIUC and MIT license.
Chris Lattner [Tue, 16 Nov 2010 21:32:53 +0000 (21:32 +0000)]
libc++ and compiler_rt are now dual licensed under UIUC and MIT license.

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

13 years agoFix grammaro.
Dan Gohman [Tue, 16 Nov 2010 21:27:00 +0000 (21:27 +0000)]
Fix grammaro.

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

13 years agoAdd ExpandPseudos.cpp.
Evan Cheng [Tue, 16 Nov 2010 21:20:36 +0000 (21:20 +0000)]
Add ExpandPseudos.cpp.

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

13 years agoAdd .loc methods to the streamer.
Rafael Espindola [Tue, 16 Nov 2010 21:20:32 +0000 (21:20 +0000)]
Add .loc methods to the streamer.

Next: Add support for the !HasDotLocAndDotFile case to the MCAsmStreamer
and then switch codegen to use it.

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

13 years agoSplit pseudo-instruction expansion into a separate pass, to make it
Dan Gohman [Tue, 16 Nov 2010 21:02:37 +0000 (21:02 +0000)]
Split pseudo-instruction expansion into a separate pass, to make it
easier to debug, and to avoid complications when the CFG changes
in the middle of the instruction selection process.

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

13 years agoAdd const.
Rafael Espindola [Tue, 16 Nov 2010 20:56:23 +0000 (20:56 +0000)]
Add const.

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

13 years agoFix emergency spilling in LiveIntervals::spillPhysRegAroundRegDefsUses.
Jakob Stoklund Olesen [Tue, 16 Nov 2010 19:55:14 +0000 (19:55 +0000)]
Fix emergency spilling in LiveIntervals::spillPhysRegAroundRegDefsUses.

Always spill the full representative register at any point where any subregister
is live.

This fixes PR8620 which caused the old logic to get confused and not spill
anything at all.

The fundamental problem here is that the coalescer is too aggressive about
physical register coalescing. It sometimes makes it impossible to allocate
registers without these emergency spills.

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

13 years agoPrint out the register class of the current interval.
Jakob Stoklund Olesen [Tue, 16 Nov 2010 19:55:12 +0000 (19:55 +0000)]
Print out the register class of the current interval.

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

13 years agoDocument -enable-no-infs-fp-math and -enable-no-nans-fp-math command line options
Peter Collingbourne [Tue, 16 Nov 2010 19:40:13 +0000 (19:40 +0000)]
Document -enable-no-infs-fp-math and -enable-no-nans-fp-math command line options

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

13 years agoTidy up some things in <arm_neon.h>.
Bob Wilson [Tue, 16 Nov 2010 19:39:14 +0000 (19:39 +0000)]
Tidy up some things in <arm_neon.h>.
Stop defining types with "__neon_" prefixes and then using typedefs without
the prefix; there's no reason to do that anymore.  Remove types that combine
multiple Neon vectors and treat them as a single long vector; they are not
used.

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

13 years agoReapply "Stop using struct wrappers for Neon vector types in <arm_neon.h>."
Bob Wilson [Tue, 16 Nov 2010 19:16:06 +0000 (19:16 +0000)]
Reapply "Stop using struct wrappers for Neon vector types in <arm_neon.h>."
I've temporarily disabled the failing clang test.

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

13 years agosystem_error: More conditional error codes for Darwin.
Michael J. Spencer [Tue, 16 Nov 2010 18:48:21 +0000 (18:48 +0000)]
system_error: More conditional error codes for Darwin.

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

13 years agoRevert "Stop using struct wrappers for Neon vector types in <arm_neon.h>."
Bob Wilson [Tue, 16 Nov 2010 18:43:07 +0000 (18:43 +0000)]
Revert "Stop using struct wrappers for Neon vector types in <arm_neon.h>."
It's breaking buildbots.

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

13 years agoParse and ignore some .cfi_* directives.
Rafael Espindola [Tue, 16 Nov 2010 18:34:07 +0000 (18:34 +0000)]
Parse and ignore some .cfi_* directives.

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

13 years agoThis is the first step in adding sane error handling support to LLVMSystem.
Michael J. Spencer [Tue, 16 Nov 2010 18:31:52 +0000 (18:31 +0000)]
This is the first step in adding sane error handling support to LLVMSystem.

The system API's will be shifted over to returning an error_code, and returning
other return values as out parameters to the function.

Code that needs to check error conditions will use the errc enum values which
are the same as the posix_errno defines (EBADF, E2BIG, etc...), and are
compatable with the error codes in WinError.h due to some magic in system_error.

An example would be:

if (error_code ec = KillEvil("Java")) { // error_code can be converted to bool.
  handle_error(ec);
}

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

13 years agoStop using struct wrappers for Neon vector types in <arm_neon.h>.
Bob Wilson [Tue, 16 Nov 2010 18:17:03 +0000 (18:17 +0000)]
Stop using struct wrappers for Neon vector types in <arm_neon.h>.
Thanks to Nate Begeman for an earlier version of this patch.

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

13 years agoRevert inadvertant checkin of CMake libdeps.
Jim Grosbach [Tue, 16 Nov 2010 18:14:41 +0000 (18:14 +0000)]
Revert inadvertant checkin of CMake libdeps.

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

13 years agoARM conditional mov encoding fix.
Jim Grosbach [Tue, 16 Nov 2010 18:13:42 +0000 (18:13 +0000)]
ARM conditional mov encoding fix.

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

13 years agoHave a few places that want to simplify phi nodes use SimplifyInstruction
Duncan Sands [Tue, 16 Nov 2010 17:41:24 +0000 (17:41 +0000)]
Have a few places that want to simplify phi nodes use SimplifyInstruction
rather than calling hasConstantValue.  No intended functionality change.

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

13 years agoFix missing includes of "llvm/Analysis/Passes.h" in the tutorials. Thanks
Dan Gohman [Tue, 16 Nov 2010 17:28:22 +0000 (17:28 +0000)]
Fix missing includes of "llvm/Analysis/Passes.h" in the tutorials. Thanks
for Arnaud Allard de Grandmaison for preparing a patch.

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

13 years agoIn which I discover the existence of loops. Threading an operation
Duncan Sands [Tue, 16 Nov 2010 12:16:38 +0000 (12:16 +0000)]
In which I discover the existence of loops.  Threading an operation
over a phi node by applying it to each operand may be wrong if the
operation and the phi node are mutually interdependent (the testcase
has a simple example of this).  So only do this transform if it would
be correct to perform the operation in each predecessor of the block
containing the phi, i.e. if the other operands all dominate the phi.
This should fix the FFMPEG snow.c regression reported by İsmail Dönmez.

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

13 years agoA bit more of gnu as compatibility when handling relocations with aliases.
Rafael Espindola [Tue, 16 Nov 2010 04:11:46 +0000 (04:11 +0000)]
A bit more of gnu as compatibility when handling relocations with aliases.

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

13 years agoL_bit doesn't work here.
Bill Wendling [Tue, 16 Nov 2010 02:20:22 +0000 (02:20 +0000)]
L_bit doesn't work here.

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

13 years ago- Remove dead patterns.
Bill Wendling [Tue, 16 Nov 2010 02:08:45 +0000 (02:08 +0000)]
- Remove dead patterns.
- Add encodings to the *LDMIA_RET instrs. Probably not needed...

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

13 years agovldm and vstm are mnemonics for vldmia and vstmia resp.
Bill Wendling [Tue, 16 Nov 2010 02:00:24 +0000 (02:00 +0000)]
vldm and vstm are mnemonics for vldmia and vstmia resp.

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

13 years agoMake the verifier a little quieter on instructions that it's probably
Eric Christopher [Tue, 16 Nov 2010 01:58:21 +0000 (01:58 +0000)]
Make the verifier a little quieter on instructions that it's probably
(and likely) wrong about anyhow.

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

13 years agoFix a bug I introduced in the ppc refactoring, which caused long
Chris Lattner [Tue, 16 Nov 2010 01:45:05 +0000 (01:45 +0000)]
Fix a bug I introduced in the ppc refactoring, which caused long
branches to be emitted as:

  bne cr0, 2
instead of:
  bne cr0, $+8

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

13 years agoTest encodings for LDM and STM.
Bill Wendling [Tue, 16 Nov 2010 01:38:20 +0000 (01:38 +0000)]
Test encodings for LDM and STM.

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

13 years agoEncode the multi-load/store instructions with their respective modes ('ia',
Bill Wendling [Tue, 16 Nov 2010 01:16:36 +0000 (01:16 +0000)]
Encode the multi-load/store instructions with their respective modes ('ia',
'db', 'ib', 'da') instead of having that mode as a separate field in the
instruction. It's more convenient for the asm parser and much more readable for
humans.
<rdar://problem/8654088>

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

13 years agoObject: Get rid of sys::Path, Triple, and cleanup namespace.
Michael J. Spencer [Tue, 16 Nov 2010 01:06:51 +0000 (01:06 +0000)]
Object: Get rid of sys::Path, Triple, and cleanup namespace.

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

13 years agoadd copy of comment to the code that will survive the mcjit'ization
Chris Lattner [Tue, 16 Nov 2010 00:57:32 +0000 (00:57 +0000)]
add copy of comment to the code that will survive the mcjit'ization

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

13 years agorelax an assertion a bit, allowing the GPR argument of
Chris Lattner [Tue, 16 Nov 2010 00:55:51 +0000 (00:55 +0000)]
relax an assertion a bit, allowing the GPR argument of
these instructions to be encoded with getMachineOpValue.
This unbreaks ExecutionEngine/2003-01-04-ArgumentBug.ll
when running on a G5

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

13 years agoRemember to resize SpillSlotToUsesMap when allocating an emergency spill slot.
Jakob Stoklund Olesen [Tue, 16 Nov 2010 00:41:01 +0000 (00:41 +0000)]
Remember to resize SpillSlotToUsesMap when allocating an emergency spill slot.

Use amazing new function call technology instead of writing identical code in
multiple places.

This fixes PR8604.

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

13 years agoFix PR8612 in the standard spiller, take two.
Jakob Stoklund Olesen [Tue, 16 Nov 2010 00:40:59 +0000 (00:40 +0000)]
Fix PR8612 in the standard spiller, take two.

The live range of a register defined by an early clobber starts at the use slot,
not the def slot.

Except when it is an early clobber tied to a use operand. Then it starts at the
def slot like a standard def.

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

13 years agoAdd Thumb2 encodings for mov and friends.
Owen Anderson [Tue, 16 Nov 2010 00:29:56 +0000 (00:29 +0000)]
Add Thumb2 encodings for mov and friends.

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

13 years agoChange the 11 byte nop to be a single instruction.
Rafael Espindola [Mon, 15 Nov 2010 23:10:30 +0000 (23:10 +0000)]
Change the 11 byte nop to be a single instruction.

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

13 years agofix a pasto that massively broke the ppc jit while the buildbots happened
Chris Lattner [Mon, 15 Nov 2010 22:50:50 +0000 (22:50 +0000)]
fix a pasto that massively broke the ppc jit while the buildbots happened
to be broken for other reasons

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

13 years agoRevert "Fix PR8612 in the standard spiller as well."
Jakob Stoklund Olesen [Mon, 15 Nov 2010 21:51:51 +0000 (21:51 +0000)]
Revert "Fix PR8612 in the standard spiller as well."

This reverts r119183 which borke the buildbots.

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

13 years agoAttempt to provide encodings for some miscellaneous Thumb2 encodings.
Owen Anderson [Mon, 15 Nov 2010 21:30:39 +0000 (21:30 +0000)]
Attempt to provide encodings for some miscellaneous Thumb2 encodings.

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

13 years agoCode clean up. The peephole pass should be the one updating the instruction
Evan Cheng [Mon, 15 Nov 2010 21:20:45 +0000 (21:20 +0000)]
Code clean up. The peephole pass should be the one updating the instruction
iterator, not TII->OptimizeCompareInstr.

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

13 years agoProvide Thumb2 encodings for sxtb and friends.
Owen Anderson [Mon, 15 Nov 2010 21:12:05 +0000 (21:12 +0000)]
Provide Thumb2 encodings for sxtb and friends.

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

13 years agoRecommit this change and remove the failing part of the test - it didn't
Eric Christopher [Mon, 15 Nov 2010 21:11:06 +0000 (21:11 +0000)]
Recommit this change and remove the failing part of the test - it didn't
pass in the first place and was masked by earlier failures not warning
and aborting the block.

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

13 years agoFix PR8612 in the standard spiller as well.
Jakob Stoklund Olesen [Mon, 15 Nov 2010 20:55:53 +0000 (20:55 +0000)]
Fix PR8612 in the standard spiller as well.

The live range of a register defined by an early clobber starts at the use slot,
not the def slot.

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

13 years agoWhen spilling a register defined by an early clobber, make sure that the new
Jakob Stoklund Olesen [Mon, 15 Nov 2010 20:55:49 +0000 (20:55 +0000)]
When spilling a register defined by an early clobber, make sure that the new
live ranges for the spill register are also defined at the use slot instead of
the normal def slot.

This fixes PR8612 for the inline spiller. A use was being allocated to the same
register as a spilled early clobber def.

This problem exists in all the spillers. A fix for the standard spiller is
forthcoming.

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

13 years agoARM LDR_PRE/LDR_POST/STR_PRE/STR_POST (and the *B counterparts) binary encoding.
Jim Grosbach [Mon, 15 Nov 2010 20:47:07 +0000 (20:47 +0000)]
ARM LDR_PRE/LDR_POST/STR_PRE/STR_POST (and the *B counterparts) binary encoding.

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

13 years agoAdd Thumb2 encodings for comparison and shift operators.
Owen Anderson [Mon, 15 Nov 2010 19:58:36 +0000 (19:58 +0000)]
Add Thumb2 encodings for comparison and shift operators.

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

13 years agoFix compiler warnigns.
Benjamin Kramer [Mon, 15 Nov 2010 19:20:50 +0000 (19:20 +0000)]
Fix compiler warnigns.

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

13 years agoAdd correct Thumb2 encodings for mvn and friends.
Owen Anderson [Mon, 15 Nov 2010 18:45:17 +0000 (18:45 +0000)]
Add correct Thumb2 encodings for mvn and friends.

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

13 years agoUpdate examples and documentation to explicitly add basicaa, now that it's
Dan Gohman [Mon, 15 Nov 2010 18:41:10 +0000 (18:41 +0000)]
Update examples and documentation to explicitly add basicaa, now that it's
no longer included by default.

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

13 years agoAdd FIXMEs.
Jim Grosbach [Mon, 15 Nov 2010 18:36:48 +0000 (18:36 +0000)]
Add FIXMEs.

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

13 years agoNuke redundant encoding bit set.
Jim Grosbach [Mon, 15 Nov 2010 18:17:24 +0000 (18:17 +0000)]
Nuke redundant encoding bit set.

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

13 years ago-basicaa is no longer the default.
Dan Gohman [Mon, 15 Nov 2010 18:07:16 +0000 (18:07 +0000)]
-basicaa is no longer the default.

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

13 years agoTeach InstructionSimplify the trick of skipping incoming phi
Duncan Sands [Mon, 15 Nov 2010 17:52:45 +0000 (17:52 +0000)]
Teach InstructionSimplify the trick of skipping incoming phi
values that are equal to the phi itself.

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

13 years agoMove PHI tests to phi.ll, out of select.ll.
Duncan Sands [Mon, 15 Nov 2010 16:43:28 +0000 (16:43 +0000)]
Move PHI tests to phi.ll, out of select.ll.

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

13 years agoChange MCExpr::EvaluateAsRelocatableImpl of variables to return the original
Rafael Espindola [Mon, 15 Nov 2010 16:33:49 +0000 (16:33 +0000)]
Change MCExpr::EvaluateAsRelocatableImpl of variables to return the original
variable if recursing fails to simplify it.

Factor AliasedSymbol to be a method of MCSymbol.

Update MCAssembler::EvaluateFixup to match the change in
EvaluateAsRelocatableImpl.

Remove the WeakRefExpr hack, as the object writer now sees the weakref with
no extra effort needed.

Nothing else is using MCTargetExpr, but keep it for now.

Now that the ELF writer sees relocations with aliases, handle

    .weak    foo2
foo2:
    .weak    bar2
    .set    bar2,foo2
    .quad    bar2

the same way gas does and produce a relocation with bar2.

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

13 years agoDovetail with Dan Dunbar's rework of ELFObjectWriter.
Jason W Kim [Mon, 15 Nov 2010 16:18:39 +0000 (16:18 +0000)]
Dovetail with Dan Dunbar's rework of ELFObjectWriter.
Added 2 new subclasses - X86ELFObjectWriter and ARMELFObectWriter.
ARM and X86 require different code for RecordRelocation(), possibly others.

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

13 years agoFix PR8565.
Rafael Espindola [Mon, 15 Nov 2010 14:40:36 +0000 (14:40 +0000)]
Fix PR8565.

This moves most of the isUsed logic to the MCSymbol itself. With this we
get a bit more relaxed about allowing definitions after uses: uses that
don't evaluate their argument immediately (jmp foo) are accepted.

ddunbar, this was the smallest compromise I could think of that lets us
accept gcc (and clang!) assembly.

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

13 years agoImprove code layout, mostly indentation.
Kalle Raiskila [Mon, 15 Nov 2010 10:12:32 +0000 (10:12 +0000)]
Improve code layout, mostly indentation.
No functionality change.

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

13 years agoWire up primitive support in the assembler backend for writing .o files
Chris Lattner [Mon, 15 Nov 2010 08:49:58 +0000 (08:49 +0000)]
Wire up primitive support in the assembler backend for writing .o files
directly on the mac.  This is very early, doesn't support relocations and
has a terrible hack to avoid .machine from being printed, but despite
that it generates an bitwise-identical-to-cctools .o file for stuff like
this:

  define i32 @test() nounwind { ret i32 42 }

I don't plan to continue pushing this forward, but if anyone else was
interested in doing it, it should be really straight-forward.

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

13 years agosplit out an encoder for memri operands, allowing a relocation to be plopped
Chris Lattner [Mon, 15 Nov 2010 08:22:03 +0000 (08:22 +0000)]
split out an encoder for memri operands, allowing a relocation to be plopped
into the immediate field.  This allows us to encode stuff like this:

        lbz r3, lo16(__ZL4init)(r4)     ; globalopt.cpp:5
                                        ; encoding: [0x88,0x64,A,A]
                                        ;   fixup A - offset: 0, value: lo16(__ZL4init), kind: fixup_ppc_lo16

        stw r3, lo16(__ZL1s)(r5)        ; globalopt.cpp:6
                                        ; encoding: [0x90,0x65,A,A]
                                        ;   fixup A - offset: 0, value: lo16(__ZL1s), kind: fixup_ppc_lo16

With this, we should have a completely function MCCodeEmitter for PPC, wewt.

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

13 years agoadd support for encoding the lo14 forms used for a few PPC64 addressing
Chris Lattner [Mon, 15 Nov 2010 08:02:41 +0000 (08:02 +0000)]
add support for encoding the lo14 forms used for a few PPC64 addressing
modes.  For example, we now get:

ld r3, lo16(_G)(r3)             ; encoding: [0xe8,0x63,A,0bAAAAAA00]
                                        ;   fixup A - offset: 0, value: lo16(_G), kind: fixup_ppc_lo14

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

13 years agofix a regression with the new instprinter: we lost the ability to
Chris Lattner [Mon, 15 Nov 2010 07:52:06 +0000 (07:52 +0000)]
fix a regression with the new instprinter: we lost the ability to
print DBG_VALUE instructions.  This should unbreak the llvm-gcc-powerpc-darwin9
buildbot.

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

13 years agopull the code to get the operand value out of the loop.
Chris Lattner [Mon, 15 Nov 2010 07:09:28 +0000 (07:09 +0000)]
pull the code to get the operand value out of the loop.

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

13 years agosplit the giant encoder loop into two new helper functions.
Chris Lattner [Mon, 15 Nov 2010 06:59:17 +0000 (06:59 +0000)]
split the giant encoder loop into two new helper functions.

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

13 years agoreduce nesting and minor cleanups, no functionality change.
Chris Lattner [Mon, 15 Nov 2010 06:42:13 +0000 (06:42 +0000)]
reduce nesting and minor cleanups, no functionality change.

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

13 years agoimplement the start of support for lo16 and ha16, allowing us to get stuff like:
Chris Lattner [Mon, 15 Nov 2010 06:33:39 +0000 (06:33 +0000)]
implement the start of support for lo16 and ha16, allowing us to get stuff like:

        lis r4, ha16(__ZL4init)         ; encoding: [0x3c,0x80,A,A]
                                        ;   fixup A - offset: 0, value: ha16(__ZL4init), kind: fixup_ppc_ha16

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

13 years agoadd a fixup for conditional branches, giving us output like this:
Chris Lattner [Mon, 15 Nov 2010 06:12:22 +0000 (06:12 +0000)]
add a fixup for conditional branches, giving us output like this:

        beq cr0, LBB0_4                 ; encoding: [0x41,0x82,A,0bAAAAAA00]
                                        ;   fixup A - offset: 0, value: LBB0_4, kind: fixup_ppc_brcond14

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

13 years agochange direct branches to encode with the same encoding method
Chris Lattner [Mon, 15 Nov 2010 06:09:35 +0000 (06:09 +0000)]
change direct branches to encode with the same encoding method
as direct calls.  Change conditional branches to encode with
their own method, simplifying the JIT encoder and making room
for adding an mc fixup.

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

13 years agoeliminate a now-unneeded operand printer.
Chris Lattner [Mon, 15 Nov 2010 06:01:10 +0000 (06:01 +0000)]
eliminate a now-unneeded operand printer.

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

13 years agosplit call operands out to their own encoding class, simplifying
Chris Lattner [Mon, 15 Nov 2010 05:57:53 +0000 (05:57 +0000)]
split call operands out to their own encoding class, simplifying
code in the JIT.  Use this to form the first fixup for the PPC backend,
giving us stuff like this:

bl L_foo$stub ; encoding: [0b010010AA,A,A,0bAAAAAA01]
                                        ;   fixup A - offset: 0, value: L_foo$stub, kind: fixup_ppc_br24

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

13 years agocorrect the fixup comment printer to work on big endian platforms.
Chris Lattner [Mon, 15 Nov 2010 05:56:19 +0000 (05:56 +0000)]
correct the fixup comment printer to work on big endian platforms.

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

13 years agoadd proper encoding for MTCRF instead of using a hack.
Chris Lattner [Mon, 15 Nov 2010 05:19:25 +0000 (05:19 +0000)]
add proper encoding for MTCRF instead of using a hack.

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

13 years agoadd fields to the .td files unconditionally, simplifying tblgen a bit.
Chris Lattner [Mon, 15 Nov 2010 05:19:05 +0000 (05:19 +0000)]
add fields to the .td files unconditionally, simplifying tblgen a bit.
Switch the ARM backend to use 'let' instead of 'set' with this change.

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

13 years agoremove a pointless testcase.
Chris Lattner [Mon, 15 Nov 2010 05:07:03 +0000 (05:07 +0000)]
remove a pointless testcase.

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

13 years agoadd basic encoding support for immediates and registers, allowing us
Chris Lattner [Mon, 15 Nov 2010 04:51:55 +0000 (04:51 +0000)]
add basic encoding support for immediates and registers, allowing us
to encode all of these instructions correctly (for example):

        mflr r0                         ; encoding: [0x7c,0x08,0x02,0xa6]
        stw r0, 8(r1)                   ; encoding: [0x90,0x01,0x00,0x08]
        stwu r1, -64(r1)                ; encoding: [0x94,0x21,0xff,0xc0]

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

13 years agoadd a dummy entry to fix a build error
Chris Lattner [Mon, 15 Nov 2010 04:47:16 +0000 (04:47 +0000)]
add a dummy entry to fix a build error

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

13 years agoImplement a basic MCCodeEmitter for PPC. This doesn't handle
Chris Lattner [Mon, 15 Nov 2010 04:16:32 +0000 (04:16 +0000)]
Implement a basic MCCodeEmitter for PPC.  This doesn't handle
fixups yet, and doesn't handle actually encoding operand values,
but this is enough for llc -show-mc-encoding to show the base
instruction encoding information, e.g.:

mflr r0                         ; encoding: [0x7c,0x08,0x02,0xa6]
stw r0, 8(r1)                   ; encoding: [0x90,0x00,0x00,0x00]
stwu r1, -64(r1)                ; encoding: [0x94,0x00,0x00,0x00]
Ltmp0:
lhz r4, 4(r3)                   ; encoding: [0xa0,0x00,0x00,0x00]
cmplwi cr0, r4, 8               ; encoding: [0x28,0x00,0x00,0x00]
beq cr0, LBB0_2                 ; encoding: [0x40,0x00,0x00,0x00]

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

13 years agodissolve some more hacks.
Chris Lattner [Mon, 15 Nov 2010 03:53:53 +0000 (03:53 +0000)]
dissolve some more hacks.

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

13 years agofix some fixme's, removing dead code.
Chris Lattner [Mon, 15 Nov 2010 03:51:13 +0000 (03:51 +0000)]
fix some fixme's, removing dead code.

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

13 years agoremove asmstrings (which can never be printed) from pseudo
Chris Lattner [Mon, 15 Nov 2010 03:48:58 +0000 (03:48 +0000)]
remove asmstrings (which can never be printed) from pseudo
instructions, allowing is to eliminate some dead operand
printing methods from the instprinter.

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

13 years agostrength reduce TOC temp label generation, no functionality change.
Chris Lattner [Mon, 15 Nov 2010 03:42:54 +0000 (03:42 +0000)]
strength reduce TOC temp label generation, no functionality change.

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

13 years agorip out a ton of old instruction printing junk now that the
Chris Lattner [Mon, 15 Nov 2010 03:39:06 +0000 (03:39 +0000)]
rip out a ton of old instruction printing junk now that the
new instprinting logic is there.

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

13 years agoObject: Add missing makefile.
Michael J. Spencer [Mon, 15 Nov 2010 03:33:14 +0000 (03:33 +0000)]
Object: Add missing makefile.

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

13 years agoMake sure ARM multi load / store pass copies memoperands when forming ldrd / strd...
Evan Cheng [Mon, 15 Nov 2010 03:30:30 +0000 (03:30 +0000)]
Make sure ARM multi load / store pass copies memoperands when forming ldrd / strd. pr8113.

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

13 years agoTurn on the new instprinter by default.
Chris Lattner [Mon, 15 Nov 2010 03:27:05 +0000 (03:27 +0000)]
Turn on the new instprinter by default.

The only change in the output is:

1) we get a better comment on mfcr, we get:
mfcr r2                         ; cr2
  instead of:
  mfcr r2 ; 32

2) we no longer emit $stub's on powerpc/leopard.  The Leopard
   linker autosynthesizes them.

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

13 years agoAdd LLVMObject Library.
Michael J. Spencer [Mon, 15 Nov 2010 03:21:41 +0000 (03:21 +0000)]
Add LLVMObject Library.

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

13 years agoconvert the operand bits into bitfields since they are all combinable in
Chris Lattner [Mon, 15 Nov 2010 03:13:19 +0000 (03:13 +0000)]
convert the operand bits into bitfields since they are all combinable in
different ways.  Add $non_lazy_ptr support, and proper lowering for
global values.

Now all the ppc regression tests pass with the new instruction printer.

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

13 years agoadd targetoperand flags for jump tables, constant pool and block address
Chris Lattner [Mon, 15 Nov 2010 02:46:57 +0000 (02:46 +0000)]
add targetoperand flags for jump tables, constant pool and block address
nodes to indicate when ha16/lo16 modifiers should be used.  This lets
us pass PowerPC/indirectbr.ll.

The one annoying thing about this patch is that the MCSymbolExpr isn't
expressive enough to represent ha16(label1-label2) which we need on
PowerPC.  I have a terrible hack in the meantime, but this will have
to be revisited at some point.

Last major conversion item left is global variable references.

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

13 years agoremove some extraneous quotes to make the new instprinter match.
Chris Lattner [Mon, 15 Nov 2010 02:43:46 +0000 (02:43 +0000)]
remove some extraneous quotes to make the new instprinter match.

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

13 years agosilence a ton of warnings from clang.
Chris Lattner [Mon, 15 Nov 2010 01:45:44 +0000 (01:45 +0000)]
silence a ton of warnings from clang.

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

13 years agoAttempt to unbreak cmake-based builds
Anton Korobeynikov [Mon, 15 Nov 2010 00:48:12 +0000 (00:48 +0000)]
Attempt to unbreak cmake-based builds

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