oota-llvm.git
14 years agorename test
Chris Lattner [Fri, 12 Feb 2010 18:05:00 +0000 (18:05 +0000)]
rename test

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

14 years agoRevert "Reverse the order for collecting the parts of an addrec. The order", it
Daniel Dunbar [Fri, 12 Feb 2010 17:27:08 +0000 (17:27 +0000)]
Revert "Reverse the order for collecting the parts of an addrec. The order", it
is breaking llvm-gcc bootstrap.

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

14 years agoTestcases for recent stdcall / fastcall mangling improvements
Anton Korobeynikov [Fri, 12 Feb 2010 15:29:13 +0000 (15:29 +0000)]
Testcases for recent stdcall / fastcall mangling improvements

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

14 years agoSetup correct data layout to match gcc's expectations on mingw32.
Anton Korobeynikov [Fri, 12 Feb 2010 15:28:56 +0000 (15:28 +0000)]
Setup correct data layout to match gcc's expectations on mingw32.

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

14 years agoCleanup stdcall / fastcall name mangling.
Anton Korobeynikov [Fri, 12 Feb 2010 15:28:40 +0000 (15:28 +0000)]
Cleanup stdcall / fastcall name mangling.
This should fix alot of problems we saw so far, e.g. PRs 5851 & 2936

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

14 years agoReverse the order for collecting the parts of an addrec. The order
Dan Gohman [Fri, 12 Feb 2010 11:08:26 +0000 (11:08 +0000)]
Reverse the order for collecting the parts of an addrec. The order
doesn't matter, except that ScalarEvolution tends to need less time
to fold the results this way.

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

14 years agoReapply the new LoopStrengthReduction code, with compile time and
Dan Gohman [Fri, 12 Feb 2010 10:34:29 +0000 (10:34 +0000)]
Reapply the new LoopStrengthReduction code, with compile time and
bug fixes, and with improved heuristics for analyzing foreign-loop
addrecs.

This change also flattens IVUsers, eliminating the stride-oriented
groupings, which makes it easier to work with.

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

14 years ago* Updated the cost matrix normalization proceedure to better handle infinite costs.
Lang Hames [Fri, 12 Feb 2010 09:43:37 +0000 (09:43 +0000)]
* Updated the cost matrix normalization proceedure to better handle infinite costs.
* Enabled R1/R2 application for nodes with infinite spill costs in the Briggs heuristic (made
safe by the changes to the normalization proceedure).
* Removed a redundant header.

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

14 years agoUpdate test to match 95961.
Evan Cheng [Fri, 12 Feb 2010 07:48:46 +0000 (07:48 +0000)]
Update test to match 95961.

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

14 years agoTest for 95961.
Evan Cheng [Fri, 12 Feb 2010 02:35:03 +0000 (02:35 +0000)]
Test for 95961.

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

14 years agoadd a bunch of mod/rm encoding types for fixed mod/rm bytes.
Chris Lattner [Fri, 12 Feb 2010 02:06:33 +0000 (02:06 +0000)]
add a bunch of mod/rm encoding types for fixed mod/rm bytes.
This will work better for the disassembler for modeling things
like lfence/monitor/vmcall etc.

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

14 years agoTest case for 95958.
Evan Cheng [Fri, 12 Feb 2010 02:02:23 +0000 (02:02 +0000)]
Test case for 95958.

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

14 years agorevert r95949, it turns out that adding new prefixes is not a
Chris Lattner [Fri, 12 Feb 2010 01:55:31 +0000 (01:55 +0000)]
revert r95949, it turns out that adding new prefixes is not a
great solution for the disassembler, we'll go with "plan b".

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

14 years agoMC: Fix bug where trailing tied operands were forgotten; the X86 assembler
Daniel Dunbar [Fri, 12 Feb 2010 01:46:54 +0000 (01:46 +0000)]
MC: Fix bug where trailing tied operands were forgotten; the X86 assembler
matcher is now free of implicit operands!
 - Still need to clean up the code now that we don't to worry about implicit
   operands, and to make it a hard error if an instruction fails to specify all
   of its operands for some reason.

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

14 years agoAdded coprocessor Instructions CDP, CDP2, MCR, MCR2, MRC, MRC2, MCRR, MCRR2,
Johnny Chen [Fri, 12 Feb 2010 01:44:23 +0000 (01:44 +0000)]
Added coprocessor Instructions CDP, CDP2, MCR, MCR2, MRC, MRC2, MCRR, MCRR2,
MRRC, MRRc2.  For disassembly only.

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

14 years agoAdd a new pass on machine instructions to optimize away PHI cycles that
Bob Wilson [Fri, 12 Feb 2010 01:30:21 +0000 (01:30 +0000)]
Add a new pass on machine instructions to optimize away PHI cycles that
reduce down to a single value.  InstCombine already does this transformation
but DAG legalization may introduce new opportunities.  This has turned out to
be important for ARM where 64-bit values are split up during type legalization:
InstCombine is not able to remove the PHI cycles on the 64-bit values but
the separate 32-bit values can be optimized.  I measured the compile time
impact of this (running llc on 176.gcc) and it was not significant.

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

14 years agoX86: Fix definition for RCL/RCR.*m? operations -- they were getting represented
Daniel Dunbar [Fri, 12 Feb 2010 01:22:03 +0000 (01:22 +0000)]
X86: Fix definition for RCL/RCR.*m? operations -- they were getting represented
with "tied memory operands", which is wrong.

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

14 years agoadd another bit of space for new kinds of instruction prefixes.
Chris Lattner [Fri, 12 Feb 2010 01:15:16 +0000 (01:15 +0000)]
add another bit of space for new kinds of instruction prefixes.

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

14 years agoAdd a missing pattern for movhps so that we get:
Nate Begeman [Fri, 12 Feb 2010 01:10:45 +0000 (01:10 +0000)]
Add a missing pattern for movhps so that we get:

movq (%ecx,%edx,2), %xmm2
movhps (%ecx,%eax,2), %xmm2

rather than:

movq     (%eax, %edx, 2), %xmm2
movq     (%eax, %ebx, 2), %xmm3
movlhps  %xmm3, %xmm2

Testcase forthcoming.

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

14 years agofix the encodings of monitor and mwait, which were completely
Chris Lattner [Fri, 12 Feb 2010 01:06:22 +0000 (01:06 +0000)]
fix the encodings of monitor and mwait, which were completely
busted in both encoders.  I'm not bothering to fix it in the
old one at this point.

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

14 years agoimprove support for minix, PR6280, patch by
Chris Lattner [Fri, 12 Feb 2010 00:37:46 +0000 (00:37 +0000)]
improve support for minix, PR6280, patch by
Kees van Reeuwijk!

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

14 years agoAdd a new function attribute, 'alignstack'. It will indicate (when the backends
Charles Davis [Fri, 12 Feb 2010 00:31:15 +0000 (00:31 +0000)]
Add a new function attribute, 'alignstack'. It will indicate (when the backends
implement support for it) that the stack should be forcibly realigned in the
prologue (and the process reversed in the epilogue).

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

14 years agoReapply coalescer fix for better cross-class coalescing.
Jakob Stoklund Olesen [Thu, 11 Feb 2010 23:55:29 +0000 (23:55 +0000)]
Reapply coalescer fix for better cross-class coalescing.

This time with fixed test cases.

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

14 years agoenhance llvm-mc -show-inst to print the enum of an instruction, like so:
Chris Lattner [Thu, 11 Feb 2010 22:57:32 +0000 (22:57 +0000)]
enhance llvm-mc -show-inst to print the enum of an instruction, like so:

testb %al, %al                ## <MCInst #2412 TEST8rr
                                        ##   <MCOperand Reg:2>
                                        ##   <MCOperand Reg:2>>
jne LBB1_7                  ## <MCInst #938 JNE_1
                                        ##   <MCOperand Expr:(LBB1_7)>>

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

14 years agoadd a new MCInstPrinter::getOpcodeName interface, when it is
Chris Lattner [Thu, 11 Feb 2010 22:39:10 +0000 (22:39 +0000)]
add a new MCInstPrinter::getOpcodeName interface, when it is
implemented, llvm-mc --show-inst now uses it to print the
instruction opcode as well as the number.

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

14 years agoDocument binutils requirements for coff targets (cygwin / mingw32).
Anton Korobeynikov [Thu, 11 Feb 2010 21:51:51 +0000 (21:51 +0000)]
Document binutils requirements for coff targets (cygwin / mingw32).

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

14 years agoimprove encoding information for branches. We now know they have
Chris Lattner [Thu, 11 Feb 2010 21:45:31 +0000 (21:45 +0000)]
improve encoding information for branches.  We now know they have
8 or 32-bit immediates, which allows the new encoder to handle
them.

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

14 years agoMC: Move assembler-backend's fixup list into the fragment.
Daniel Dunbar [Thu, 11 Feb 2010 21:29:46 +0000 (21:29 +0000)]
MC: Move assembler-backend's fixup list into the fragment.

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

14 years agoMC: Move MCSectionData::Fixup out to MCAsmFixup.
Daniel Dunbar [Thu, 11 Feb 2010 21:29:29 +0000 (21:29 +0000)]
MC: Move MCSectionData::Fixup out to MCAsmFixup.

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

14 years agomake getFixupKindInfo return a const reference, allowing
Chris Lattner [Thu, 11 Feb 2010 21:27:18 +0000 (21:27 +0000)]
make getFixupKindInfo return a const reference, allowing
the tables to be const.  Teach MCCodeEmitter to handle
the target-indep kinds so that we don't crash on them.

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

14 years agoRevert functional change. This broke a bunch of tests.
Jakob Stoklund Olesen [Thu, 11 Feb 2010 21:19:44 +0000 (21:19 +0000)]
Revert functional change. This broke a bunch of tests.

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

14 years agoswitch to target-indep fixups for 1/2/4/8 byte data.
Chris Lattner [Thu, 11 Feb 2010 21:17:54 +0000 (21:17 +0000)]
switch to target-indep fixups for 1/2/4/8 byte data.

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

14 years agorevert 95903.
Devang Patel [Thu, 11 Feb 2010 20:58:56 +0000 (20:58 +0000)]
revert 95903.

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

14 years agoIt is always good to do a cross-class join when the large register has a tiny interval.
Jakob Stoklund Olesen [Thu, 11 Feb 2010 20:58:45 +0000 (20:58 +0000)]
It is always good to do a cross-class join when the large register has a tiny interval.

Also avoid division by zero.

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

14 years agoAdded LDRT/LDRBT/STRT/STRBT for disassembly only.
Johnny Chen [Thu, 11 Feb 2010 20:31:08 +0000 (20:31 +0000)]
Added LDRT/LDRBT/STRT/STRBT for disassembly only.

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

14 years agounbreak the build.
Chris Lattner [Thu, 11 Feb 2010 19:52:11 +0000 (19:52 +0000)]
unbreak the build.

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

14 years agollvm-db was removed.
Dan Gohman [Thu, 11 Feb 2010 19:35:26 +0000 (19:35 +0000)]
llvm-db was removed.

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

14 years agoDestroy MDNodes while destructing llvm context.
Devang Patel [Thu, 11 Feb 2010 19:35:10 +0000 (19:35 +0000)]
Destroy MDNodes while destructing llvm context.

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

14 years agorefactor x86 conditional branches to use a multipattern
Chris Lattner [Thu, 11 Feb 2010 19:31:22 +0000 (19:31 +0000)]
refactor x86 conditional branches to use a multipattern
that generates the 1-byte and 4-byte immediate versions
from one definition.

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

14 years agorefactor the conditional jump instructions in the .td file to
Chris Lattner [Thu, 11 Feb 2010 19:25:55 +0000 (19:25 +0000)]
refactor the conditional jump instructions in the .td file to
use a multipattern that generates both the 1-byte and 4-byte
versions from the same defm

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

14 years agoMake Kaleidoscope not link against the interpreter, since that didn't
Jeffrey Yasskin [Thu, 11 Feb 2010 19:15:20 +0000 (19:15 +0000)]
Make Kaleidoscope not link against the interpreter, since that didn't
work anyway (Interpreter::getPointerToFunction doesn't return a
callable pointer), and improve the error message when an
ExecutionEngine can't be created.

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

14 years agoAdd an svn:ignore.
Dan Gohman [Thu, 11 Feb 2010 19:07:04 +0000 (19:07 +0000)]
Add an svn:ignore.

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

14 years agoForgot to also check in this file for vcvt (floating-point <-> fixed-point, VFP).
Johnny Chen [Thu, 11 Feb 2010 18:47:03 +0000 (18:47 +0000)]
Forgot to also check in this file for vcvt (floating-point <-> fixed-point, VFP).
Sorry!

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

14 years agoAllow for more than one DBG_VALUE targeting the
Dale Johannesen [Thu, 11 Feb 2010 18:23:23 +0000 (18:23 +0000)]
Allow for more than one DBG_VALUE targeting the
same dead instruction.

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

14 years agoDon't allow DBG_VALUE to affect codegen.
Dale Johannesen [Thu, 11 Feb 2010 18:22:31 +0000 (18:22 +0000)]
Don't allow DBG_VALUE to affect codegen.

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

14 years agoAdded VCVT (between floating-point and fixed-point, VFP) for disassembly.
Johnny Chen [Thu, 11 Feb 2010 18:17:16 +0000 (18:17 +0000)]
Added VCVT (between floating-point and fixed-point, VFP) for disassembly.
A8.6.297

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

14 years agoAdded BKPT/tBKPT (breakpoint) to the instruction table for disassembly purpose.
Johnny Chen [Thu, 11 Feb 2010 18:12:29 +0000 (18:12 +0000)]
Added BKPT/tBKPT (breakpoint) to the instruction table for disassembly purpose.

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

14 years agoUse array_pod_sort instead of std::sort for improved code size.
Jakob Stoklund Olesen [Thu, 11 Feb 2010 18:06:56 +0000 (18:06 +0000)]
Use array_pod_sort instead of std::sort for improved code size.

Use SmallVector instead of std::vector for better speed when indirectbr has
few successors.

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

14 years agoMake sure that ConstantExpr offsets also aren't off of extern
Eric Christopher [Thu, 11 Feb 2010 17:44:04 +0000 (17:44 +0000)]
Make sure that ConstantExpr offsets also aren't off of extern
symbols.

Thanks to Duncan Sands for the testcase!

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

14 years agoAdd pseudo instruction TRAP for disassembly, which is encoded according to A5-21
Johnny Chen [Thu, 11 Feb 2010 17:14:31 +0000 (17:14 +0000)]
Add pseudo instruction TRAP for disassembly, which is encoded according to A5-21
as the "Permanently UNDEFINED" instruction.

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

14 years agoUse .empty() instead of .size().
Bill Wendling [Thu, 11 Feb 2010 10:37:57 +0000 (10:37 +0000)]
Use .empty() instead of .size().

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

14 years agodont' call getX86RegNum on X86::RIP, it doesn't like that. This
Chris Lattner [Thu, 11 Feb 2010 08:45:56 +0000 (08:45 +0000)]
dont' call getX86RegNum on X86::RIP, it doesn't like that.  This
fixes the remaining x86-64 jit failures afaik.

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

14 years agofix a really nasty bug I introduced in r95693: r12 (and r12d,
Chris Lattner [Thu, 11 Feb 2010 08:41:21 +0000 (08:41 +0000)]
fix a really nasty bug I introduced in r95693: r12 (and r12d,
r12b, etc) also encodes to a R/M value of 4, which is just
as illegal as ESP/RSP for the non-sib version an address.

This fixes x86-64 jit miscompilations of a bunch of programs.

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

14 years agoFix (harmless) memory leak found by memcheck.
Jeffrey Yasskin [Thu, 11 Feb 2010 07:16:13 +0000 (07:16 +0000)]
Fix (harmless) memory leak found by memcheck.

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

14 years agoAdd and commonize encoder support for all immediates.
Chris Lattner [Thu, 11 Feb 2010 07:06:31 +0000 (07:06 +0000)]
Add and commonize encoder support for all immediates.
Stub out some dummy fixups to make things work.

We can now emit fixups like this:
subl $20, %esp               ## encoding: [0x83,0xec,A]
                                        ##   fixup A - offset: 2, value: 20, kind: fixup_1byte_imm

Emitting $20 as a single-byte fixup to be later resolved
by the assembler is ridiculous of course (vs just emitting
the byte) but this is a failure of the matcher, which
should be producing an imm of 20, not an MCExpr of 20.

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

14 years agogeneralize EmitDisplacementField to work with any size
Chris Lattner [Thu, 11 Feb 2010 06:54:23 +0000 (06:54 +0000)]
generalize EmitDisplacementField to work with any size
and rename it to EmitImmediate.

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

14 years agoeliminate the dead IsPCRel argument.
Chris Lattner [Thu, 11 Feb 2010 06:51:36 +0000 (06:51 +0000)]
eliminate the dead IsPCRel argument.

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

14 years agoeliminate the dead "PCAdj" logic.
Chris Lattner [Thu, 11 Feb 2010 06:49:52 +0000 (06:49 +0000)]
eliminate the dead "PCAdj" logic.

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

14 years agoFix some of the memcheck errors found in the JIT unittests.
Jeffrey Yasskin [Thu, 11 Feb 2010 06:41:30 +0000 (06:41 +0000)]
Fix some of the memcheck errors found in the JIT unittests.

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

14 years agoRename ValueRequiresCast to ShouldOptimizeCast, to better reflect
Chris Lattner [Thu, 11 Feb 2010 06:26:33 +0000 (06:26 +0000)]
Rename ValueRequiresCast to ShouldOptimizeCast, to better reflect
what it does.  Enhance it to return false to optimizing vector
sign extensions from vector comparisions, which is the idiom used
to get a splatted vector for a vector comparison.

Doing this breaks vector-casts.ll, add some compensating
transformations to handle the important case they cover without
depending on this canonicalization.

This fixes rdar://7434900 a serious pessimization of vector compares.

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

14 years agoconvert to filecheck.
Chris Lattner [Thu, 11 Feb 2010 06:24:37 +0000 (06:24 +0000)]
convert to filecheck.

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

14 years agoMake DSE only scan blocks that are reachable from the entry
Chris Lattner [Thu, 11 Feb 2010 05:11:54 +0000 (05:11 +0000)]
Make DSE only scan blocks that are reachable from the entry
block.  Other blocks may have pointer cycles that will crash
basicaa and other alias analyses.  In any case, there is no
point wasting cycles optimizing dead blocks.  This fixes
rdar://7635088

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

14 years agoa testcase that doesn't crash GVN but could someday.
Chris Lattner [Thu, 11 Feb 2010 05:08:05 +0000 (05:08 +0000)]
a testcase that doesn't crash GVN but could someday.

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

14 years agoMake jump threading honor x|undef -> true and x&undef -> false,
Chris Lattner [Thu, 11 Feb 2010 04:40:44 +0000 (04:40 +0000)]
Make jump threading honor x|undef -> true and x&undef -> false,
instead of considering x|undef -> x, which may not be true.

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

14 years agoAdd ConstantExpr handling to Intrinsic::objectsize lowering.
Eric Christopher [Thu, 11 Feb 2010 01:48:54 +0000 (01:48 +0000)]
Add ConstantExpr handling to Intrinsic::objectsize lowering.

Update testcase accordingly now that we can optimize another
section.

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

14 years agotest case for r95842.
Devang Patel [Thu, 11 Feb 2010 01:31:01 +0000 (01:31 +0000)]
test case for r95842.

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

14 years agoFix to get it to compile.
Bill Wendling [Thu, 11 Feb 2010 01:15:27 +0000 (01:15 +0000)]
Fix to get it to compile.

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

14 years agoDon't print out a default newline when emitting the section offset. There are
Bill Wendling [Thu, 11 Feb 2010 01:13:02 +0000 (01:13 +0000)]
Don't print out a default newline when emitting the section offset. There are
almost always comments afterwards that need printing.

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

14 years agoMake it possible to create multiple JIT instances at the same time, by removing
Jeffrey Yasskin [Thu, 11 Feb 2010 01:07:39 +0000 (01:07 +0000)]
Make it possible to create multiple JIT instances at the same time, by removing
the global TheJIT and TheJITResolver variables.  Lazy compilation is supported
by a global map from a stub address to the JITResolver that knows how to
compile it.

Patch by Olivier Meurant!

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

14 years agoReuse operand location when updating PHI instructions.
Jakob Stoklund Olesen [Thu, 11 Feb 2010 00:34:33 +0000 (00:34 +0000)]
Reuse operand location when updating PHI instructions.

Calling RemoveOperand is very expensive on huge PHI instructions. This makes
early tail duplication run twice as fast on the Firefox JavaScript
interpreter.

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

14 years agoRemove duplicate successors from indirectbr instructions before building the machine...
Jakob Stoklund Olesen [Thu, 11 Feb 2010 00:34:18 +0000 (00:34 +0000)]
Remove duplicate successors from indirectbr instructions before building the machine CFG.

This makes early tail duplication run 60 times faster when compiling the Firefox
JavaScript interpreter, see PR6186.

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

14 years agoIgnore dbg info intrinsics.
Devang Patel [Thu, 11 Feb 2010 00:20:49 +0000 (00:20 +0000)]
Ignore dbg info intrinsics.

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

14 years agoRemove the few # TAILCALL comments that snuck in. As they may fail on linux.
Kevin Enderby [Thu, 11 Feb 2010 00:18:12 +0000 (00:18 +0000)]
Remove the few # TAILCALL comments that snuck in.  As they may fail on linux.

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

14 years agoUpdate the X86 assembler matcher test case now that a few more things match
Kevin Enderby [Thu, 11 Feb 2010 00:13:43 +0000 (00:13 +0000)]
Update the X86 assembler matcher test case now that a few more things match
with some of the recent changes that have gone into llvm-mc.

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

14 years agoAdd support to llvm-extract for extracting multiple functions and/or
Dan Gohman [Wed, 10 Feb 2010 23:58:53 +0000 (23:58 +0000)]
Add support to llvm-extract for extracting multiple functions and/or
multiple global variables at a time.

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

14 years agoThe previous fix of widening divides that trap was too fragile as it depends on custom
Mon P Wang [Wed, 10 Feb 2010 23:37:45 +0000 (23:37 +0000)]
The previous fix of widening divides that trap was too fragile as it depends on custom
lowering and requires that certain types exist in ValueTypes.h.  Modified widening to
check if an op can trap and if so, the widening algorithm will apply only the op on
the defined elements.  It is safer to do this in widening because the optimizer can't
guarantee removing unused ops in some cases.

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

14 years agoIgnore debug info one more place during coalescing.
Dale Johannesen [Wed, 10 Feb 2010 23:04:09 +0000 (23:04 +0000)]
Ignore debug info one more place during coalescing.

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

14 years agoAllow isDebug inquiry on any MO.
Dale Johannesen [Wed, 10 Feb 2010 23:03:20 +0000 (23:03 +0000)]
Allow isDebug inquiry on any MO.

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

14 years agoDelete dead PHI machine instructions. These can be created due to type
Bob Wilson [Wed, 10 Feb 2010 22:58:57 +0000 (22:58 +0000)]
Delete dead PHI machine instructions.  These can be created due to type
legalization even when the IR-level optimizer has removed dead phis, such
as when the high half of an i64 value is unused on a 32-bit target.
I had to adjust a few test cases that had dead phis.
This is a partial fix for Radar 7627077.

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

14 years agoSkip debug info in a couple of places.
Dale Johannesen [Wed, 10 Feb 2010 21:47:48 +0000 (21:47 +0000)]
Skip debug info in a couple of places.

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

14 years agoUse an index instead of pointers into the vector. If the vector resizes, then
Bill Wendling [Wed, 10 Feb 2010 21:41:57 +0000 (21:41 +0000)]
Use an index instead of pointers into the vector. If the vector resizes, then
the pointer values could be invalid.

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

14 years agoWhen I rewrote this loop per Chris' preference I
Dale Johannesen [Wed, 10 Feb 2010 21:41:41 +0000 (21:41 +0000)]
When I rewrote this loop per Chris' preference I
changed its behavior.  Oops.

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

14 years agoadd a virtual dtor to MCTargetExpr, hopefully silencing some warnings.
Chris Lattner [Wed, 10 Feb 2010 21:37:31 +0000 (21:37 +0000)]
add a virtual dtor to MCTargetExpr, hopefully silencing some warnings.

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

14 years agoA few missed optimizations; the last one could have a significant impact on
Eli Friedman [Wed, 10 Feb 2010 21:26:04 +0000 (21:26 +0000)]
A few missed optimizations; the last one could have a significant impact on
code with lots of bitfields.

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

14 years agowork around a gcc bug with -Wuninitialized.
Chris Lattner [Wed, 10 Feb 2010 21:22:51 +0000 (21:22 +0000)]
work around a gcc bug with -Wuninitialized.

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

14 years agoStrip new llvm.dbg.value intrinsic.
Devang Patel [Wed, 10 Feb 2010 21:19:56 +0000 (21:19 +0000)]
Strip new llvm.dbg.value intrinsic.

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

14 years agoMC/X86 AsmMatcher: Fix a use after free spotted by d0k, and de-XFAIL
Daniel Dunbar [Wed, 10 Feb 2010 21:19:28 +0000 (21:19 +0000)]
MC/X86 AsmMatcher: Fix a use after free spotted by d0k, and de-XFAIL
x86_32-encoding.s in on expectation of it passing.

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

14 years agoXFAIL this on linux until I figure out what is happening.
Daniel Dunbar [Wed, 10 Feb 2010 21:01:04 +0000 (21:01 +0000)]
XFAIL this on linux until I figure out what is happening.

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

14 years agolit: Ignore dot files when scanning for tests (e.g., editor temprary files,
Daniel Dunbar [Wed, 10 Feb 2010 21:00:55 +0000 (21:00 +0000)]
lit: Ignore dot files when scanning for tests (e.g., editor temprary files,
etc.)

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

14 years agoMC/AsmMatcher: Tweak conversion function name.
Daniel Dunbar [Wed, 10 Feb 2010 21:00:47 +0000 (21:00 +0000)]
MC/AsmMatcher: Tweak conversion function name.

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

14 years agoMinor whitespace cleanups.
Dan Gohman [Wed, 10 Feb 2010 20:42:57 +0000 (20:42 +0000)]
Minor whitespace cleanups.

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

14 years agoUse an AssemblyAnnotatorWriter to clean up IVUsers' debug output.
Dan Gohman [Wed, 10 Feb 2010 20:42:37 +0000 (20:42 +0000)]
Use an AssemblyAnnotatorWriter to clean up IVUsers' debug output.
The "uses=" comments are just clutter in this context.

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

14 years agoAdd a hook to AssemblyAnnotationWriter to allow custom info comments
Dan Gohman [Wed, 10 Feb 2010 20:41:46 +0000 (20:41 +0000)]
Add a hook to AssemblyAnnotationWriter to allow custom info comments
to be printed, in place of the familiar "uses=" comments.

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

14 years agoUse doxygen comment syntax.
Dan Gohman [Wed, 10 Feb 2010 20:23:33 +0000 (20:23 +0000)]
Use doxygen comment syntax.

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

14 years agoFix several comments which had previously been "the the" where a
Dan Gohman [Wed, 10 Feb 2010 20:04:19 +0000 (20:04 +0000)]
Fix several comments which had previously been "the the" where a
different word was intended.

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

14 years agoReplace this file containing 4 tests of x86 32-bit encodings with a file
Kevin Enderby [Wed, 10 Feb 2010 19:13:56 +0000 (19:13 +0000)]
Replace this file containing 4 tests of x86 32-bit encodings with a file
containing the subset of the full auto generated test case that currently
encodes correctly.  Again it is useful as we bring up the the new encoder
to make sure currently working stuff stays working.

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

14 years agoAdded NOP, DBG, SVC to the instruction table for disassembly purpose.
Johnny Chen [Wed, 10 Feb 2010 18:02:25 +0000 (18:02 +0000)]
Added NOP, DBG, SVC to the instruction table for disassembly purpose.

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

14 years agoFix "the the" and similar typos.
Dan Gohman [Wed, 10 Feb 2010 16:03:48 +0000 (16:03 +0000)]
Fix "the the" and similar typos.

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

14 years agoMinor code simplification.
Dan Gohman [Wed, 10 Feb 2010 15:54:22 +0000 (15:54 +0000)]
Minor code simplification.

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

14 years agoSilence GCC warnings.
Benjamin Kramer [Wed, 10 Feb 2010 13:34:02 +0000 (13:34 +0000)]
Silence GCC warnings.

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