oota-llvm.git
13 years agoModel operand restrictions of mul-like instructions on ARMv5 via
Anton Korobeynikov [Sat, 1 Jan 2011 20:38:38 +0000 (20:38 +0000)]
Model operand restrictions of mul-like instructions on ARMv5 via
earlyclobber stuff. This should fix PRs 2313 and 8157.

Unfortunately, no testcase, since it'd be dependent on register
assignments.

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

13 years agoadd a validity check that was missed, fixing a crash on the
Chris Lattner [Sat, 1 Jan 2011 20:12:04 +0000 (20:12 +0000)]
add a validity check that was missed, fixing a crash on the
new testcase.

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

13 years agoRevert commit 122654 at the request of Chris, who reckons that instsimplify
Duncan Sands [Sat, 1 Jan 2011 20:08:02 +0000 (20:08 +0000)]
Revert commit 122654 at the request of Chris, who reckons that instsimplify
is the wrong hammer for this nail, and is probably right.

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

13 years agoimprove validity check to handle constant-trip-count loops more
Chris Lattner [Sat, 1 Jan 2011 19:54:22 +0000 (19:54 +0000)]
improve validity check to handle constant-trip-count loops more
aggressively.  In practice, this doesn't help anything though,
see the todo.

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

13 years agoimplement the "no aliasing accesses in loop" safety check. This pass
Chris Lattner [Sat, 1 Jan 2011 19:39:01 +0000 (19:39 +0000)]
implement the "no aliasing accesses in loop" safety check.  This pass
should be correct now.

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

13 years agoFix PR8878.
Rafael Espindola [Sat, 1 Jan 2011 19:05:35 +0000 (19:05 +0000)]
Fix PR8878.

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

13 years agoCorrect a bunch of mistakes which meant that the example pass didn't
Duncan Sands [Sat, 1 Jan 2011 17:37:07 +0000 (17:37 +0000)]
Correct a bunch of mistakes which meant that the example pass didn't
even compile, let alone work.

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

13 years agoI was unable to get the instructions to work if LLVM was built
Duncan Sands [Sat, 1 Jan 2011 17:28:49 +0000 (17:28 +0000)]
I was unable to get the instructions to work if LLVM was built
using a separate objects directory.

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

13 years agoClarify that the loadable module turns up in the top-level directory,
Duncan Sands [Sat, 1 Jan 2011 17:21:58 +0000 (17:21 +0000)]
Clarify that the loadable module turns up in the top-level directory,
not locally.

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

13 years agoFix a README item by having InstructionSimplify do a mild form of value
Duncan Sands [Sat, 1 Jan 2011 16:12:09 +0000 (16:12 +0000)]
Fix a README item by having InstructionSimplify do a mild form of value
numbering, in which it considers (for example) "%a = add i32 %x, %y" and
"%b = add i32 %x, %y" to be equal because the operands are equal and the
result of the instructions only depends on the values of the operands.
This has almost no effect (it removes 4 instructions from gcc-as-one-file),
and perhaps slows down compilation: I measured a 0.4% slowdown on the large
gcc-as-one-file testcase, but it wasn't statistically significant.

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

13 years agoptx: remove reg-reg addressing mode and st.const
Che-Liang Chiou [Sat, 1 Jan 2011 11:58:58 +0000 (11:58 +0000)]
ptx: remove reg-reg addressing mode and st.const

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

13 years agoptx: add store instruction
Che-Liang Chiou [Sat, 1 Jan 2011 10:50:37 +0000 (10:50 +0000)]
ptx: add store instruction

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

13 years agoAdd a reference to the OCamlLangImpl8.
Erick Tryzelaar [Sat, 1 Jan 2011 03:29:25 +0000 (03:29 +0000)]
Add a reference to the OCamlLangImpl8.

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

13 years agoAdd an OCaml tutorial page 8
Erick Tryzelaar [Sat, 1 Jan 2011 03:27:43 +0000 (03:27 +0000)]
Add an OCaml tutorial page 8

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

13 years agoAdd to the list of cmake files the object file, not the asm file. This
Oscar Fuentes [Fri, 31 Dec 2010 20:15:37 +0000 (20:15 +0000)]
Add to the list of cmake files the object file, not the asm file. This
is necessary for executing the custom command that runs the
assember. Fixes PR8877.

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

13 years agoCMake (MSVC): cmake automatically adds the /EHsc and /GR compiler
Oscar Fuentes [Fri, 31 Dec 2010 19:10:49 +0000 (19:10 +0000)]
CMake (MSVC): cmake automatically adds the /EHsc and /GR compiler
options. If we are building with exceptions/rtti disabled, we replace
/EHsc with /EHs-c- and /GR with /GR-, respectively. If we just add the
disabling options we get warnings like this:

cl : Command line warning D9025 : overriding '/EHs' with '/EHs-'

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

13 years agoSimplify this pass by using a depth-first iterator to ensure that all
Duncan Sands [Fri, 31 Dec 2010 17:49:05 +0000 (17:49 +0000)]
Simplify this pass by using a depth-first iterator to ensure that all
operands are visited before the instructions themselves.

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

13 years agoZap dead instructions harder.
Duncan Sands [Fri, 31 Dec 2010 16:17:54 +0000 (16:17 +0000)]
Zap dead instructions harder.

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

13 years agoMake a bunch of symbols internal.
Benjamin Kramer [Thu, 30 Dec 2010 22:34:44 +0000 (22:34 +0000)]
Make a bunch of symbols internal.

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

13 years agoAdd another non-commutable instruction that gas accepts commuted forms for.
Nick Lewycky [Thu, 30 Dec 2010 22:10:49 +0000 (22:10 +0000)]
Add another non-commutable instruction that gas accepts commuted forms for.
Fixes PR8861.

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

13 years agoptx: add state spaces
Che-Liang Chiou [Thu, 30 Dec 2010 10:41:27 +0000 (10:41 +0000)]
ptx: add state spaces

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

13 years agoinclude the module identifier when emitting this warning, PR8865.
Chris Lattner [Thu, 30 Dec 2010 02:49:45 +0000 (02:49 +0000)]
include the module identifier when emitting this warning, PR8865.

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

13 years agoprint the right string, thanks for Frits for noticing.
Chris Lattner [Thu, 30 Dec 2010 01:07:20 +0000 (01:07 +0000)]
print the right string, thanks for Frits for noticing.

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

13 years agoUse getVRegDef() instead of def_iterator. This leads to fewer defs being added
Cameron Zwarich [Thu, 30 Dec 2010 00:42:23 +0000 (00:42 +0000)]
Use getVRegDef() instead of def_iterator. This leads to fewer defs being added
with 2-address instructions, for about a 3.5% speedup of StrongPHIElimination on
403.gcc.

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

13 years agoimprove warning message to at least say what the triples are.
Chris Lattner [Wed, 29 Dec 2010 22:41:18 +0000 (22:41 +0000)]
improve warning message to at least say what the triples are.

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

13 years agoFix stack layout error in MBlaze backend.
Wesley Peck [Wed, 29 Dec 2010 19:46:28 +0000 (19:46 +0000)]
Fix stack layout error in MBlaze backend.

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

13 years agoMC/Mach-O/Thumb: Set the thumb bit in the symbol table.
Daniel Dunbar [Wed, 29 Dec 2010 14:14:06 +0000 (14:14 +0000)]
MC/Mach-O/Thumb: Set the thumb bit in the symbol table.

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

13 years agoNone of the other pass names in CodeGen have terminating periods.
Cameron Zwarich [Wed, 29 Dec 2010 11:49:10 +0000 (11:49 +0000)]
None of the other pass names in CodeGen have terminating periods.

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

13 years agoInstead of processing every instruction when splitting interferences, only
Cameron Zwarich [Wed, 29 Dec 2010 11:00:09 +0000 (11:00 +0000)]
Instead of processing every instruction when splitting interferences, only
process those instructions that define phi sources. This is a 47% speedup of
StrongPHIElimination compile time on 403.gcc.

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

13 years agoSPARC backend fix: correctly passing arguments through stack
Venkatraman Govindaraju [Wed, 29 Dec 2010 05:37:15 +0000 (05:37 +0000)]
SPARC backend fix: correctly passing arguments through stack

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

13 years agoAdd a missing word to a comment.
Cameron Zwarich [Wed, 29 Dec 2010 04:42:39 +0000 (04:42 +0000)]
Add a missing word to a comment.

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

13 years agoCorrectly encode pcrel|indirect.
Rafael Espindola [Wed, 29 Dec 2010 04:31:26 +0000 (04:31 +0000)]
Correctly encode pcrel|indirect.

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

13 years agoCMake: Add disabling optimization on MSVC8 and MSVC10 as workaround for some files...
NAKAMURA Takumi [Wed, 29 Dec 2010 03:59:27 +0000 (03:59 +0000)]
CMake: Add disabling optimization on MSVC8 and MSVC10 as workaround for some files in Target/ARM and Target/X86.

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

13 years agoautoconf: Add --disable-embed-stdcxx to suppress linking libstdc++.a into llvm.dll...
NAKAMURA Takumi [Wed, 29 Dec 2010 03:59:14 +0000 (03:59 +0000)]
autoconf: Add --disable-embed-stdcxx to suppress linking libstdc++.a into llvm.dll with --enable-shared on Cygming.

Cygwin has stdc++.dll in it's distribution, and we can assume distro's stdc++.dll might be available.

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

13 years agoautoconf: [PR7874] Add --disable-pthreads to suppress detecting pthreads on certain...
NAKAMURA Takumi [Wed, 29 Dec 2010 03:59:03 +0000 (03:59 +0000)]
autoconf: [PR7874] Add --disable-pthreads to suppress detecting pthreads on certain hosts.

This would be needed to build pthread*.dll-free distribution on recent MinGW-MSYS distros.

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

13 years agotest/Transforms/ConstProp/logicaltest.ll: FileCheck-ize.
NAKAMURA Takumi [Wed, 29 Dec 2010 03:58:56 +0000 (03:58 +0000)]
test/Transforms/ConstProp/logicaltest.ll: FileCheck-ize.

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

13 years agotest/CodeGen/X86/negative-sin.ll: FileCheck-ize.
NAKAMURA Takumi [Wed, 29 Dec 2010 03:58:47 +0000 (03:58 +0000)]
test/CodeGen/X86/negative-sin.ll: FileCheck-ize.

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

13 years agotest/CodeGen/X86/fp-in-intregs.ll: FileCheck-ize.
NAKAMURA Takumi [Wed, 29 Dec 2010 03:58:36 +0000 (03:58 +0000)]
test/CodeGen/X86/fp-in-intregs.ll: FileCheck-ize.

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

13 years agoAdd text explaining an assertion.
Cameron Zwarich [Wed, 29 Dec 2010 03:52:51 +0000 (03:52 +0000)]
Add text explaining an assertion.

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

13 years agoRemove second return.
Rafael Espindola [Wed, 29 Dec 2010 02:42:33 +0000 (02:42 +0000)]
Remove second return.

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

13 years agoFix bug when trying to output uint16_t or uint32_t.
Rafael Espindola [Wed, 29 Dec 2010 02:30:49 +0000 (02:30 +0000)]
Fix bug when trying to output uint16_t or uint32_t.

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

13 years agoImplement cfi_def_cfa. Also don't convert to dwarf reg numbers twice. Looks
Rafael Espindola [Wed, 29 Dec 2010 01:42:56 +0000 (01:42 +0000)]
Implement cfi_def_cfa. Also don't convert to dwarf reg numbers twice. Looks
like 6 is a fixed point of that and so the previous tests were OK :-)

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

13 years agofix PR8867: a crash handling fp128. Thanks to Nick for the testcase.
Chris Lattner [Wed, 29 Dec 2010 01:33:36 +0000 (01:33 +0000)]
fix PR8867: a crash handling fp128.  Thanks to Nick for the testcase.

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

13 years agoImplement cfi_def_cfa_register.
Rafael Espindola [Wed, 29 Dec 2010 00:26:06 +0000 (00:26 +0000)]
Implement cfi_def_cfa_register.

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

13 years agoInitial .cfi_offset implementation.
Rafael Espindola [Wed, 29 Dec 2010 00:09:59 +0000 (00:09 +0000)]
Initial .cfi_offset implementation.

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

13 years agoSimplify some code in MachineVerifier that was doing the correct thing, but not
Cameron Zwarich [Tue, 28 Dec 2010 23:45:38 +0000 (23:45 +0000)]
Simplify some code in MachineVerifier that was doing the correct thing, but not
in the most obvious way.

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

13 years agoDon't produce a "DW_CFA_advance_loc 0".
Rafael Espindola [Tue, 28 Dec 2010 23:38:03 +0000 (23:38 +0000)]
Don't produce a "DW_CFA_advance_loc 0".

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

13 years agoRevert the optimization in r122596. It is correct for all current targets, but
Cameron Zwarich [Tue, 28 Dec 2010 23:02:56 +0000 (23:02 +0000)]
Revert the optimization in r122596. It is correct for all current targets, but
it relies on assumptions that may not be true in the future.

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

13 years agoMultiple SPARC backend fixes: added Y register; updated select_cc, subx, subxcc defs...
Venkatraman Govindaraju [Tue, 28 Dec 2010 20:39:17 +0000 (20:39 +0000)]
Multiple SPARC backend fixes: added Y register; updated select_cc, subx, subxcc defs/uses;
and fixed CustomInserter.

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

13 years agoIntegers are primitive types. Update the documentation to state this
Tobias Grosser [Tue, 28 Dec 2010 20:29:31 +0000 (20:29 +0000)]
Integers are primitive types. Update the documentation to state this

This was done for label, void, floating point, x86mmx, metadata,
just not integer.

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

13 years agosimplify this, isBytewiseValue handles the extra check. We still
Chris Lattner [Tue, 28 Dec 2010 18:53:48 +0000 (18:53 +0000)]
simplify this, isBytewiseValue handles the extra check.  We still
check for "multiple of a byte" in size to make it clear that the
>> 3 below is safe.

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

13 years agoadd a note from llvmdev
Chris Lattner [Tue, 28 Dec 2010 18:45:02 +0000 (18:45 +0000)]
add a note from llvmdev

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

13 years agoImplement .cfi_remember_state and .cfi_restore_state.
Rafael Espindola [Tue, 28 Dec 2010 18:36:23 +0000 (18:36 +0000)]
Implement .cfi_remember_state and .cfi_restore_state.

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

13 years agoClarify that InstructionSimplify only returns values that dominate the
Duncan Sands [Tue, 28 Dec 2010 18:01:19 +0000 (18:01 +0000)]
Clarify that InstructionSimplify only returns values that dominate the
original instruction.

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

13 years agoSmall optimization to speed up replacementPreservesLCSSAForm.
Duncan Sands [Tue, 28 Dec 2010 18:00:24 +0000 (18:00 +0000)]
Small optimization to speed up replacementPreservesLCSSAForm.

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

13 years agoCast away "comparison between signed and unsigned integer" warnings.
Benjamin Kramer [Tue, 28 Dec 2010 13:52:52 +0000 (13:52 +0000)]
Cast away "comparison between signed and unsigned integer" warnings.

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

13 years agoFix a signed/unsigned comparison warning.
Benjamin Kramer [Tue, 28 Dec 2010 13:05:13 +0000 (13:05 +0000)]
Fix a signed/unsigned comparison warning.

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

13 years agoAvoid iterating every operand of an instruction in StrongPHIElimination, since
Cameron Zwarich [Tue, 28 Dec 2010 10:49:33 +0000 (10:49 +0000)]
Avoid iterating every operand of an instruction in StrongPHIElimination, since
we are only interested in the defs when discovering interferences.

This is a 28% speedup running StrongPHIElimination on 403.gcc.

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

13 years agoPacify the compiler. BestWeight cannot in fact be used uninitialized
Duncan Sands [Tue, 28 Dec 2010 10:07:15 +0000 (10:07 +0000)]
Pacify the compiler.  BestWeight cannot in fact be used uninitialized
in this function, but the compiler was warning that it might be when
doing a release build.

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

13 years agoFix warning about size potentially being used uninitialized
Duncan Sands [Tue, 28 Dec 2010 10:02:42 +0000 (10:02 +0000)]
Fix warning about size potentially being used uninitialized
when doing a release build.

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

13 years agoSilence gcc warning about an unused variable when doing a release build.
Duncan Sands [Tue, 28 Dec 2010 09:41:15 +0000 (09:41 +0000)]
Silence gcc warning about an unused variable when doing a release build.

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

13 years agoRelax address updates in the eh_frame section.
Rafael Espindola [Tue, 28 Dec 2010 05:39:27 +0000 (05:39 +0000)]
Relax address updates in the eh_frame section.

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

13 years agoStart adding basic support for emitting the call frame instructions.
Rafael Espindola [Tue, 28 Dec 2010 04:15:37 +0000 (04:15 +0000)]
Start adding basic support for emitting the call frame instructions.

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

13 years agoSupport/Path: Deprecate Path::hasMagicNumber and replace all uses with fs::has_magic.
Michael J. Spencer [Tue, 28 Dec 2010 01:49:21 +0000 (01:49 +0000)]
Support/Path: Deprecate Path::hasMagicNumber and replace all uses with fs::has_magic.

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

13 years agoFix typo.
Michael J. Spencer [Tue, 28 Dec 2010 01:49:10 +0000 (01:49 +0000)]
Fix typo.

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

13 years agoSupport/PathV2: Implement has_magic.
Michael J. Spencer [Tue, 28 Dec 2010 01:49:01 +0000 (01:49 +0000)]
Support/PathV2: Implement has_magic.

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

13 years agoChange an assertion to assert what the code actually relies upon.
Cameron Zwarich [Mon, 27 Dec 2010 22:08:42 +0000 (22:08 +0000)]
Change an assertion to assert what the code actually relies upon.

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

13 years agofix some issues Frits noticed, add AliasAnalysis as a dependency
Chris Lattner [Mon, 27 Dec 2010 18:39:08 +0000 (18:39 +0000)]
fix some issues Frits noticed, add AliasAnalysis as a dependency

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

13 years agoAdd support for .cfi_lsda.
Rafael Espindola [Mon, 27 Dec 2010 15:56:22 +0000 (15:56 +0000)]
Add support for .cfi_lsda.

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

13 years agoMC/Mach-O/Thumb: Select appropriate relocation types for Thumb.
Daniel Dunbar [Mon, 27 Dec 2010 14:49:49 +0000 (14:49 +0000)]
MC/Mach-O/Thumb: Select appropriate relocation types for Thumb.

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

13 years agoLand a first cut at StrongPHIElimination. There are only 5 new test failures
Cameron Zwarich [Mon, 27 Dec 2010 10:08:19 +0000 (10:08 +0000)]
Land a first cut at StrongPHIElimination. There are only 5 new test failures
when running without the verifier, and I have not yet checked them to see if
the new results are still correct. There are more verifier failures, but they
all seem to be additional occurrences of verifier failures that occur with the
existing PHIElimination pass. There are a few obvious issues with the code:

1) It doesn't properly update the register equivalence classes during copy
insertion, and instead recomputes them before merging live intervals and
renaming registers. I wanted to keep this first patch simple for debugging
purposes, but it shouldn't be very hard to do this.

2) It doesn't mix the renaming and live interval merging with the copy insertion
process, which leads to a lot of virtual register churn. Virtual registers and
live intervals are created, only to later be merged into others. The code should
be smarter and only create a new virtual register if there is no existing
register in the same congruence class.

3) In one place the code uses a DenseMap per basic block, which is unnecessary
heap allocation. There should be an inline storage version of DenseMap.

I did a quick compile-time test of running llc on 403.gcc with and without
StrongPHIElimination. It is slightly slower with StrongPHIElimination, because
the small decrease in the coalescer runtime can't beat the increase in phi
elimination runtime. Perhaps fixing the above performance issues will narrow
the gap.

I also haven't yet run any tests of the quality of the generated code.

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

13 years agoAdd knowledge of phi-def and phi-kill valnos to MachineVerifier's predecessor
Cameron Zwarich [Mon, 27 Dec 2010 05:17:23 +0000 (05:17 +0000)]
Add knowledge of phi-def and phi-kill valnos to MachineVerifier's predecessor
valno verification. The "Different value live out of predecessor" check is
incorrect in the case of phi-def valnos, so just skip that check for phi-def
valnos and instead check that all of the valnos for predecessors have phi-kill.
Fixes PR8863.

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

13 years agoSupport/PathV1: Deprecate GetRootDirectory.
Michael J. Spencer [Mon, 27 Dec 2010 03:21:41 +0000 (03:21 +0000)]
Support/PathV1: Deprecate GetRootDirectory.

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

13 years agoHandle reloc_riprel_4byte_movq_load. Should make the bots happy.
Rafael Espindola [Mon, 27 Dec 2010 02:03:24 +0000 (02:03 +0000)]
Handle reloc_riprel_4byte_movq_load. Should make the bots happy.

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

13 years agoAdd support for the same encodings of the personality function that gnu as
Rafael Espindola [Mon, 27 Dec 2010 00:36:05 +0000 (00:36 +0000)]
Add support for the same encodings of the personality function that gnu as
supports.

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

13 years agoBuildLibCalls: Nuke EmitMemCpy, EmitMemMove and EmitMemSet. They are dead and superse...
Benjamin Kramer [Mon, 27 Dec 2010 00:25:32 +0000 (00:25 +0000)]
BuildLibCalls: Nuke EmitMemCpy, EmitMemMove and EmitMemSet. They are dead and superseded by IRBuilder.

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

13 years agoSimplifyLibCalls: Use IRBuilder to simplify code.
Benjamin Kramer [Mon, 27 Dec 2010 00:16:46 +0000 (00:16 +0000)]
SimplifyLibCalls: Use IRBuilder to simplify code.

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

13 years agohave loop-idiom nuke instructions that feed stores that get removed.
Chris Lattner [Mon, 27 Dec 2010 00:03:23 +0000 (00:03 +0000)]
have loop-idiom nuke instructions that feed stores that get removed.

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

13 years agoimplement enough of the memset inference algorithm to recognize and insert
Chris Lattner [Sun, 26 Dec 2010 23:42:51 +0000 (23:42 +0000)]
implement enough of the memset inference algorithm to recognize and insert
memsets.  This is still missing one important validity check, but this is enough
to compile stuff like this:

void test0(std::vector<char> &X) {
  for (std::vector<char>::iterator I = X.begin(), E = X.end(); I != E; ++I)
    *I = 0;
}

void test1(std::vector<int> &X) {
  for (long i = 0, e = X.size(); i != e; ++i)
    X[i] = 0x01010101;
}

With:
 $ clang t.cpp -S -o - -O2 -emit-llvm | opt -loop-idiom | opt -O3 | llc

to:

__Z5test0RSt6vectorIcSaIcEE:            ## @_Z5test0RSt6vectorIcSaIcEE
## BB#0:                                ## %entry
subq $8, %rsp
movq (%rdi), %rax
movq 8(%rdi), %rsi
cmpq %rsi, %rax
je LBB0_2
## BB#1:                                ## %bb.nph
subq %rax, %rsi
movq %rax, %rdi
callq ___bzero
LBB0_2:                                 ## %for.end
addq $8, %rsp
ret
...
__Z5test1RSt6vectorIiSaIiEE:            ## @_Z5test1RSt6vectorIiSaIiEE
## BB#0:                                ## %entry
subq $8, %rsp
movq (%rdi), %rax
movq 8(%rdi), %rdx
subq %rax, %rdx
cmpq $4, %rdx
jb LBB1_2
## BB#1:                                ## %for.body.preheader
andq $-4, %rdx
movl $1, %esi
movq %rax, %rdi
callq _memset
LBB1_2:                                 ## %for.end
addq $8, %rsp
ret

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

13 years agostart using irbuilder to make mem intrinsics in a few passes.
Chris Lattner [Sun, 26 Dec 2010 22:57:41 +0000 (22:57 +0000)]
start using irbuilder to make mem intrinsics in a few passes.

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

13 years agoadd methods to IRBuilder to create memcpy/memset/memmove.
Chris Lattner [Sun, 26 Dec 2010 22:49:25 +0000 (22:49 +0000)]
add methods to IRBuilder to create memcpy/memset/memmove.

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

13 years agoFix .cfi_personality on 32 bit systems.
Rafael Espindola [Sun, 26 Dec 2010 22:47:37 +0000 (22:47 +0000)]
Fix .cfi_personality on 32 bit systems.

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

13 years agoAdd support for @note. Patch by Jörg Sonnenberger.
Rafael Espindola [Sun, 26 Dec 2010 21:30:59 +0000 (21:30 +0000)]
Add support for @note. Patch by Jörg Sonnenberger.

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

13 years agosketch more of this out.
Chris Lattner [Sun, 26 Dec 2010 20:45:45 +0000 (20:45 +0000)]
sketch more of this out.

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

13 years agoAdd basic support for .cfi_personality.
Rafael Espindola [Sun, 26 Dec 2010 20:20:31 +0000 (20:20 +0000)]
Add basic support for .cfi_personality.

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

13 years agomove isBytewiseValue out to ValueTracking.h/cpp
Chris Lattner [Sun, 26 Dec 2010 20:15:01 +0000 (20:15 +0000)]
move isBytewiseValue out to ValueTracking.h/cpp

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

13 years agoactually add the file...
Chris Lattner [Sun, 26 Dec 2010 19:39:38 +0000 (19:39 +0000)]
actually add the file...

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

13 years agoStart of a pass for recognizing memset and memcpy idioms.
Chris Lattner [Sun, 26 Dec 2010 19:32:44 +0000 (19:32 +0000)]
Start of a pass for recognizing memset and memcpy idioms.
No functionality yet.

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

13 years agoSimplify code.
Benjamin Kramer [Sun, 26 Dec 2010 15:23:45 +0000 (15:23 +0000)]
Simplify code.

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

13 years agofix some sort of weird pasto
Chris Lattner [Sun, 26 Dec 2010 12:05:11 +0000 (12:05 +0000)]
fix some sort of weird pasto

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

13 years agoadd a note
Chris Lattner [Sun, 26 Dec 2010 03:53:31 +0000 (03:53 +0000)]
add a note

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

13 years agoGeneralize a previous change, fixing PR8855 - an valid large immediate
Chris Lattner [Sat, 25 Dec 2010 21:36:35 +0000 (21:36 +0000)]
Generalize a previous change, fixing PR8855 - an valid large immediate
rejected by the mc assembler.

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

13 years agodon't lose TD info
Chris Lattner [Sat, 25 Dec 2010 20:52:04 +0000 (20:52 +0000)]
don't lose TD info

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

13 years agoswitch the inliner alignment enforcement stuff to use the
Chris Lattner [Sat, 25 Dec 2010 20:42:38 +0000 (20:42 +0000)]
switch the inliner alignment enforcement stuff to use the
getOrEnforceKnownAlignment function, which simplifies the code
and makes it stronger.

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

13 years agoMove getOrEnforceKnownAlignment out of instcombine into Transforms/Utils.
Chris Lattner [Sat, 25 Dec 2010 20:37:57 +0000 (20:37 +0000)]
Move getOrEnforceKnownAlignment out of instcombine into Transforms/Utils.

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

13 years agoSupport/PathV1: Deprecate makeAbsolute and remove Unix impl because it annoys people.
Michael J. Spencer [Sat, 25 Dec 2010 20:10:11 +0000 (20:10 +0000)]
Support/PathV1: Deprecate makeAbsolute and remove Unix impl because it annoys people.

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

13 years agoHeader warning patrol.
Eric Christopher [Sat, 25 Dec 2010 02:38:01 +0000 (02:38 +0000)]
Header warning patrol.

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

13 years agoFix a thinko pointed out by Frits van Bommel: looking through global variables in...
Benjamin Kramer [Fri, 24 Dec 2010 22:23:59 +0000 (22:23 +0000)]
Fix a thinko pointed out by Frits van Bommel: looking through global variables in isBytewiseValue is not safe.

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

13 years agoMerge IsFixupFullyResolved and IsSymbolRefDifferenceFullyResolved. We now
Rafael Espindola [Fri, 24 Dec 2010 21:22:02 +0000 (21:22 +0000)]
Merge IsFixupFullyResolved and IsSymbolRefDifferenceFullyResolved. We now
have a single point where targets test if a relocation is needed.

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

13 years agoMemCpyOpt: Turn memcpys from a constant into a memset if possible.
Benjamin Kramer [Fri, 24 Dec 2010 21:17:12 +0000 (21:17 +0000)]
MemCpyOpt: Turn memcpys from a constant into a memset if possible.

This allows us to compile "int cst[] = {-1, -1, -1};" into
  movl  $-1, 16(%rsp)
  movq  $-1, 8(%rsp)
instead of
  movl  _cst+8(%rip), %eax
  movl  %eax, 16(%rsp)
  movq  _cst(%rip), %rax
  movq  %rax, 8(%rsp)

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