oota-llvm.git
15 years agoadd 8 and 16 bit TLS moves.
Rafael Espindola [Fri, 13 Mar 2009 19:39:55 +0000 (19:39 +0000)]
add 8 and 16 bit TLS moves.
add a fixme note on how to remove code duplication.

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

15 years agoOne more place where debug info affects codegen.
Dale Johannesen [Fri, 13 Mar 2009 19:23:20 +0000 (19:23 +0000)]
One more place where debug info affects codegen.

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

15 years agoTest case for rev. 66925
Devang Patel [Fri, 13 Mar 2009 18:50:51 +0000 (18:50 +0000)]
Test case for rev. 66925

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

15 years agoImprove sext and zext of TLS variables.
Rafael Espindola [Fri, 13 Mar 2009 18:37:06 +0000 (18:37 +0000)]
Improve sext and zext of TLS variables.

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

15 years agoSecond installment of "BasicBlock operands to the back"
Gabor Greif [Fri, 13 Mar 2009 18:27:29 +0000 (18:27 +0000)]
Second installment of "BasicBlock operands to the back"
changes.

For InvokeInst now all arguments begin at op_begin().
The Callee, Cont and Fail are now faster to get by
access relative to op_end().

This patch introduces some temporary uglyness in CallSite.
Next I'll bring CallInst up to a similar scheme and then
the uglyness will magically vanish.

This patch also exposes all the reliance of the libraries
on InvokeInst's operand ordering. I am thinking of taking
care of that too.

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

15 years agoremove a buggy test, it is not ok to use -debug in RUN line.
Chris Lattner [Fri, 13 Mar 2009 18:19:34 +0000 (18:19 +0000)]
remove a buggy test, it is not ok to use -debug in RUN line.

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

15 years agogeneralize this code so that fast isel handles integer truncates to i1, which
Chris Lattner [Fri, 13 Mar 2009 16:36:42 +0000 (16:36 +0000)]
generalize this code so that fast isel handles integer truncates to i1, which
codegen to the same thing as integer truncates to i8 (the top bits are
just undefined).  This implements rdar://6667338

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

15 years agoadd a new TGError class and use it to propagate location info with
Chris Lattner [Fri, 13 Mar 2009 16:25:21 +0000 (16:25 +0000)]
add a new TGError class and use it to propagate location info with
errors when thrown.  This gets us nice errors like this from tblgen:

CMOVL32rr:  (set GR32:i32:$dst, (X86cmov GR32:$src1, GR32:$src2))
/Users/sabre/llvm/Debug/bin/tblgen: error:
Included from X86.td:116:
Parsing X86InstrInfo.td:922: In CMOVL32rr: X86cmov node requires exactly 4 operands!
def CMOVL32rr : I<0x4C, MRMSrcReg,       // if <s, GR32 = GR32
^

instead of just:

CMOVL32rr:  (set GR32:i32:$dst, (X86cmov GR32:$src1, GR32:$src2))
/Users/sabre/llvm/Debug/bin/tblgen: In CMOVL32rr: X86cmov node requires exactly 4 operands!

This is all I plan to do with this, but it should be easy enough to improve if anyone
cares (e.g. keeping more loc info in "dag" expr records in tblgen.

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

15 years agogive each Record a location.
Chris Lattner [Fri, 13 Mar 2009 16:09:24 +0000 (16:09 +0000)]
give each Record a location.

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

15 years agomake "locations" a class instead of a typedef.
Chris Lattner [Fri, 13 Mar 2009 16:01:53 +0000 (16:01 +0000)]
make "locations" a class instead of a typedef.

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

15 years agoUpdate these for the 2.5 release.
Duncan Sands [Fri, 13 Mar 2009 13:42:20 +0000 (13:42 +0000)]
Update these for the 2.5 release.

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

15 years agoThese instructions have special lowering that may lower them to SSE
Bill Wendling [Fri, 13 Mar 2009 08:41:47 +0000 (08:41 +0000)]
These instructions have special lowering that may lower them to SSE
instructions. Prevent that if we don't want implicit uses of SSE.

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

15 years agoUnbreak build, bring in std::string for GCC 4.3
Argyrios Kyrtzidis [Fri, 13 Mar 2009 08:12:13 +0000 (08:12 +0000)]
Unbreak build, bring in std::string for GCC 4.3

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

15 years agoFix some significant problems with constant pools that resulted in unnecessary paddin...
Evan Cheng [Fri, 13 Mar 2009 07:51:59 +0000 (07:51 +0000)]
Fix some significant problems with constant pools that resulted in unnecessary paddings between constant pool entries, larger than necessary alignments (e.g. 8 byte alignment for .literal4 sections), and potentially other issues.

1. ConstantPoolSDNode alignment field is log2 value of the alignment requirement. This is not consistent with other SDNode variants.
2. MachineConstantPool alignment field is also a log2 value.
3. However, some places are creating ConstantPoolSDNode with alignment value rather than log2 values. This creates entries with artificially large alignments, e.g. 256 for SSE vector values.
4. Constant pool entry offsets are computed when they are created. However, asm printer group them by sections. That means the offsets are no longer valid. However, asm printer uses them to determine size of padding between entries.
5. Asm printer uses expensive data structure multimap to track constant pool entries by sections.
6. Asm printer iterate over SmallPtrSet when it's emitting constant pool entries. This is non-deterministic.

Solutions:
1. ConstantPoolSDNode alignment field is changed to keep non-log2 value.
2. MachineConstantPool alignment field is also changed to keep non-log2 value.
3. Functions that create ConstantPool nodes are passing in non-log2 alignments.
4. MachineConstantPoolEntry no longer keeps an offset field. It's replaced with an alignment field. Offsets are not computed when constant pool entries are created. They are computed on the fly in asm printer and JIT.
5. Asm printer uses cheaper data structure to group constant pool entries.
6. Asm printer compute entry offsets after grouping is done.
7. Change JIT code to compute entry offsets on the fly.

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

15 years agoUnbreak build.
Evan Cheng [Fri, 13 Mar 2009 07:41:30 +0000 (07:41 +0000)]
Unbreak build.

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

15 years agosplit buffer management and diagnostic printing out of the tblgen
Chris Lattner [Fri, 13 Mar 2009 07:05:43 +0000 (07:05 +0000)]
split buffer management and diagnostic printing out of the tblgen
lexer into its own TGSourceMgr class.

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

15 years agoConvert VirtRegMap to a MachineFunctionPass.
Owen Anderson [Fri, 13 Mar 2009 05:55:11 +0000 (05:55 +0000)]
Convert VirtRegMap to a MachineFunctionPass.

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

15 years agogeneralize the previous code to use the full generality of LEA
Chris Lattner [Fri, 13 Mar 2009 05:53:31 +0000 (05:53 +0000)]
generalize the previous code to use the full generality of LEA
for i32/i64 expressions (we could also do i16 on cpus where
i16 lea is fast, but I didn't add this).  On the example, we now
generate:

_test:
movl 4(%esp), %eax
cmpl $42, (%eax)
setl %al
movzbl %al, %eax
leal 4(%eax,%eax,8), %eax
ret

instead of:

_test:
movl 4(%esp), %eax
cmpl $41, (%eax)
movl $4, %ecx
movl $13, %eax
cmovg %ecx, %eax
ret

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

15 years agooptimize the case of cond ? 42 : 41 and friends. This compiles the
Chris Lattner [Fri, 13 Mar 2009 05:22:11 +0000 (05:22 +0000)]
optimize the case of cond ? 42 : 41 and friends.  This compiles the
example to:

_test:
movl 4(%esp), %eax
cmpl $41, (%eax)
setg %al
movzbl %al, %eax
orl $4294967294, %eax
ret

instead of:

        movl    4(%esp), %eax
        cmpl    $41, (%eax)
movl $4294967294, %ecx
movl $4294967295, %eax
cmova %ecx, %eax
ret

which is smaller in code size and faster. rdar://6668608

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

15 years agoOops...I committed too much.
Bill Wendling [Fri, 13 Mar 2009 04:39:26 +0000 (04:39 +0000)]
Oops...I committed too much.

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

15 years agoTemporarily XFAIL this test.
Bill Wendling [Fri, 13 Mar 2009 04:37:11 +0000 (04:37 +0000)]
Temporarily XFAIL this test.

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

15 years agoEnhance address-mode folding of ISD::ADD to handle cases where the
Dan Gohman [Fri, 13 Mar 2009 02:25:09 +0000 (02:25 +0000)]
Enhance address-mode folding of ISD::ADD to handle cases where the
operands can't both be fully folded at the same time. For example,
in the included testcase, a global variable is being added with
an add of two values. The global variable wants RIP-relative
addressing, so it can't share the address with another base
register, but it's still possible to fold the initial add.

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

15 years agoFix one more place where debug info affected
Dale Johannesen [Fri, 13 Mar 2009 01:05:24 +0000 (01:05 +0000)]
Fix one more place where debug info affected
codegen (speculative execution).

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

15 years agojust initialize the first element, we don't need to set the rest to zeros.
Chris Lattner [Fri, 13 Mar 2009 00:24:01 +0000 (00:24 +0000)]
just initialize the first element, we don't need to set the rest to zeros.

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

15 years agoEliminate a 9640 byte static mutable initialized data item by moving it
Chris Lattner [Fri, 13 Mar 2009 00:03:51 +0000 (00:03 +0000)]
Eliminate a 9640 byte static mutable initialized data item by moving it
to the stack.  This shrinks all llvm tools by 9k, and improves reentrancy.

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

15 years agostatic functions don't need an anonymous namespace.
Chris Lattner [Thu, 12 Mar 2009 23:59:55 +0000 (23:59 +0000)]
static functions don't need an anonymous namespace.

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

15 years agoFix a typo in a comment.
Dan Gohman [Thu, 12 Mar 2009 23:55:10 +0000 (23:55 +0000)]
Fix a typo in a comment.

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

15 years agoPrevious debug info fix to this code wasn't quite
Dale Johannesen [Thu, 12 Mar 2009 23:18:09 +0000 (23:18 +0000)]
Previous debug info fix to this code wasn't quite
right; did the wrong thing when there are exactly 11
non-debug instructions, followed by debug info.
Remove a FIXME since it's apparently been fixed along the way.

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

15 years agocosmetic change, in preparation of future change
Gabor Greif [Thu, 12 Mar 2009 23:13:03 +0000 (23:13 +0000)]
cosmetic change, in preparation of future change

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

15 years agoAdd this test back.
Evan Cheng [Thu, 12 Mar 2009 23:01:35 +0000 (23:01 +0000)]
Add this test back.

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

15 years agoraw_ostream: unbuffered streams weren't being immediately flushed on
Daniel Dunbar [Thu, 12 Mar 2009 22:02:44 +0000 (22:02 +0000)]
raw_ostream: unbuffered streams weren't being immediately flushed on
single character writes.

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

15 years agoRevert commit 66140 since it caused several failures
Duncan Sands [Thu, 12 Mar 2009 21:13:42 +0000 (21:13 +0000)]
Revert commit 66140 since it caused several failures
in the Ada testcase.  Reverting this only covers up
the real problem, which is a nasty conceptual difficulty
in the phi elimination pass: when eliminating phi nodes
in landing pads, the register copies need to come before
the invoke, not at the end of the basic block which is
too late...  See PR3784.

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

15 years agoDarwin 10.4.x: "-rpath" is unnecessary when linking shared libraries.
Scott Michel [Thu, 12 Mar 2009 21:03:53 +0000 (21:03 +0000)]
Darwin 10.4.x: "-rpath" is unnecessary when linking shared libraries.

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

15 years agoThere already was a class to force deterministic
Dale Johannesen [Thu, 12 Mar 2009 21:01:11 +0000 (21:01 +0000)]
There already was a class to force deterministic
sorting of ConstantInt's; unreinvent wheel.

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

15 years agoFix an inconsistent use of LLVMGCCDIR. In all other cases, this directory
Bob Wilson [Thu, 12 Mar 2009 19:47:24 +0000 (19:47 +0000)]
Fix an inconsistent use of LLVMGCCDIR.  In all other cases, this directory
refers to the "prefix" directory, i.e., one level above "bin".  LLVMGCCPATH
is used as the directory containing the llvm-gcc executable, so add a "/bin"
suffix to get from LLVMGCCDIR to LLVMGCCPATH.

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

15 years agoRearrange operands of the BranchInst, to be able to
Gabor Greif [Thu, 12 Mar 2009 18:34:49 +0000 (18:34 +0000)]
Rearrange operands of the BranchInst, to be able to
access each with a fixed negative index from op_end().

This has two important implications:
- getUser() will work faster, because there are less iterations
  for the waymarking algorithm to perform. This is important
  when running various analyses that want to determine callers
  of basic blocks.
- getSuccessor() now runs faster, because the indirection via OperandList
  is not necessary: Uses corresponding to the successors are at fixed
  offset to "this".

The price we pay is the slightly more complicated logic in the operator
User::delete, as it has to pick up the information whether it has to free
the memory of an original unconditional BranchInst or a BranchInst that
was originally conditional, but has been shortened to unconditional.
I was not able to come up with a nicer solution to this problem. (And
rest assured, I tried *a lot*).

Similar reorderings will follow for InvokeInst and CallInst. After that
some optimizations to pred_iterator and CallSite will fall out naturally.

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

15 years agoRe-apply 66024 with fixes: 1. Fixed indirect call to immediate address assembly....
Evan Cheng [Thu, 12 Mar 2009 18:15:39 +0000 (18:15 +0000)]
Re-apply 66024 with fixes: 1. Fixed indirect call to immediate address assembly. 2. Fixed JIT encoding by making the address pc-relative.

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

15 years agoAnother missing check for debug intrinsics.
Dale Johannesen [Thu, 12 Mar 2009 17:42:45 +0000 (17:42 +0000)]
Another missing check for debug intrinsics.

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

15 years agoFully initialize all ivars, fixing PR3790, patch by Edwin Torok!
Chris Lattner [Thu, 12 Mar 2009 17:22:48 +0000 (17:22 +0000)]
Fully initialize all ivars, fixing PR3790, patch by Edwin Torok!

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

15 years agoTypo.
Evan Cheng [Thu, 12 Mar 2009 17:07:39 +0000 (17:07 +0000)]
Typo.

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

15 years agoFix test after Chris' select changes.
Evan Cheng [Thu, 12 Mar 2009 16:10:08 +0000 (16:10 +0000)]
Fix test after Chris' select changes.

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

15 years agoAdjust this test for recent sroa improvements.
Duncan Sands [Thu, 12 Mar 2009 11:56:12 +0000 (11:56 +0000)]
Adjust this test for recent sroa improvements.

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

15 years agoadd some text to explain sentinels
Gabor Greif [Thu, 12 Mar 2009 10:30:31 +0000 (10:30 +0000)]
add some text to explain sentinels

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

15 years agominor tweaks
Gabor Greif [Thu, 12 Mar 2009 09:47:03 +0000 (09:47 +0000)]
minor tweaks

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

15 years agoReorganize some #include's.
Owen Anderson [Thu, 12 Mar 2009 06:58:19 +0000 (06:58 +0000)]
Reorganize some #include's.

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

15 years agoMove 3 "(add (select cc, 0, c), x) -> (select cc, x, (add, x, c))"
Chris Lattner [Thu, 12 Mar 2009 06:52:53 +0000 (06:52 +0000)]
Move 3 "(add (select cc, 0, c), x) -> (select cc, x, (add, x, c))"
related transformations out of target-specific dag combine into the
ARM backend.  These were added by Evan in r37685 with no testcases
and only seems to help ARM (e.g. test/CodeGen/ARM/select_xform.ll).

Add some simple X86-specific (for now) DAG combines that turn things
like cond ? 8 : 0  -> (zext(cond) << 3).  This happens frequently
with the recently added cp constant select optimization, but is a
very general xform.  For example, we now compile the second example
in const-select.ll to:

_test:
        movsd   LCPI2_0, %xmm0
        ucomisd 8(%esp), %xmm0
        seta    %al
        movzbl  %al, %eax
        movl    4(%esp), %ecx
        movsbl  (%ecx,%eax,4), %eax
        ret

instead of:

_test:
        movl    4(%esp), %eax
        leal    4(%eax), %ecx
        movsd   LCPI2_0, %xmm0
        ucomisd 8(%esp), %xmm0
        cmovbe  %eax, %ecx
        movsbl  (%ecx), %eax
        ret

This passes multisource and dejagnu.

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

15 years agoimprove comment.
Chris Lattner [Thu, 12 Mar 2009 06:46:02 +0000 (06:46 +0000)]
improve comment.

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

15 years agoEnable Chris' value propagation change. It make available known sign, zero, one bits...
Evan Cheng [Thu, 12 Mar 2009 06:29:49 +0000 (06:29 +0000)]
Enable Chris' value propagation change. It make available known sign, zero, one bits information for values that are live out of basic blocks. The goal is to eliminate unnecessary sext, zext, truncate of values that are live-in to blocks. This does not handle PHI nodes yet.

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

15 years agoOn x86, if the only use of a i64 load is a i64 store, generate a pair of double load...
Evan Cheng [Thu, 12 Mar 2009 05:59:15 +0000 (05:59 +0000)]
On x86, if the only use of a i64 load is a i64 store, generate a pair of double load and store instead.

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

15 years agoadd no-unwind, remove duplicate run line.
Chris Lattner [Thu, 12 Mar 2009 05:56:37 +0000 (05:56 +0000)]
add no-unwind, remove duplicate run line.

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

15 years agoadd nounwinds
Chris Lattner [Thu, 12 Mar 2009 05:35:33 +0000 (05:35 +0000)]
add nounwinds

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

15 years agoRevert r66765 and r66766. These were causing build failures on Darwin.
Bill Wendling [Thu, 12 Mar 2009 04:10:09 +0000 (04:10 +0000)]
Revert r66765 and r66766. These were causing build failures on Darwin.

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

15 years agoRegenerate.
Nick Lewycky [Thu, 12 Mar 2009 03:34:33 +0000 (03:34 +0000)]
Regenerate.

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

15 years agoSet ARCH to x86 on mixed 32/64-bit Linux systems.
Nick Lewycky [Thu, 12 Mar 2009 03:34:19 +0000 (03:34 +0000)]
Set ARCH to x86 on mixed 32/64-bit Linux systems.

Remove the explicit if OS = Darwin test around the setting of -m32/-m64.

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

15 years agoForgot to check-in this as part of 7761.
Sanjiv Gupta [Thu, 12 Mar 2009 03:20:07 +0000 (03:20 +0000)]
Forgot to check-in this as part of 7761.

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

15 years agoBanksel optimization is now based on the section names of symbols, since the symbols...
Sanjiv Gupta [Thu, 12 Mar 2009 02:10:45 +0000 (02:10 +0000)]
Banksel optimization is now based on the section names of symbols, since the symbols in one section will always be put into one bank.

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

15 years agoAllow for switch values bigger than 64 bits.
Dale Johannesen [Thu, 12 Mar 2009 01:20:06 +0000 (01:20 +0000)]
Allow for switch values bigger than 64 bits.

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

15 years agoAdd StringMap::lookup.
Daniel Dunbar [Thu, 12 Mar 2009 01:16:06 +0000 (01:16 +0000)]
Add StringMap::lookup.

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

15 years agoFix some nondeterministic behavior when forwarding
Dale Johannesen [Thu, 12 Mar 2009 01:00:26 +0000 (01:00 +0000)]
Fix some nondeterministic behavior when forwarding
from a switch table.  Multiple table entries that
branch to the same place were being sorted by the
pointer value of the ConstantInt*; changed to sort
by the actual value of the ConstantInt.

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

15 years agoAlso pass -gcc-tool-args when building a shared object.
Evan Cheng [Thu, 12 Mar 2009 00:53:34 +0000 (00:53 +0000)]
Also pass -gcc-tool-args when building a shared object.

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

15 years agoRevert r66024. The JIT encoding for CALLpcrel32 is wrong -- see PR3773, and the
Dan Gohman [Wed, 11 Mar 2009 23:01:47 +0000 (23:01 +0000)]
Revert r66024. The JIT encoding for CALLpcrel32 is wrong -- see PR3773, and the
assembly text output uses an indirect call ("call *") instead of a direct call.

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

15 years agoupdate
Gabor Greif [Wed, 11 Mar 2009 22:52:25 +0000 (22:52 +0000)]
update

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

15 years agooptimize i8 and i16 tls values.
Rafael Espindola [Wed, 11 Mar 2009 22:40:04 +0000 (22:40 +0000)]
optimize i8 and i16 tls values.

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

15 years agoReorganization: Move the Spiller out of VirtRegMap.cpp into its own files. No (inten...
Owen Anderson [Wed, 11 Mar 2009 22:31:21 +0000 (22:31 +0000)]
Reorganization: Move the Spiller out of VirtRegMap.cpp into its own files.  No (intended) functionality change.

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

15 years agoAdd a -no-implicit-float flag. This acts like -soft-float, but may generate
Bill Wendling [Wed, 11 Mar 2009 22:30:01 +0000 (22:30 +0000)]
Add a -no-implicit-float flag. This acts like -soft-float, but may generate
floating point instructions that are explicitly specified by the user.

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

15 years agoSkip interleaved debug info when fast-forwarding through
Dale Johannesen [Wed, 11 Mar 2009 22:19:43 +0000 (22:19 +0000)]
Skip interleaved debug info when fast-forwarding through
allocations.  Apparently the assumption is there is an
instruction (terminator?) following the allocation so I
am allowing the same assumption.

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

15 years agoMy last coalescer fix introduced a subtler one. It's aborting a commuting optimizatio...
Evan Cheng [Wed, 11 Mar 2009 22:18:44 +0000 (22:18 +0000)]
My last coalescer fix introduced a subtler one. It's aborting a commuting optimization too late and left the live intervals to be out of sync with instructions. This fixes 8b10b.

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

15 years agoDebug intriniscs should be skipped when looking
Dale Johannesen [Wed, 11 Mar 2009 21:13:01 +0000 (21:13 +0000)]
Debug intriniscs should be skipped when looking
for a dependency, not terminate the search.

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

15 years agoAnother bug :(
Anton Korobeynikov [Wed, 11 Mar 2009 21:05:21 +0000 (21:05 +0000)]
Another bug :(

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

15 years agoMake Print callable from a pass's print method: add const qualifier. No
Torok Edwin [Wed, 11 Mar 2009 20:50:17 +0000 (20:50 +0000)]
Make Print callable from a pass's print method: add const qualifier. No
functionality change.

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

15 years agoI should definitely read make docs someday :(
Anton Korobeynikov [Wed, 11 Mar 2009 20:40:15 +0000 (20:40 +0000)]
I should definitely read make docs someday :(

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

15 years agodo not pretend llvm/.../*.h being system headers
Gabor Greif [Wed, 11 Mar 2009 20:23:40 +0000 (20:23 +0000)]
do not pretend llvm/.../*.h being system headers

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

15 years agoUnbreak the build. Dunno, why it did not fail on mingw :(
Anton Korobeynikov [Wed, 11 Mar 2009 20:16:05 +0000 (20:16 +0000)]
Unbreak the build. Dunno, why it did not fail on mingw :(

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

15 years agoIt makes no sense to have a ODR version of common
Duncan Sands [Wed, 11 Mar 2009 20:14:15 +0000 (20:14 +0000)]
It makes no sense to have a ODR version of common
linkage, so remove it.

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

15 years agofix validator errors
Gabor Greif [Wed, 11 Mar 2009 20:04:08 +0000 (20:04 +0000)]
fix validator errors

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

15 years agoFix exaples using IRBuilder. Thanks, Quadrescence and Glip7 from IRC!
Gabor Greif [Wed, 11 Mar 2009 19:51:07 +0000 (19:51 +0000)]
Fix exaples using IRBuilder. Thanks, Quadrescence and Glip7 from IRC!

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

15 years agoDisable plugins / shared stuff generation on windows targets.
Anton Korobeynikov [Wed, 11 Mar 2009 19:49:42 +0000 (19:49 +0000)]
Disable plugins / shared stuff generation on windows targets.
This fixes fallout from recent PIC/delibtoolize changes and unbreaks
build on cygming.

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

15 years agoFor yonah, fix a vector shuffle case for v16i8 where we didn't properly clear some...
Mon P Wang [Wed, 11 Mar 2009 18:47:57 +0000 (18:47 +0000)]
For yonah, fix a vector shuffle case for v16i8 where we didn't properly clear some bits.

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

15 years agoimplement support for C-style string literal concatenation in td files.
Chris Lattner [Wed, 11 Mar 2009 17:08:13 +0000 (17:08 +0000)]
implement support for C-style string literal concatenation in td files.

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

15 years agofix PR3785, a valgrind error on test/CodeGen/ARM/pr3502.ll
Chris Lattner [Wed, 11 Mar 2009 16:14:25 +0000 (16:14 +0000)]
fix PR3785, a valgrind error on test/CodeGen/ARM/pr3502.ll

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

15 years agoAdd parentheses to pacify gcc-4.3.
Duncan Sands [Wed, 11 Mar 2009 09:04:34 +0000 (09:04 +0000)]
Add parentheses to pacify gcc-4.3.

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

15 years agoRemove the one-definition-rule version of extern_weak
Duncan Sands [Wed, 11 Mar 2009 08:08:06 +0000 (08:08 +0000)]
Remove the one-definition-rule version of extern_weak
linkage: this linkage type only applies to declarations,
but ODR is only relevant to globals with definitions.

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

15 years agoAllow cross-process JIT to handle MachineRelocations of the ExternalSymbol
Nate Begeman [Wed, 11 Mar 2009 07:03:43 +0000 (07:03 +0000)]
Allow cross-process JIT to handle MachineRelocations of the ExternalSymbol
variety.  For example, an i64 div might turn into a call to __divdi3 during
legalization.

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

15 years agoFixed a v8i16 shuffle case that should generate a pshufb instead of a pshuflw/hw.
Mon P Wang [Wed, 11 Mar 2009 06:35:11 +0000 (06:35 +0000)]
Fixed a v8i16 shuffle case that should generate a pshufb instead of a pshuflw/hw.

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

15 years agoformatting change, reduce indentation. No functionality change.
Chris Lattner [Wed, 11 Mar 2009 05:48:52 +0000 (05:48 +0000)]
formatting change, reduce indentation.  No functionality change.

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

15 years agoreapply my previous patch (r66358) with a tweak to set the
Chris Lattner [Wed, 11 Mar 2009 05:08:08 +0000 (05:08 +0000)]
reapply my previous patch (r66358) with a tweak to set the
alignment of the generated constant pool entry to the
desired alignment of a type.  If we don't do this, we end up
trying to do movsd from 4-byte alignment memory.  This fixes
450.soplex and 456.hmmer.

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

15 years agoPut the assignment back at the top of this method.
Bill Wendling [Wed, 11 Mar 2009 00:03:50 +0000 (00:03 +0000)]
Put the assignment back at the top of this method.

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

15 years agoTwo coalescer fixes in one.
Evan Cheng [Wed, 11 Mar 2009 00:03:21 +0000 (00:03 +0000)]
Two coalescer fixes in one.
1. Use the same value# to represent unknown values being merged into sub-registers.
2. When coalescer commute an instruction and the destination is a physical register, update its sub-registers by merging in the extended ranges.

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

15 years agoMake ivars private. Other cleanup. No functionality change.
Bill Wendling [Tue, 10 Mar 2009 23:57:09 +0000 (23:57 +0000)]
Make ivars private. Other cleanup. No functionality change.

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

15 years agoChanged Allocate to use size_t instead of unsigned.
Mon P Wang [Tue, 10 Mar 2009 23:48:49 +0000 (23:48 +0000)]
Changed Allocate to use size_t instead of unsigned.

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

15 years agoAdd an explicit keyword.
Dan Gohman [Tue, 10 Mar 2009 23:10:46 +0000 (23:10 +0000)]
Add an explicit keyword.

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

15 years agoFixed rounding up EltSize
Mon P Wang [Tue, 10 Mar 2009 23:04:40 +0000 (23:04 +0000)]
Fixed rounding up EltSize

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

15 years agoGive Op<N>() AppleScript-like semantics, i.e. for negative N it indexes relative...
Gabor Greif [Tue, 10 Mar 2009 23:02:13 +0000 (23:02 +0000)]
Give Op<N>() AppleScript-like semantics, i.e. for negative N it indexes relative to op_end.
This is a preliminary to changes to come. No intended functionality change.

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

15 years agoJust make the Dwarf timer group static inside of the getter function. No need to...
Bill Wendling [Tue, 10 Mar 2009 22:58:53 +0000 (22:58 +0000)]
Just make the Dwarf timer group static inside of the getter function. No need to alloc/dealloc.

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

15 years agoDon't put static functions in anonymous namespace.
Bill Wendling [Tue, 10 Mar 2009 22:36:31 +0000 (22:36 +0000)]
Don't put static functions in anonymous namespace.

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

15 years agoDon't consider debug intrinsics when checking
Dale Johannesen [Tue, 10 Mar 2009 22:20:02 +0000 (22:20 +0000)]
Don't consider debug intrinsics when checking
whether a callee to be inlined is a leaf.

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

15 years agoThese should *stop* the timer, not start it again.
Bill Wendling [Tue, 10 Mar 2009 22:02:13 +0000 (22:02 +0000)]
These should *stop* the timer, not start it again.

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

15 years ago- Fix misspelled method name.
Bill Wendling [Tue, 10 Mar 2009 21:59:25 +0000 (21:59 +0000)]
- Fix misspelled method name.
- Remove unused method.

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

15 years ago- Create GetOrCreateSourceID from getOrCreateSourceID. GetOrCreateSourceID is
Bill Wendling [Tue, 10 Mar 2009 21:47:45 +0000 (21:47 +0000)]
- Create GetOrCreateSourceID from getOrCreateSourceID. GetOrCreateSourceID is
  the untimed version of getOrCreateSourceID. getOrCreateSourceID calls
  GetOrCreateSourceID, of course.

- Move some methods into the "private" section. Constify at least one method.

- General clean-ups.

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

15 years agoReadd test, but XFAIL it.
Bill Wendling [Tue, 10 Mar 2009 21:31:00 +0000 (21:31 +0000)]
Readd test, but XFAIL it.

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