Commit Graph

45737 Commits

Author SHA1 Message Date
Chris Lattner
e7fa1f2a49 fix warning in -asserts mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67739 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-26 05:29:34 +00:00
Chris Lattner
e3a85838da fix some warnings in release-asserts mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67738 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-26 05:28:26 +00:00
Chris Lattner
d4015074e4 fix an apparently real bug exposed by a warning in -asserts mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67737 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-26 05:28:14 +00:00
Chris Lattner
022a27e363 fix warning in -asserts build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67736 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-26 05:25:59 +00:00
Bill Wendling
24c98cebc8 Add testcase for r67728.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67729 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-26 01:52:47 +00:00
Bill Wendling
8b4b874cc6 Match this pattern so that we can generate simpler code:
%a = ...
  %b = and i32 %a, 2
  %c = srl i32 %b, 1
  %d = br i32 %c, 

into

  %a = ...
  %b = and %a, 2
  %c = X86ISD::CMP %b, 0
  %d = X86ISD::BRCOND %c ...

This applies only when the AND constant value has one bit set and the SRL
constant is equal to the log2 of the AND constant. The back-end is smart enough
to convert the result into a TEST/JMP sequence.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67728 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-26 01:47:50 +00:00
Bill Wendling
bddc442a00 Doxygen-ify comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67727 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-26 01:46:56 +00:00
Dale Johannesen
6aae1d6582 Skip debug info one more place. (This one gets
called from llc, not opt, but it's an IR level
optimization nevertheless.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67724 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-26 01:15:07 +00:00
Devang Patel
575ec806e0 Before deleting a basic block, give other loop passes a chance cleanup analysis values, related to the instructions in the basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67719 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25 23:57:48 +00:00
Jim Grosbach
54f302272c Modify getRegisterValueType() to allow for a register being in mutliple
register classes. Before, MVT::Other would be returned anytime a reg was
in multiple register classes. Now, MVT::Other is only returned if the types
for those register classes differ.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67714 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25 23:28:33 +00:00
Evan Cheng
e597282fe5 Add a test case for PR3779: when to promote the function return value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67702 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25 20:30:19 +00:00
Evan Cheng
3927f438b5 Revert 67132. This is breaking some objective-c apps.
Also fixes SDISel so it *does not* force promote return value if the function is not marked signext / zeroext.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67701 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25 20:20:11 +00:00
Evan Cheng
a466ee3106 One more test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67694 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25 17:45:18 +00:00
Dale Johannesen
beaec4cbf6 When optimizing with debug info, don't keep the
stoppoint nodes around until Legalize; doing this
imposed an ordering on a sequence of loads that
came from different lines, interfering with scheduling.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67692 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25 17:36:08 +00:00
Evan Cheng
ea4753e370 Add __builtin___memcpy_chk tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67691 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25 16:49:31 +00:00
Duncan Sands
1a9d5ccf1e These tests pass on linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67689 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25 16:43:59 +00:00
Evan Cheng
2602f436be Add a __builtin_object_size test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67688 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25 16:29:33 +00:00
Chris Lattner
ad9ad7c827 Fix a bug in our autoupgrade support: in an argument list to a function
call, we should treat "i64 zext" as the start of a constant expr, but
"i64 0 zext" as an argument with an obsolete attribute on it (this form
is already tested by test/Assembler/2007-07-30-AutoUpgradeZextSext.ll).

Make the autoupgrade logic more discerning to avoid treating "i64 zext"
as an old-style attribute, causing us to reject a valid constant expr.
This fixes PR3876.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67682 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25 06:36:36 +00:00
Gabor Greif
0c8f7dc67c do not rely on callee being operand 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67681 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25 06:32:59 +00:00
Devang Patel
25cb0d75d0 Do not ignore DW_TAG_class_type!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67675 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25 03:52:06 +00:00
Evan Cheng
23120babfa CodeGen still defaults to non-verbose asm, but llc now overrides it and default to verbose.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67669 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25 01:48:21 +00:00
Evan Cheng
42bf74be14 CodeGen still defaults to non-verbose asm, but llc now overrides it and default to verbose.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67668 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25 01:47:28 +00:00
Evan Cheng
7db860d4de Don't print global names twice with -asm-verbose.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67667 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25 01:08:42 +00:00
Dan Gohman
324f608a45 Revert r67655 and r67656, as they are breaking the build. I'm
not going to persue this further at this time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67666 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25 00:52:11 +00:00
Chris Lattner
e8e4921967 Fix PR3874 by restoring a condition I removed, but making it more
precise than it used to be.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67662 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25 00:28:58 +00:00
Devang Patel
86bda4174a Do not ignore DW_TAG_class_type!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67661 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25 00:28:40 +00:00
Dan Gohman
2594706ef7 LLVM's master Makefile.common is in LLVM_SRC_ROOT, not LLVM_OBJ_ROOT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67658 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25 00:09:05 +00:00
Chris Lattner
569a7f087a oops, I intended to remove this, not comment it out. Thanks Duncan!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67657 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 23:48:25 +00:00
Dan Gohman
d02a281aa5 Regenerate configure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67656 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 23:47:11 +00:00
Dan Gohman
497e863c74 Fix paths; AutoRegen.sh changes its current working directory to be the
autoconf directory, but these paths need to be relative to the main
source directory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67655 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 23:46:25 +00:00
Dan Gohman
c9ebae3389 Update for autoconf 2.6x;
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67654 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 23:45:13 +00:00
Misha Brukman
2e734269e3 Converted a1.ll to unittests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67652 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 21:36:09 +00:00
Duncan Sands
abc061c088 Mention explicitly that the Ada front-end will not bootstrap.
The configure line had --disable-bootstrap, but it was not
clear that this is essential.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67651 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 21:16:39 +00:00
Evan Cheng
78a5bd5dbd Fix PR3845: Avoid stale MachineInstruction pointer reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67649 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 20:33:17 +00:00
Dan Gohman
9f16bcb59f Fix bash-isms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67647 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 20:21:37 +00:00
Dan Gohman
599d32016d Set the svn:mime-type to text/x-sh, so that diffs work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67646 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 20:20:28 +00:00
Gabor Greif
f73e319751 simplify logic and get rid of the assumption that operand 0 is the callee
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67642 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 19:28:39 +00:00
Chris Lattner
a0e6969bbe canonicalize inttoptr and ptrtoint instructions which cast pointers
to/from integer types that are not intptr_t to convert to intptr_t
then do an integer conversion to the dest type.  This exposes the
cast to the optimizer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 18:35:40 +00:00
Dale Johannesen
1f8c564d7d fix one more fp80 case (used only by Interpreter)
and streamline code here a bit.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67636 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 18:16:17 +00:00
Chris Lattner
4f9797d683 two changes:
1. Make instcombine always canonicalize trunc x to i1 into an icmp(x&1).  This 
   exposes the AND to other instcombine xforms and is more of what the code
   generator expects.
2. Rewrite the remaining trunc pattern match to use 'match', which 
   simplifies it a lot.
   


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67635 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 18:15:30 +00:00
Dale Johannesen
e330ae5b32 Change JIT for different layout of fp80.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67629 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 17:35:45 +00:00
Dan Gohman
e1c5267aec Add a testcase for the scheduling heuristic introduced in r67586.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67622 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 16:38:27 +00:00
Chris Lattner
e2f7bf8e2d more tidying: name the components of PhysReg in the case when
the target constraint specifies a specific physreg.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67618 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 15:27:37 +00:00
Chris Lattner
b3b4484e3d Tidy a bit more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67617 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 15:25:07 +00:00
Chris Lattner
fc9d161f16 simplify this code a bit now that "allocation to a vreg class" can never
fail.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67616 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 15:22:11 +00:00
Dan Gohman
a96dc14968 I was convinced that it's ok to allow a second i8 return value
to be returned in DL. LLVM's multiple-return-value support is
not ABI-conforming; front-ends that wish to have code emitted
that conforms to an ABI are currently expected to make
arrangements for this on their own rather than assuming that
multiple-return-values will automatically do the right thing.
This commit doesn't fundamentally change this situation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67588 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 01:04:34 +00:00
Dan Gohman
8f4aa333d0 Minor compile-time optimization; don't bother checking
canClobberPhysRegDefs if the successor node doesn't
clobber any physical registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67587 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 00:50:07 +00:00
Dan Gohman
002b44f1d7 Add a pre-pass to the burr-list scheduler which makes adjustments to
help out the register pressure reduction heuristics in the case of
nodes with multiple uses. Currently this uses very conservative
heuristics, so it doesn't have a broad impact, but in cases where it
does help it can make a big difference.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67586 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 00:49:12 +00:00
Evan Cheng
f1c0ae9de5 Do not emit comments unless -asm-verbose.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67580 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 00:17:40 +00:00
Dale Johannesen
16581bf931 Use a SmallPtrSet instead of std::set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67578 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-23 23:39:20 +00:00