Joerg Sonnenberger [Wed, 21 Mar 2012 05:48:07 +0000 (05:48 +0000)]
Fix generation of the address size override prefix. Add assertions for
the invalid cases. At least 16bit operand in 64bit mode is currently not
rejected in the parser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153166
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 21 Mar 2012 05:18:53 +0000 (05:18 +0000)]
I meant to disable this test, not XFAIL it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153165
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 21 Mar 2012 04:12:19 +0000 (04:12 +0000)]
misched: beginning to add unit tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153163
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 21 Mar 2012 04:12:16 +0000 (04:12 +0000)]
misched: fix LiveInterval update for bottom-up scheduling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153162
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 21 Mar 2012 04:12:12 +0000 (04:12 +0000)]
misched: trace LiveIntervals after scheduling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153161
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 21 Mar 2012 04:12:10 +0000 (04:12 +0000)]
misched: obvious iterator update fixes for bottom-up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153160
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 21 Mar 2012 04:12:07 +0000 (04:12 +0000)]
misched: cleanup main loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153159
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 21 Mar 2012 04:12:01 +0000 (04:12 +0000)]
misched: fix LI update for bottom-up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153158
91177308-0d34-0410-b5e6-
96231b3b80d8
Gregory Szorc [Wed, 21 Mar 2012 03:54:29 +0000 (03:54 +0000)]
Organize LLVM C API docs into doxygen modules; add docs
This gives a lot of love to the docs for the C API. Like Clang's
documentation, the C API is now organized into a Doxygen "module"
(LLVMC). Each C header file is a child of the main module. Some modules
(like Core) have a hierarchy of there own. The produced documentation is
thus better organized (before everything was in one monolithic list).
This patch also includes a lot of new documentation for APIs in Core.h.
It doesn't document them all, but is better than none. Function docs are
missing @param and @return annotation, but the documentation body now
commonly provides help details (like the expected llvm::Value sub-type
to expect).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153157
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 21 Mar 2012 02:28:53 +0000 (02:28 +0000)]
Add typecast to silence -Wswitch warning introduced by r153153.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153155
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 21 Mar 2012 02:14:01 +0000 (02:14 +0000)]
Spacing fixes and using 'unsigned' instead of 'int' to index to select shuffle elements for consistency with other shuffle code in X86 backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153154
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 21 Mar 2012 00:52:01 +0000 (00:52 +0000)]
Incremental big endian patch by Jack Carter.
These changes allow us to compile big endian from the command line for 32 bit
Mips targets. This patch will result in code and data actually being produced
in the correct endianess.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153153
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 20 Mar 2012 23:28:58 +0000 (23:28 +0000)]
Zap some dead code pointed out by Chandler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153150
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 20 Mar 2012 22:56:27 +0000 (22:56 +0000)]
Make sure ImmutableSet never inserts Tombstone/Entry into DenseMap.
ImmutAVLTree uses random unsigned values as keys into a DenseMap,
which could possibly happen to be the same value as the Tombstone or
Entry keys in the DenseMap.
Test case is hard to come up with. We randomly get failures on the
internal static analyzer bot, which most likely hits this issue
(hard to be 100% sure without the full stack).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153148
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Tue, 20 Mar 2012 22:25:39 +0000 (22:25 +0000)]
RuntimeDyldMachO has the ability to keep track of
relocations (i.e., pieces of data whose addresses
are referred to elsewhere in the binary image) and
update the references when the section containing
the relocations moves. The way this works is that
there is a map from section IDs to lists of
relocations.
Because the relocations are associated with the
section containing the data being referred to, they
are updated only when the target moves. However,
many data references are relative and also depend
on the location of the referrer.
To solve this problem, I introduced a new data
structure, Referrer, which simply contains the
section being referred to and the index of the
relocation in that section. These referrers are
associated with the source containing the
reference that needs to be updated, so now
regardless of which end of the relocation moves,
the relocation will now be updated correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153147
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 20 Mar 2012 21:49:54 +0000 (21:49 +0000)]
Fix test case from r153135.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153140
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 20 Mar 2012 21:43:40 +0000 (21:43 +0000)]
[avx] Add patterns for combining vextractf128 + vmovaps/vmovups/vmobdqu to
vextractf128 with 128-bit mem dest.
Combines
vextractf128 $0, %ymm0, %xmm0
vmovaps %xmm0, (%rdi)
to
vextractf128 $0, %ymm0, (%rdi)
rdar://
11082570
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153139
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 20 Mar 2012 21:33:21 +0000 (21:33 +0000)]
Assembler should accept redefinitions of unused variable symbols.
rdar://
11027851
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153137
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 20 Mar 2012 21:33:17 +0000 (21:33 +0000)]
Tidy up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153136
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 20 Mar 2012 21:28:05 +0000 (21:28 +0000)]
Change conditional instructions definitions, e.g. ANDCC, ARMPseudoExpand and t2PseudoExpand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153135
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 20 Mar 2012 21:24:52 +0000 (21:24 +0000)]
LoopSimplify bug fix. Handle indirect loop back edges.
Do not call SplitBlockPredecessors on a loop preheader when one of the
predecessors is an indirectbr. Otherwise, you will hit this assert:
!isa<IndirectBrInst>(Preds[i]->getTerminator()) && "Cannot split an edge from an IndirectBrInst"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153134
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 20 Mar 2012 21:24:47 +0000 (21:24 +0000)]
whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153133
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 20 Mar 2012 21:24:44 +0000 (21:24 +0000)]
LSR: teach isSimplifiedLoopNest to handle PHI IVUsers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153132
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 20 Mar 2012 21:24:40 +0000 (21:24 +0000)]
LSR: fix IVUsers isSimplifiedLoopNest to perform a full domtree walk
instead of skipping the current loop.
My prior fix was incomplete because of an overzealous compile-time optimization:
Better fix for: <rdar://problem/
11049788> Segmentation fault: 11 in LoopStrengthReduce
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153131
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 20 Mar 2012 21:07:51 +0000 (21:07 +0000)]
Reserve number of MI operands to accom,odate complex patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153125
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Tue, 20 Mar 2012 19:52:05 +0000 (19:52 +0000)]
remove unused variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153116
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 20 Mar 2012 19:45:07 +0000 (19:45 +0000)]
[avx] Add the AddedComplexity to the VINSERTI128 avx2 patterns to give
precedence over the VINSERTF128 avx1 patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153114
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 20 Mar 2012 19:28:25 +0000 (19:28 +0000)]
Require a base pointer for stack realignment when SP may vary dynamically.
ARMBaseRegisterInfo::canRealignStack was checking for variable-sized objects
but not for stack adjustments around calls. Use hasReservedCallFrame() to
check for both. The hasBasePointer function was already correctly checking
both conditions, so the effect of this was that a base pointer would be used
without checking whether the base pointer register could be reserved. I don't
have a small testcase for this.
<rdar://problem/
11075906>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153110
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 20 Mar 2012 19:28:22 +0000 (19:28 +0000)]
Remove some redundant checks.
ARMFrameLowering::hasReservedCallFrame is already checking for variable
sized objects, so there's no point in checking it twice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153109
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 20 Mar 2012 18:38:33 +0000 (18:38 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153105
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 20 Mar 2012 18:24:55 +0000 (18:24 +0000)]
[avx] Move the vextractf128 patterns closer to the vextractf128 def. Remove
whitespace from test case. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153103
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 20 Mar 2012 17:41:51 +0000 (17:41 +0000)]
Fix assembling ARM vst2 instructions with double-spaced registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153099
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 20 Mar 2012 17:25:45 +0000 (17:25 +0000)]
ARM non-scattered MachO relocations for movw/movt.
Needed when building -mdynamic-no-pic code.
rdar://
10459256
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153097
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 20 Mar 2012 17:20:46 +0000 (17:20 +0000)]
Fix test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153095
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 20 Mar 2012 17:08:51 +0000 (17:08 +0000)]
[avx] Adjust the VINSERTF128rm pattern to allow for unaligned loads.
This results in things such as
vmovups 16(%rdi), %xmm0
vinsertf128 $1, %xmm0, %ymm0, %ymm0
to be combined to
vinsertf128 $1, 16(%rdi), %ymm0, %ymm0
rdar://
11076953
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153092
91177308-0d34-0410-b5e6-
96231b3b80d8
Silviu Baranga [Tue, 20 Mar 2012 15:54:56 +0000 (15:54 +0000)]
The ARM instructions that have an unpredictable behavior when the pc register operand is given now fail with soft fail. Modified the regression tests to reflect this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153089
91177308-0d34-0410-b5e6-
96231b3b80d8
Silviu Baranga [Tue, 20 Mar 2012 13:12:38 +0000 (13:12 +0000)]
test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153086
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Barton [Tue, 20 Mar 2012 10:50:35 +0000 (10:50 +0000)]
Test Commit - add a newline
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153083
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 20 Mar 2012 08:56:43 +0000 (08:56 +0000)]
It's possible to have a constant expression who's size is quite big (e.g.,
i128). In that case, we may not be able to print out the MCExpr as an
expression. For instance, we could have an MCExpr like this:
0xBEEF0000BEEF0000 | (0xBEEF0000BEEF0000 << 64)
The MCExpr printer handles sizes up to 64-bits, but this expression would
require 128-bits. In this situation, try to evaluate the constant expression and
emit that as the value into 64-bit chunks.
<rdar://problem/
11070338>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153081
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 20 Mar 2012 07:17:59 +0000 (07:17 +0000)]
Remove code that prevented lowering shuffles if they are used by load and themselves used by a extract_vector_elt. This was done to allow the DAG combiner to collapse to a single element load. Unfortunately, sometimes the extract_vector_elt would disappear before DAG combine could do the transformation leaving a vector_shuffle that isel couldn't handle. New code lets the shuffle be converted to a target specific node, but then adds a combine routine that can convert target specific nodes back to vector_shuffles if the folding criteria are met.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153080
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 20 Mar 2012 06:42:26 +0000 (06:42 +0000)]
Factor out target shuffle mask decoding from getShuffleScalarElt and use a SmallVector of int instead of unsigned for shuffle mask in decode functions. Preparation for another change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153079
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 20 Mar 2012 05:28:39 +0000 (05:28 +0000)]
When combining (vextract shuffle (load ), <1,u,u,u>), 0) -> (load ), add users of the final load to the worklist too. Needed by changes I'm preparing to make to X86 backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153078
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 20 Mar 2012 01:07:58 +0000 (01:07 +0000)]
Do everything up to generating code to try to get a register for
a variable. The previous code would break the debug info changing
code invariant. This will regress debug info for arguments where
we elide the alloca created.
Fixes rdar://
11066468
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153074
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 20 Mar 2012 01:07:56 +0000 (01:07 +0000)]
Untabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153073
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 20 Mar 2012 01:07:53 +0000 (01:07 +0000)]
Add another debugging statement here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153072
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 20 Mar 2012 01:07:47 +0000 (01:07 +0000)]
Use lookUpRegForValue here instead of duplicating the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153071
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Mar 2012 23:42:11 +0000 (23:42 +0000)]
Fix two bugpoint bugs:
1) opt is not usually in the same path as the target program. Even for
the bugpoint as a standalone app, it should be more portable to search
in PATH, isn't it?
2) bugpoint driver accounts opt plugins, but does not list them in the
final output command.
Patch by Dmitry Mikushin!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153066
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Mar 2012 23:40:48 +0000 (23:40 +0000)]
fix PR12301 - llvm-bcanalyze should print to stdout, not stderr (except for errors).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153065
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Mon, 19 Mar 2012 23:38:12 +0000 (23:38 +0000)]
f16 FDIV can now be legalized by promoting to f32
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153064
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Mar 2012 23:31:01 +0000 (23:31 +0000)]
fix a build failure with libc++
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153063
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 19 Mar 2012 21:32:32 +0000 (21:32 +0000)]
ARM branch relaxation for unconditional t1 branches.
rdar://
11059157
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153055
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 19 Mar 2012 20:39:53 +0000 (20:39 +0000)]
ARM assembly, accept optional '#' on lane index number.
rdar://
11057160
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153053
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 19 Mar 2012 20:27:37 +0000 (20:27 +0000)]
[Object/COFF]: Expose getSectionContents.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153051
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 19 Mar 2012 20:27:15 +0000 (20:27 +0000)]
[Object/COFF]: Expose getSectionName.
Also add some documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153050
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 19 Mar 2012 19:19:50 +0000 (19:19 +0000)]
Perform mul combine when multiplying wiht negative constants.
Patch by Weiming Zhao!
This fixes PR12212
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153049
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 19 Mar 2012 18:38:38 +0000 (18:38 +0000)]
Add an option to the MI scheduler to cut off scheduling after a fixed number of
instructions have been scheduled. Handy for tracking down scheduler bugs, or
bugs exposed by scheduling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153045
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 19 Mar 2012 16:40:35 +0000 (16:40 +0000)]
[asan] don't emit __asan_mapping_offset/__asan_mapping_scale by default -- they are currently used only for experiments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153040
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 19 Mar 2012 16:16:03 +0000 (16:16 +0000)]
llvm/test/DebugInfo: Move two tests to DebugInfo/X86. They are X86-dependent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153038
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 19 Mar 2012 15:35:44 +0000 (15:35 +0000)]
Fix DAG combine which creates illegal vector shuffles. Patch by Heikki Kultala.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153035
91177308-0d34-0410-b5e6-
96231b3b80d8
Preston Gurd [Mon, 19 Mar 2012 14:10:12 +0000 (14:10 +0000)]
This patch adds X86 instruction itineraries for non-pseudo opcodes in
X86InstrCompiler.td.
It also adds –mcpu-generic to the legalize-shift-64.ll test so the test
will pass if run on an Intel Atom CPU, which would otherwise
produce an instruction schedule which differs from that which the test expects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153033
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 19 Mar 2012 00:43:34 +0000 (00:43 +0000)]
Add a note for -ffast-math optimization of vector norm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153031
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 18 Mar 2012 23:45:14 +0000 (23:45 +0000)]
Make the formatting of this file more consistent, and fix the 80-columns
violations I introduced. Also sort some of the instructions to get
a more consistent ordering.
Suggestions on still better / more consistent formatting would be
welcome. I'm actually tempted to use a macro to define all of the
delegate methods...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153030
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 18 Mar 2012 23:31:28 +0000 (23:31 +0000)]
Teach InstVisitor about the UnaryInstruction layer in the instruction
type hierarchy. I wanted to use this for the inline cost rewrite, and
found it was missing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153029
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 18 Mar 2012 23:28:48 +0000 (23:28 +0000)]
Factor out the multiply analysis code in ComputeMaskedBits and apply it to the
overflow checking multiply intrinsic as well.
Add a test for this, updating the test from grep to FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153028
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 18 Mar 2012 22:50:10 +0000 (22:50 +0000)]
isCommutedMOVLMask should only look at 128-bit vectors to match isMOVLMask.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153027
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 18 Mar 2012 09:35:50 +0000 (09:35 +0000)]
This clause (although matching parts of the implementation) can't be correct.
Thanks to Eli for noticing the discrepancy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153011
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 17 Mar 2012 20:22:57 +0000 (20:22 +0000)]
CriticalAntiDepBreaker: Replace a SmallSet of regs with a much denser BitVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152999
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 17 Mar 2012 18:46:09 +0000 (18:46 +0000)]
Reorder includes in Target backends to following coding standards. Remove some superfluous forward declarations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152997
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 17 Mar 2012 17:03:45 +0000 (17:03 +0000)]
MachineInstr: Inline the fast path (non-bundle instruction) of hasProperty.
This is particularly helpful as both arguments tend to be constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152991
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 17 Mar 2012 09:39:20 +0000 (09:39 +0000)]
Fix some copy and paste remnants of Cell and SPU in Hexagon files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152981
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 17 Mar 2012 09:28:37 +0000 (09:28 +0000)]
Fix typo in file header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152980
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 17 Mar 2012 09:24:09 +0000 (09:24 +0000)]
Pass TargetOptions to HexagonTargetMachine constructor by reference to match other targets and the base class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152979
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 17 Mar 2012 07:33:42 +0000 (07:33 +0000)]
Reorder includes to match coding standards. Fix an issue or two exposed by that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152978
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 17 Mar 2012 00:11:42 +0000 (00:11 +0000)]
MC asm parser macro argument count was wrong when empty.
evaluated to '1' when the argument list was empty (should be '0').
rdar://
11057257
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152967
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 16 Mar 2012 23:11:07 +0000 (23:11 +0000)]
Check if we can handle the arguments of a call (and therefore the call) in
fast-isel before emitting code. If the program bails after code was emitted,
then it could lead to the stack being adjusted more than once (two
CALLSEQ_BEGINs emitted) but being adjuste back only once after the call. This
leads to general badness and gnashing of teeth.
<rdar://problem/
11050630>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152959
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Fri, 16 Mar 2012 22:50:01 +0000 (22:50 +0000)]
Revert r152915. Chapuni's WinWaitReleased refactoring: It doesn't work for me
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152958
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Mar 2012 22:34:37 +0000 (22:34 +0000)]
clarify the coding standards a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152957
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 16 Mar 2012 22:18:29 +0000 (22:18 +0000)]
ARM fix silly typo in optional operand alias.
rdar://
11065671
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152954
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 16 Mar 2012 21:06:13 +0000 (21:06 +0000)]
ARM divided syntax fmrx/fmxr mnemonics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152946
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 16 Mar 2012 20:48:38 +0000 (20:48 +0000)]
ARM ldm/stm register lists can be out of order.
It's not a good style idea, as the registers will be laid down in memory in
numerical order, not the order they're in the list, but it's legal. vldm/vstm
are stricter.
rdar://
11064740
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152943
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 16 Mar 2012 18:20:54 +0000 (18:20 +0000)]
Revert r152907.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152935
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 16 Mar 2012 17:38:19 +0000 (17:38 +0000)]
ScheduleDAGInstrs: When adding uses we add them into a set that's empty at the beginning, no need to maintain another set for the added regs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152934
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 16 Mar 2012 16:39:27 +0000 (16:39 +0000)]
Limit the number of memory operands in MachineInstr to 2^16 and store the number in padding.
Saves one machine word on MachineInstr (88->80 bytes on x86_64, 48->44 on i386).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152930
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 16 Mar 2012 15:46:47 +0000 (15:46 +0000)]
CriticalAntiDepBreaker: BasicBlock::size is an expensive operation, reuse the cached value.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152927
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 16 Mar 2012 10:48:10 +0000 (10:48 +0000)]
lit/TestRunner.py: [Win32] Check all opened_files[] released, rather than (obsoleted) written_files[].
In previous case,
RUN: foo -o %t
RUN: FileCheck < %t
RUN: bar -o %t
2nd read handle might prevent manipulation of 3rd %t in bar, to remove and rename.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152916
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 16 Mar 2012 10:48:03 +0000 (10:48 +0000)]
lit/TestRunner.py: [Win32] Rework WinWaitReleased().
We can simply confirm the handle released to open it with EXCLUSIVE. Attempting renaming was bad.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152915
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 16 Mar 2012 07:40:08 +0000 (07:40 +0000)]
The alignment of the pointer part of the store instruction may have an
alignment. If that's the case, then we want to make sure that we don't increase
the alignment of the store instruction. Because if we increase it to be "more
aligned" than the pointer, code-gen may use instructions which require a greater
alignment than the pointer guarantees.
<rdar://problem/
11043589>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152907
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 16 Mar 2012 06:52:56 +0000 (06:52 +0000)]
More const-correcting of FixedLenDecoderEmitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152906
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 16 Mar 2012 06:10:15 +0000 (06:10 +0000)]
Rip out support for 'llvm.noinline'. This thing has a strange history...
It was added in 2007 as the first cut at supporting no-inline
attributes, but we didn't have function attributes of any form at the
time. However, it was added without any mention in the LangRef or other
documentation.
Later on, in 2008, Devang added function notes for 'inline=never' and
then turned them into proper function attributes. From that point
onward, as far as I can tell, the world moved on, and no one has touched
'llvm.noinline' in any meaningful way since.
It's time has now come. We have had better mechanisms for doing this for
a long time, all the frontends I'm aware of use them, and this is just
holding back progress. Given that it was never a documented feature of
the IR, I've provided no auto-upgrade support. If people know of real,
in-the-wild bitcode that relies on this, yell at me and I'll add it, but
I *seriously* doubt anyone cares.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152904
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 16 Mar 2012 06:10:13 +0000 (06:10 +0000)]
Start removing the use of an ad-hoc 'never inline' set and instead
directly query the function information which this set was representing.
This simplifies the interface of the inline cost analysis, and makes the
always-inline pass significantly more efficient.
Previously, always-inline would first make a single set of every
function in the module *except* those marked with the always-inline
attribute. It would then query this set at every call site to see if the
function was a member of the set, and if so, refuse to inline it. This
is quite wasteful. Instead, simply check the function attribute directly
when looking at the callsite.
The normal inliner also had similar redundancy. It added every function
in the module with the noinline attribute to its set to ignore, even
though inside the cost analysis function we *already tested* the
noinline attribute and produced the same result.
The only tricky part of removing this is that we have to be able to
correctly remove only the functions inlined by the always-inline pass
when finalizing, which requires a bit of a hack. Still, much less of
a hack than the set of all non-always-inline functions was. While I was
touching this function, I switched a heavy-weight set to a vector with
sort+unique. The algorithm already had a two-phase insert and removal
pattern, we were just needlessly paying the uniquing cost on every
insert.
This probably speeds up some compiles by a small amount (-O0 compiles
with lots of always-inline, so potentially heavy libc++ users), but I've
not tried to measure it.
I believe there is no functional change here, but yell if you spot one.
None are intended.
Finally, the direction this is going in is to greatly simplify the
inline cost query interface so that we can replace its implementation
with a much more clever one. Along the way, all the APIs get simplified,
so it seems incrementally good.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152903
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 16 Mar 2012 05:58:09 +0000 (05:58 +0000)]
Const-correct the FixedLenDecoderEmitter. Pass a few things by const reference instead of value to avoid some copying.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152899
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 16 Mar 2012 05:51:52 +0000 (05:51 +0000)]
Pull the implementation of the code metrics out of the inline cost
analysis implementation. The header was already separated. Also cleanup
all the comments in the header to follow a nice modern doxygen form.
There is still plenty of cruft here, but some of that will fall out in
subsequent refactorings and this was an easy step in the right
direction. No functionality changed here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152898
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 16 Mar 2012 05:04:25 +0000 (05:04 +0000)]
misched: add DAG edges from vreg defs to ExitSU.
These edges are not really necessary, but it is consistent with the
way we currently create physreg edges. Scheduler heuristics that
expect a DAG edge to the block terminator could benefit from this
change. Although in the future I hope we have a better mechanism for
modeling latency across scheduling regions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152895
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 16 Mar 2012 03:16:56 +0000 (03:16 +0000)]
LSR fix: Add isSimplifiedLoopNest to IVUsers analysis.
Only record IVUsers that are dominated by simplified loop
headers. Otherwise SCEVExpander will crash while looking for a
preheader.
I previously tried to work around this in LSR itself, but that was
insufficient. This way, LSR can continue to run if some uses are not
in simple loops, as long as we don't attempt to analyze those users.
Fixes <rdar://problem/
11049788> Segmentation fault: 11 in LoopStrengthReduce
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152892
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 16 Mar 2012 01:19:24 +0000 (01:19 +0000)]
Spacing fixes. Mostly aligning arguments that spilled onto next line with the opening parenthese instead of 2 spaces in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152889
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 16 Mar 2012 01:04:00 +0000 (01:04 +0000)]
Revert r152705, which reapplied r152486 as this appears to be causing failures
on our internal nightly testers. So, basically revert r152486 again.
Abbreviated original commit message:
Implement a more intelligent way of spilling uses across an invoke boundary.
It looks as if Chander's inlining work, r152737, exposed an issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152887
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 16 Mar 2012 00:56:01 +0000 (00:56 +0000)]
Remove unused field NumVariable from Filter class. Even it was needed the same result could be found with VariableInstructions.size(). Also fix some typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152885
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 16 Mar 2012 00:52:42 +0000 (00:52 +0000)]
In InstCombiner::visitOr, make sure we reverse the operand swap used for checking for or-of-xor operations after those checks; a later check expects that any constant will be in Op1. PR12234.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152884
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 16 Mar 2012 00:45:58 +0000 (00:45 +0000)]
ARM optional operand on MRC/MCR assembly instructions.
rdar://
11058464
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152883
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 16 Mar 2012 00:27:18 +0000 (00:27 +0000)]
ARM vmrs system registers mvfr0 and mvfr1 handling.
rdar://
11058464
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152881
91177308-0d34-0410-b5e6-
96231b3b80d8