Commit Graph

26567 Commits

Author SHA1 Message Date
Evan Cheng
8f90b6eb2f The coalescer does not coalesce a virtual register to a physical register if any of the physical register's sub-register live intervals overlaps with the virtual register. This is overly conservative. It prevents a extract_subreg from being coalesced away:
v1024 = EDI  // not killed
      =
      = EDI

One possible solution is for the coalescer to examine the sub-register live intervals in the same manner as the physical register. Another possibility is to examine defs and uses (when needed) of sub-registers. Both solutions are too expensive. For now, look for "short virtual intervals" and scan instructions to look for conflict instead.

This is a small win on x86-64. e.g. It shaves 403.gcc by ~80 instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61847 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-07 02:08:57 +00:00
Dan Gohman
fbb7486560 Add patterns to match conditional moves with loads folded
into their left operand, rather than their right. Do this
by commuting the operands and inverting the condition.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61842 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-07 01:00:24 +00:00
Dan Gohman
b33fc7b063 Add load-folding table entries for cmovno too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61841 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-07 00:44:53 +00:00
Dan Gohman
305fceb56c Define instructions for cmovo and cmovno.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61836 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-07 00:35:10 +00:00
Dan Gohman
653456c351 X86_COND_C and X86_COND_NC are alternate mnemonics for
X86_COND_B and X86_COND_AE, respectively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61835 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-07 00:15:08 +00:00
Bob Wilson
bc03979536 Improve support for type-generic vector intrinsics by teaching TableGen how
to handle LLVMMatchType intrinsic parameters, and by adding new subclasses
of LLVMMatchType to match vector types with integral elements that are 
either twice as wide or half as wide as the elements of the matched type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61834 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-07 00:09:01 +00:00
Dan Gohman
cca2983291 Revert r42653 and forward-port the code that lets INC64_32r be
converted to LEA64_32r in x86's convertToThreeAddress. This
replaces code like this:
   movl  %esi, %edi
   inc   %edi
with this:
   lea   1(%rsi), %edi
which appears to be beneficial.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61830 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-06 23:34:46 +00:00
Scott Michel
21213e75b5 CellSPU:
- Add preliminary support for v2i32; load/store generates the right code but
  there's a lot work to be done to make this vector type operational.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61829 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-06 23:10:38 +00:00
Dan Gohman
2c91d102ec Fix a bug in ComputeLinearIndex computation handling multi-level
aggregate types. Don't increment the current index after reaching
the end of a struct, as it will already be pointing at
one-past-the end. This fixes PR3288.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61828 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-06 22:53:52 +00:00
Devang Patel
5d31598954 Set up DwarfDebug using DebugInfo API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61822 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-06 21:07:30 +00:00
Bill Wendling
5fe1fac1dd Forgot that this was needed for Linux. This should fix the builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61819 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-06 19:13:55 +00:00
Owen Anderson
200ee7f521 The phi construction algorithm used for interval reconstruction is complicated by
two address instructions.  We need to keep track of things we've processed AS USES
independetly of whether we've processed them as defs.

This fixes all known miscompilations when reconstruction is turned on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61802 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-06 07:53:32 +00:00
Scott Michel
939e3a7f64 CellSPU: Update the README
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61785 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-06 03:51:14 +00:00
Scott Michel
dd950096b9 CellSPU:
- Fix bugs 3194, 3195: i128 load/stores produce correct code (although, we
  need to ensure that i128 is 16-byte aligned in real life), and 128 zero-
  extends are supported.
- New td file: SPU128InstrInfo.td: this is where all new i128 support should
  be put in the future.
- Continue to hammer on i64 operations and test cases; ensure that the only
  remaining problem will be i64 mul.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61784 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-06 03:36:14 +00:00
Dan Gohman
ce0d4b7a77 Update these argument lists for the isNormalMemory
argument. This doesn't affect current functionality.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61779 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-06 01:28:56 +00:00
Dan Gohman
fd2163bcf7 Use a latency value of 0 for the artificial edges inserted by
AddPseudoTwoAddrDeps. This lets the scheduling infrastructure
avoid recalculating node heights. In very large testcases this
was a major bottleneck. Thanks to Roman Levenstein for finding
this!

As a side effect, fold-pcmpeqd-0.ll is now scheduled better
and it no longer requires spilling on x86-32.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61778 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-06 01:19:04 +00:00
Chris Lattner
159c35b3ee Change m_ConstantInt and m_SelectCst to take their constant integers
as template arguments instead of as instance variables, exposing more
optimization opportunities to the compiler earlier.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61776 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 23:53:12 +00:00
Devang Patel
78eb6ad633 Construct subprogram DIEs using DebugInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61772 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 23:21:35 +00:00
Devang Patel
c452324f60 Construct global variable DIEs using DebugInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61771 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 23:11:11 +00:00
Devang Patel
d1ca925093 Construct compile unit dies using DebugInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61768 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 23:03:32 +00:00
Bill Wendling
d60de51878 Revert r61415 and r61484. Duncan was correct that these weren't needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61765 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 22:53:45 +00:00
Dan Gohman
a80c859df3 Don't call setDepthDirty/setHeightDirty when adding an edge
with latency 0, since it doesn't affect the depth or height.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61762 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 22:40:26 +00:00
Devang Patel
8526cc03a5 Extract source location info from DebugInfo.
Add methods to add source location info in a DIE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61761 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 22:35:52 +00:00
Devang Patel
48d190f4d7 Add type DIEs using DebugInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61757 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 21:47:57 +00:00
Duncan Sands
27a53009ef Teach the internalize pass to also internalize
global aliases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61754 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 21:24:45 +00:00
Duncan Sands
91c9c31033 When checking if an Argument escapes, check if
the argument is marked nocapture - no need to
analyze the argument if the answer is already
known!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61753 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 21:19:53 +00:00
Evan Cheng
7e66c0d43a Find loop back edges only after empty blocks are eliminated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61752 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 21:17:27 +00:00
Duncan Sands
de77ebcbb9 Not having an aliasee is a theoretical possibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61745 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 20:47:56 +00:00
Duncan Sands
15b5750664 Format more neatly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61744 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 20:39:50 +00:00
Duncan Sands
2631ac3b5b Remove trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61743 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 20:38:27 +00:00
Duncan Sands
1da5f2dd2e Delete unused global aliases with internal linkage.
In fact this also deletes those with linkonce linkage,
however this is currently dead because for the moment
aliases aren't allowed to have this linkage type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61742 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 20:37:33 +00:00
Devang Patel
f421533661 Construct composite type DIE using DebugInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61741 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 19:55:51 +00:00
Devang Patel
a22d57d6f8 Add classof() methods so that dwarf writer can decide what DIDescriptor is in its hand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61740 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 19:55:07 +00:00
Dan Gohman
11df7e5157 TargetLowering.h #includes SelectionDAGNodes.h, so it doesn't need its
own OpActionsCapacity magic number; it can just use ISD::BUILTIN_OP_END,
as long as it takes care to round up when needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61733 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 19:40:39 +00:00
Devang Patel
e520273172 s/ConstructType/ConstructTypeDIE/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61731 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 19:07:53 +00:00
Devang Patel
86ae142c51 Construct stuct field DIEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61729 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 18:59:44 +00:00
Chris Lattner
0d8484f2ed fix wordo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61728 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 18:56:52 +00:00
Steve Naroff
b0adcdb7e5 Remove redundant ValID::ValID:: scoping (doesn't compile on Windows).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61727 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 18:48:47 +00:00
Devang Patel
c69bf2c832 Construct enumerator DIE using DebugInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61726 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 18:38:38 +00:00
Chris Lattner
dfd19ddcfa Reject PR3281:accepted03.ll with:
llvm-as: accepted03.ll:1:35: invalid unresolved type up reference
declare void @r({ \7, opaque, \10 } %su)
                                  ^



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61725 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 18:34:07 +00:00
Devang Patel
68afdc3ab0 Construct array/vector type DIEs using DebugInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61724 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 18:33:01 +00:00
Owen Anderson
d0ed240e30 Get rid of sentinel insertion in interval reconstruction. It just masked the
problem, rather than fixing it.  The problem has now been fixed the right way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61723 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 18:32:26 +00:00
Chris Lattner
830703b1bd reject PR3281:crash11.ll with:
llvm-as: crash11.ll:2:27: function may not return return opaque type
  "xw" = tail call opaque @608(label %31)
                          ^



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61722 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 18:27:50 +00:00
Chris Lattner
959873d2da reject PR3281:crash10.ll with:
llvm-as: crash10.ll:3:35: floating point constant does not have type 'ppc_fp128'
  "dumy" = fcmp ult ppc_fp128 "j",9209.4
                                  ^



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61721 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 18:24:23 +00:00
Chris Lattner
c38daba25b reject PR3281:crash09.ll with this diagnostic:
llvm-as: crash09.ll:3:1: self referential type is invalid
type %0
^



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61720 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 18:19:46 +00:00
Chris Lattner
0b61635063 allow opaque undefs. This resolves PR3282 and fixes
test/Assembler/2005-05-05-OpaqueUndefValues.ll



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61719 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 18:12:21 +00:00
Dan Gohman
d68a07650c Tidy up #includes, deleting a bunch of unnecessary #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61715 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 17:59:02 +00:00
Devang Patel
08f053f5d1 Construct basic and derived type DIEs using DebugInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61714 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 17:57:47 +00:00
Devang Patel
ca03c2705e subsume ConstructPointerType()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61711 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 17:45:59 +00:00
Devang Patel
9ede3f2f29 subsume ConstructBasicType().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61709 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 17:44:11 +00:00