Commit Graph

51028 Commits

Author SHA1 Message Date
Benjamin Kramer
983c4578b0 Add comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144194 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 18:16:11 +00:00
Duncan Sands
ef0b3ca3a8 Speculatively revert commit 144124 (djg) in the hope that the 32 bit
dragonegg self-host buildbot will recover (it is complaining about object
files differing between different build stages).  Original commit message:

Add a hack to the scheduler to disable pseudo-two-address dependencies in
basic blocks containing calls. This works around a problem in which
these artificial dependencies can get tied up in calling seqeunce
scheduling in a way that makes the graph unschedulable with the current
approach of using artificial physical register dependencies for calling
sequences. This fixes PR11314.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144188 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 14:20:48 +00:00
Nadav Rotem
bb539bf973 Add AVX2 support for vselect of v32i8
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144187 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 13:21:28 +00:00
Benjamin Kramer
2dd423987e Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144186 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 13:19:15 +00:00
Benjamin Kramer
0c45f7d1a7 Take advantage of the zero byte in StringMap when emitting dwarf stringpool entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144184 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 12:12:04 +00:00
Craig Topper
b80ada98c5 Enable execution dependency fix pass for YMM registers when AVX2 is enabled. Add AVX2 logical operations to list of replaceable instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144179 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 09:37:21 +00:00
Craig Topper
0a15035f52 Add instruction selection for AVX2 integer comparisons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144176 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 08:06:13 +00:00
Craig Topper
aaa643c70e Add AVX2 instruction lowering for add, sub, and mul.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144174 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 07:28:55 +00:00
Nick Lewycky
89d093d5b6 Don't forget to check FlagNW when determining whether an AddRecExpr will wrap
or not. Patch by Brendon Cahoon!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144173 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 07:11:37 +00:00
Devang Patel
c6bcf4315c Remove extra ';'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144172 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 06:20:49 +00:00
Eric Christopher
dfa30e1ab2 Remove the pubnames section, no one consumes it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144169 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 05:24:07 +00:00
Chad Rosier
2f2fe417f9 Add support for encoding immediates in icmp and fcmp. Hopefully, this will
remove a fair number of unnecessary materialized constants.
rdar://10412592


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144163 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 03:22:02 +00:00
Evan Cheng
44ee4714a8 Hide cpu name checking in ARMSubtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144154 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 01:57:03 +00:00
Jakob Stoklund Olesen
f4c4768fb2 Collapse DomainValues across loop back-edges.
During the initial RPO traversal of the basic blocks, remember the ones
that are incomplete because of back-edges from predecessors that haven't
been visited yet.

After the initial RPO, revisit all those loop headers so the incoming
DomainValues on the back-edges can be properly collapsed.

This will properly fix execution domains on software pipelined code,
like the included test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144151 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 01:06:56 +00:00
Jakob Stoklund Olesen
dbc372f47e Link to the live DomainValue after merging.
When merging two uncollapsed DomainValues, place a link to the active
DomainValue from the passive DomainValue.  This allows old stale
references to the passive DomainValue to be updated to point to the
active DomainValue.

The new resolve() function finds the active DomainValue and updates the
pointer.

This change makes old live-out lists more useful since they may contain
uncollapsed DomainValues that have since been merged into other
DomainValues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144149 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09 00:06:18 +00:00
Michael J. Spencer
7151ddd6ef Object/COFF: Fix PE reading.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144148 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 23:34:07 +00:00
Jakob Stoklund Olesen
737e9a2db2 Track reference count independently from clear().
This allows clear() to be called on a DomainValue with references.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144147 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 23:26:00 +00:00
Bruno Cardoso Lopes
ce1a538ab5 Properly handle Mips MC relocations and lower cpload and cprestore macros to MCInsts.
Patch by Jack Carter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144139 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 22:26:47 +00:00
Bill Wendling
a2ff3e2c3c Emit the compact unwind *if* we have a compact unwind encoding.
*headdesk*


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144138 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 22:23:43 +00:00
Jakob Stoklund Olesen
0fdb05deb9 Call release() directly when cleaning up the remaining DomainValues.
There is no need to involve the LiveRegs array and kill() any longer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144133 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 22:05:17 +00:00
Jakob Stoklund Olesen
6bcb9a783b Rename all methods to follow style guide.
No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144132 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 21:57:47 +00:00
Jakob Stoklund Olesen
35e932483a Handle reference counts in one function: release().
This new function will decrement the reference count, and collapse a
domain value when the last reference is gone.

This simplifies DomainValue reference counting, and decouples it from
the LiveRegs array.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144131 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 21:57:44 +00:00
Eric Christopher
74d8a87f40 Also add the linkage name to the name accelerator tables if it exists
and is different than the normal name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144130 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 21:56:23 +00:00
Dan Gohman
9cae2d2225 Add a hack to the scheduler to disable pseudo-two-address dependencies in
basic blocks containing calls. This works around a problem in which
these artificial dependencies can get tied up in calling seqeunce
scheduling in a way that makes the graph unschedulable with the current
approach of using artificial physical register dependencies for calling
sequences. This fixes PR11314.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144124 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 21:29:06 +00:00
Evan Cheng
3568a1051e Add workaround for Cortex-M3 errata 602117 by replacing ldrd x, y, [x] with ldm or ldr pairs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144123 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 21:21:09 +00:00
Chad Rosier
66dc8ca04b ARMFastISel doesn't support thumb1. Rename isThumb to isThumb2 to reflect this.
No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144122 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 21:12:00 +00:00
Eli Friedman
7781ae5be5 Fix code to match comment. Fixes PR11340, a regression from r143209.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144121 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 21:08:02 +00:00
Jakob Stoklund Olesen
e1b3e11c15 Clear old DomainValue after merging.
The old value may still be referenced by some live-out list, and we
don't wan't to collapse those instructions twice.

This fixes the "Can only swizzle VMOVD" assertion in some armv7 SPEC
builds.

<rdar://problem/10413292>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144117 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 20:57:04 +00:00
Michael J. Spencer
0d64632c9e MC/COFF: Correctly emit the size of an empty string table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144111 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 19:52:32 +00:00
Pete Cooper
2d76a78462 LICM pass now understands invariant load metadata. Nothing generates this yet so it will currently never get used in real tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144107 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 19:30:00 +00:00
Eric Christopher
67a917d495 Add the base ObjC method name to the names lookup table as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144105 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 19:16:01 +00:00
Lang Hames
5207bf2177 Lower mem-ops to unaligned i32/i16 load/stores on ARM where supported.
Add support for trimming constants to GetDemandedBits. This fixes some funky
constant generation that occurs when stores are expanded for targets that don't
support unaligned stores natively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144102 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 18:56:23 +00:00
Pete Cooper
d752e0f7e6 Added invariant field to the DAG.getLoad method and changed all calls.
When this field is true it means that the load is from constant (runt-time or compile-time) and so can be hoisted from loops or moved around other memory accesses


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144100 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 18:42:53 +00:00
Eric Christopher
30b4d8b83b A few more places where we can avoid multiple size queries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144099 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 18:38:40 +00:00
Eric Christopher
ec8ffc29c0 Don't evaluate Data.size() on every iteration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144095 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 18:22:25 +00:00
Bruno Cardoso Lopes
ad6eef4a65 This patch handles unaligned loads and stores in Mips JIT. Mips backend
implements unaligned loads and stores with assembler macro-instructions
ulw, usw, ulh, ulhu, ush, and this patch emits corresponding instructions
instead of these macros. Since each unaligned load/store is expanded
into two corresponding loads/stores where offset for second load/store is
modified by +3 (for words) or +1 (for halfwords).

Patch by Petar Jovanovic and Sasa Stankovic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144081 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 12:47:11 +00:00
NAKAMURA Takumi
0839033cbc PPCInstrInfo.cpp: Fix one "unused" warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144071 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 04:00:07 +00:00
Eli Friedman
9f1f26aefa Make sure to mark vector extload's as expand on ARM. Fixes PR11319.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144057 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 01:43:53 +00:00
Eli Friedman
2efa35f779 Add a bunch of calls to RemoveDeadNode in LegalizeDAG, so legalization doesn't get confused by CSE later on. Fixes PR11318.
Re-commit of r144034, with an extra fix so that RemoveDeadNode doesn't blow up.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144055 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 01:25:24 +00:00
Evan Cheng
7bc389b6b0 Add x86 isel logic and patterns to match movlps from clang generated IR for _mm_loadl_pi(). rdar://10134392, rdar://10050222
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144052 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 00:31:58 +00:00
Chad Rosier
0eff39f2e2 Enable support for returning i1, i8, and i16. Nothing special todo as it's the
callee's responsibility to sign or zero-extend the return value.  The additional
test case just checks to make sure the calls are selected (i.e., -fast-isel-abort
doesn't assert).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144047 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-08 00:03:32 +00:00
Eli Friedman
58dd0fec4d Revert r144034 while I try to track down a crash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144044 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-07 23:53:20 +00:00
Bill Wendling
e13eba2671 This code is dead, what with the new EH model and the auto-upgraders in place.
Delete!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144043 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-07 23:36:48 +00:00
Jakob Stoklund Olesen
b26c7727c9 Kill and collapse outstanding DomainValues.
DomainValues that are only used by "don't care" instructions are now
collapsed to the first possible execution domain after all basic blocks
have been processed.  This typically means the PS domain on x86.

For example, the vsel_i64 and vsel_double functions in sse2-blend.ll are
completely collapsed to the PS domain instead of containing a mix of
execution domains created by isel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144037 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-07 23:08:21 +00:00
Pete Cooper
a29fc806fe InstCombine now optimizes vector udiv by power of 2 to shifts
Fixes r8429


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144036 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-07 23:04:49 +00:00
Eli Friedman
1b4f6f2532 Add a bunch of calls to RemoveDeadNode in LegalizeDAG, so legalization doesn't get confused by CSE later on. Fixes PR11318.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144034 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-07 22:51:10 +00:00
Eric Christopher
56c2b109f7 Add all completed and named types to the dwarf type accelerator tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144027 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-07 22:11:16 +00:00
Jakob Stoklund Olesen
a59ce03791 Use a reverse post order instead of a DFS order.
The enterBasicBlock() function is combining live-out values from
predecessor blocks.  The RPO traversal means that more predecessors
have been visited when that happens, only back-edges are missing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144025 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-07 21:59:29 +00:00
Eric Christopher
2dd5e1e64d Move the hash function to using and taking a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144024 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-07 21:49:35 +00:00
Eric Christopher
e77546c3c3 Simple destructor to delete the hash data we created earlier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144023 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-07 21:49:28 +00:00