oota-llvm.git
10 years agoHandle spilling the PPC GPRC_NOR0 register class
Hal Finkel [Tue, 28 Jan 2014 05:32:58 +0000 (05:32 +0000)]
Handle spilling the PPC GPRC_NOR0 register class

GPRC_NOR0 is not a subclass of GPRC (because it also contains the ZERO pseudo
register). As a result, we also need to check for it in the spilling code.

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

10 years agoImprove handling of EnforceSmallerThan. Remove all types that are smaller from the...
Craig Topper [Tue, 28 Jan 2014 04:49:01 +0000 (04:49 +0000)]
Improve handling of EnforceSmallerThan. Remove all types that are smaller from the larger set not just the smallest type from the smaller set. Ensure 'smaller' vectors have the same or fewer total bits. Similar for 'larger' vectors.

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

10 years agoMC: Add a .debug section that we'll soon use to emit debug info into COFF files
Timur Iskhodzhanov [Tue, 28 Jan 2014 03:48:44 +0000 (03:48 +0000)]
MC: Add a .debug section that we'll soon use to emit debug info into COFF files

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

10 years agoR600/SI: Add pattern for truncating i32 to i1
Michel Danzer [Tue, 28 Jan 2014 03:01:16 +0000 (03:01 +0000)]
R600/SI: Add pattern for truncating i32 to i1

Fixes half a dozen piglit tests with radeonsi.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200283 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix the DWARF EH encodings for Sparc PIC code.
Jakob Stoklund Olesen [Tue, 28 Jan 2014 02:52:26 +0000 (02:52 +0000)]
Fix the DWARF EH encodings for Sparc PIC code.

Also emit the stubs that were generated for references to typeinfo
symbols.

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

10 years agoUpdate optimization passes to handle inalloca arguments
Reid Kleckner [Tue, 28 Jan 2014 02:38:36 +0000 (02:38 +0000)]
Update optimization passes to handle inalloca arguments

Summary:
I searched Transforms/ and Analysis/ for 'ByVal' and updated those call
sites to check for inalloca if appropriate.

I added tests for any change that would allow an optimization to fire on
inalloca.

Reviewers: nlewycky

Differential Revision: http://llvm-reviews.chandlerc.com/D2449

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

10 years agox86: add implicit defs for cpuid
Reid Kleckner [Tue, 28 Jan 2014 02:08:22 +0000 (02:08 +0000)]
x86: add implicit defs for cpuid

This avoids miscompiling MS inline asm in LLVM where we have to infer
clobbers.  Test case forthcoming in Clang.

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

10 years ago[LPM] Fix PR18616 where the shifts to the loop pass manager to extract
Chandler Carruth [Tue, 28 Jan 2014 01:25:38 +0000 (01:25 +0000)]
[LPM] Fix PR18616 where the shifts to the loop pass manager to extract
LCSSA from it caused a crasher with the LoopUnroll pass.

This crasher is really nasty. We destroy LCSSA form in a suprising way.
When unrolling a loop into an outer loop, we not only need to restore
LCSSA form for the outer loop, but for all children of the outer loop.
This is somewhat obvious in retrospect, but hey!

While this seems pretty heavy-handed, it's not that bad. Fundamentally,
we only do this when we unroll a loop, which is already a heavyweight
operation. We're unrolling all of these hypothetical inner loops as
well, so their size and complexity is already on the critical path. This
is just adding another pass over them to re-canonicalize.

I have a test case from PR18616 that is great for reproducing this, but
pretty useless to check in as it relies on many 10s of nested empty
loops that get unrolled and deleted in just the right order. =/ What's
worse is that investigating this has exposed another source of failure
that is likely to be even harder to test. I'll try to come up with test
cases for these fixes, but I want to get the fixes into the tree first
as they're causing crashes in the wild.

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

10 years ago[TLI] Add a new hook to TargetLowering to query the target if a load of a constant...
Juergen Ributzka [Tue, 28 Jan 2014 01:20:14 +0000 (01:20 +0000)]
[TLI] Add a new hook to TargetLowering to query the target if a load of a constant should be converted to simply the constant itself.

Before this patch we used getIntImmCost from TargetTransformInfo to determine if
a load of a constant should be converted to just a constant, but the threshold
for this was set to an arbitrary value. This value works well for the two
targets (X86 and ARM) that implement this target-hook, but it isn't
target-independent at all.

Now targets have the possibility to decide directly if this optimization should
be performed. The default value is set to false to preserve the current
behavior. The target hook has been moved to TargetLowering, which removed the
last use and need of TargetTransformInfo in SelectionDAG.

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

10 years agoLoopVectorize: Support conditional stores by scalarizing
Arnold Schwaighofer [Tue, 28 Jan 2014 01:01:53 +0000 (01:01 +0000)]
LoopVectorize: Support conditional stores by scalarizing

The vectorizer takes a loop like this and widens all instructions except for the
store. The stores are scalarized/unrolled and hidden behind an "if" block.

  for (i = 0; i < 128; ++i) {
    if (a[i] < 10)
      a[i] += val;
  }

  for (i = 0; i < 128; i+=2) {
    v = a[i:i+1];
    v0 = (extract v, 0) + 10;
    v1 = (extract v, 1) + 10;
    if (v0 < 10)
      a[i] = v0;
    if (v1 < 10)
      a[i] = v1;
  }

The vectorizer relies on subsequent optimizations to sink instructions into the
conditional block where they are anticipated.

The flag "vectorize-num-stores-pred" controls whether and how many stores to
handle this way. Vectorization of conditional stores is disabled per default for
now.

This patch also adds a change to the heuristic when the flag
"enable-loadstore-runtime-unroll" is enabled (off by default). It unrolls small
loops until load/store ports are saturated. This heuristic uses TTI's
getMaxUnrollFactor as a measure for load/store ports.

I also added a second flag -enable-cond-stores-vec. It will enable vectorization
of conditional stores. But there is no cost model for vectorization of
conditional stores in place yet so this will not do good at the moment.

rdar://15892953

Results for x86-64 -O3 -mavx +/- -mllvm -enable-loadstore-runtime-unroll
-vectorize-num-stores-pred=1 (before the BFI change):

 Performance Regressions:
   Benchmarks/Ptrdist/yacr2/yacr2 7.35% (maze3() is identical but 10% slower)
   Applications/siod/siod         2.18%
 Performance improvements:
   mesa                          -4.42%
   libquantum                    -4.15%

 With a patch that slightly changes the register heuristics (by subtracting the
 induction variable on both sides of the register pressure equation, as the
 induction variable is probably not really unrolled):

 Performance Regressions:
   Benchmarks/Ptrdist/yacr2/yacr2  7.73%
   Applications/siod/siod          1.97%

 Performance Improvements:
   libquantum                    -13.05% (we now also unroll quantum_toffoli)
   mesa                           -4.27%

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

10 years agoRevert r199871 and replace it with a simple check in the debug info
Eric Christopher [Tue, 28 Jan 2014 00:49:26 +0000 (00:49 +0000)]
Revert r199871 and replace it with a simple check in the debug info
code to see if we're emitting a function into a non-default
text section. This is still a less-than-ideal solution, but more
contained than r199871 to determine whether or not we're emitting
code into an array of comdat sections.

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

10 years agoReformat slightly.
Eric Christopher [Mon, 27 Jan 2014 23:50:03 +0000 (23:50 +0000)]
Reformat slightly.

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

10 years agoPGO branch weight: keep halving the weights until they can fit into
Manman Ren [Mon, 27 Jan 2014 23:39:03 +0000 (23:39 +0000)]
PGO branch weight: keep halving the weights until they can fit into
uint32.

When folding branches to common destination, the updated branch weights
can exceed uint32 by more than factor of 2. We should keep halving the
weights until they can fit into uint32.

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

10 years agoFix the "#ifndef HAVE_SYS_WAIT_H" code path in Program.inc to compile
Mark Seaborn [Mon, 27 Jan 2014 22:53:07 +0000 (22:53 +0000)]
Fix the "#ifndef HAVE_SYS_WAIT_H" code path in Program.inc to compile

Without this fix, WaitResult is not defined.

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

10 years agoARM MC: Fix the initial DWARF CFI unwind info at the start of a function
Mark Seaborn [Mon, 27 Jan 2014 22:38:14 +0000 (22:38 +0000)]
ARM MC: Fix the initial DWARF CFI unwind info at the start of a function

This brings MC into line with GNU 'as' on ARM, and it brings the ARM
target into line with most other LLVM targets, which declare the
initial CFI state with addInitialFrameState().

Without this, functions generated with .cfi_startproc/endproc on ARM
will tend to cause GDB to abort with:
  gdb/dwarf2-frame.c:1132: internal-error: Unknown CFA rule.

I've also tested this by comparing the output of "readelf -w" on the
object files produced by llvm-mc and gas when given the .s file added
here.

This change is part of addressing PR18636.

Differential Revision: http://llvm-reviews.chandlerc.com/D2597

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

10 years agoFix sext(setcc) -> select_cc using wrong type for setcc.
Matt Arsenault [Mon, 27 Jan 2014 21:41:54 +0000 (21:41 +0000)]
Fix sext(setcc) -> select_cc using wrong type for setcc.

Also update the comment, since it actually produces a
select (setcc) instead of select_cc.

It was checking and using the setcc result type for the
type of the sext, instead of the type of the compared items.

In my problem case, the sext was to i32 and was used as the setcc type,
but the expected type was i64.

No test since I haven't been able to hit the problem with
this on any in-tree targets.

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

10 years agoFix unsupported addressing mode assertion for pld
David Peixotto [Mon, 27 Jan 2014 21:39:04 +0000 (21:39 +0000)]
Fix unsupported addressing mode assertion for pld

Summary:
This commit gives an address mode to the PLD instruction. We
were getting an assertion failure in the frame lowering code
because we had code that was doing a pld of a stack allocated
address. The frame lowering was checking the address mode and
then asserting because pld had none defined.

This commit fixes pld for arm mode. There was a previous fix for
thumb mode in a separate commit. The commit for thumb mode
added a test in a separate file because it would otherwise fail
for arm. This commit moves the thumb test back into the prefetch.ll
file and adds the corresponding arm test.

Differential Revision: http://llvm-reviews.chandlerc.com/D2622

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

10 years agotest commit: add minor comment
Gautam Chakrabarti [Mon, 27 Jan 2014 20:03:35 +0000 (20:03 +0000)]
test commit: add minor comment

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

10 years ago[DAGCombiner] Teach how to fold sext/aext/zext of constant build vectors.
Andrea Di Biagio [Mon, 27 Jan 2014 18:45:30 +0000 (18:45 +0000)]
[DAGCombiner] Teach how to fold sext/aext/zext of constant build vectors.

This patch teaches the DAGCombiner how to fold a sext/aext/zext dag node when
the operand in input is a build vector of constants (or UNDEFs).

The inability to fold a sext/zext of a constant build_vector was the root
cause of some pcg bugs affecting vselect expansion on x86-64 with AVX support.

Before this change, the DAGCombiner only knew how to fold a sext/zext/aext of a
ConstantSDNode.

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

10 years agoSilence MSVC warning on 'uint16_t |= bool' with a cast
Reid Kleckner [Mon, 27 Jan 2014 17:47:11 +0000 (17:47 +0000)]
Silence MSVC warning on 'uint16_t |= bool' with a cast

This isn't C4800, it's C4805.  MSVC says this is unsafe, but it
generates correct code.

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

10 years ago[CMake] Put *_exports into "Misc" folder.
NAKAMURA Takumi [Mon, 27 Jan 2014 17:39:38 +0000 (17:39 +0000)]
[CMake] Put *_exports into "Misc" folder.

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

10 years agoMC: Add support for .cfi_startproc simple
David Majnemer [Mon, 27 Jan 2014 17:20:25 +0000 (17:20 +0000)]
MC: Add support for .cfi_startproc simple

This commit allows LLVM MC to process .cfi_startproc directives when
they are followed by an additional `simple' identifier. This signals to
elide the emission of target specific CFI instructions that would
normally occur initially.

This fixes PR16587.

Differential Revision: http://llvm-reviews.chandlerc.com/D2624

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

10 years agoDo not reference llvm-gcc from bugpoint
Tobias Grosser [Mon, 27 Jan 2014 13:44:58 +0000 (13:44 +0000)]
Do not reference llvm-gcc from bugpoint

Reiterating: llvm-gcc is dead since a long time.

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

10 years ago[vectorize] Initial version of respecting PGO in the vectorizer: treat
Chandler Carruth [Mon, 27 Jan 2014 13:11:50 +0000 (13:11 +0000)]
[vectorize] Initial version of respecting PGO in the vectorizer: treat
cold loops as-if they were being optimized for size.

Nothing fancy here. Simply test case included. The nice thing is that we
can now incrementally build on top of this to drive other heuristics.
All of the infrastructure work is done to get the profile information
into this layer.

The remaining work necessary to make this a fully general purpose loop
unroller for very hot loops is to make it a fully general purpose loop
unroller. Things I know of but am not going to have time to benchmark
and fix in the immediate future:

1) Don't disable the entire pass when the target is lacking vector
   registers. This really doesn't make any sense any more.
2) Teach the unroller at least and the vectorizer potentially to handle
   non-if-converted loops. This is trivial for the unroller but hard for
   the vectorizer.
3) Compute the relative hotness of the loop and thread that down to the
   various places that make cost tradeoffs (very likely only the
   unroller makes sense here, and then only when dealing with loops that
   are small enough for unrolling to not completely blow out the LSD).

I'm still dubious how useful hotness information will be. So far, my
experiments show that if we can get the correct logic for determining
when unrolling actually helps performance, the code size impact is
completely unimportant and we can unroll in all cases. But at least
we'll no longer burn code size on cold code.

One somewhat unrelated idea that I've had forever but not had time to
implement: mark all functions which are only reachable via the global
constructors rigging in the module as optsize. This would also decrease
the impact of any more aggressive heuristics here on code size.

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

10 years agoConstantHoisting: We can't insert instructions directly in front of a PHI node.
Benjamin Kramer [Mon, 27 Jan 2014 13:11:43 +0000 (13:11 +0000)]
ConstantHoisting: We can't insert instructions directly in front of a PHI node.

Insert before the terminating instruction of the dominating block instead.

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

10 years agoXCore: Fix typo in function name.
Benjamin Kramer [Mon, 27 Jan 2014 11:50:13 +0000 (11:50 +0000)]
XCore: Fix typo in function name.

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

10 years ago[vectorizer] Add an override for the target instruction cost and use it
Chandler Carruth [Mon, 27 Jan 2014 11:41:50 +0000 (11:41 +0000)]
[vectorizer] Add an override for the target instruction cost and use it
to stabilize a test that really is trying to test generic behavior and
not a specific target's behavior.

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

10 years ago[vectorizer] Simplify code to use existing helpers on the Function
Chandler Carruth [Mon, 27 Jan 2014 11:27:37 +0000 (11:27 +0000)]
[vectorizer] Simplify code to use existing helpers on the Function
object and fewer pointless variables.

Also, add a clarifying comment and a FIXME because the code which
disables *all* vectorization if we can't use implicit floating point
instructions just makes no sense at all.

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

10 years ago[vectorizer] Teach the loop vectorizer's unroller to only unroll by
Chandler Carruth [Mon, 27 Jan 2014 11:12:24 +0000 (11:12 +0000)]
[vectorizer] Teach the loop vectorizer's unroller to only unroll by
powers of two. This is essentially always the correct thing given the
impact on alignment, scaling factors that can be used in addressing
modes, etc. Also, fix the management of the unroll vs. small loop cost
to more accurately model things with this world.

Enhance a test case to actually exercise more of the unroll machinery if
using synthetic constants rather than a specific target model. Before
this change, with the added flags this test will unroll 3 times instead
of either 2 or 4 (the two sensible answers).

While I don't expect this to make a huge difference, if there are lots
of loops sitting right on the edge of hitting the 'small unroll' factor,
they might change behavior. However, I've benchmarked moving the small
loop cost up and down in many various ways and by a huge factor (2x)
without seeing more than 0.2% code size growth. Small adjustments such
as the series that led up here have led to about 1% improvement on some
benchmarks, but it is very close to the noise floor so I mostly checked
that nothing regressed. Let me know if you see bad behavior on other
targets but I don't expect this to be a sufficiently dramatic change to
trigger anything.

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

10 years ago[vectorizer] Add some flags which are useful for conducting experiments
Chandler Carruth [Mon, 27 Jan 2014 11:12:19 +0000 (11:12 +0000)]
[vectorizer] Add some flags which are useful for conducting experiments
with the unrolling behavior in the loop vectorizer. No functionality
changed at this point.

These are a bit hack-y, but talking with Hal, there doesn't seem to be
a cleaner way to easily experiment with different thresholds here and he
was also interested in them so I wanted to commit them. Suggestions for
improvement are very welcome here.

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

10 years ago[vectorizer] Fix a trivial oversight where we always requested the
Chandler Carruth [Mon, 27 Jan 2014 11:12:14 +0000 (11:12 +0000)]
[vectorizer] Fix a trivial oversight where we always requested the
number of vector registers rather than toggling between vector and
scalar register number based on VF. I don't have a test case as
I spotted this by inspection and on X86 it only makes a difference if
your target is lacking SSE and thus has *no* vector registers.

If someone wants to add a test case for this for ARM or somewhere else
where this is more significant, that would be awesome.

Also made the variable name a bit more sensible while I'm here.

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

10 years agoFix crasher introduced in r200203 and caught by a libc++ buildbot. Don't assume that...
Nick Lewycky [Mon, 27 Jan 2014 10:47:44 +0000 (10:47 +0000)]
Fix crasher introduced in r200203 and caught by a libc++ buildbot. Don't assume that getMulExpr returns a SCEVMulExpr, it may have simplified it to something else!

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

10 years agoTeach SCEV to handle more cases of 'and X, CST', specifically where CST is any number...
Nick Lewycky [Mon, 27 Jan 2014 10:04:03 +0000 (10:04 +0000)]
Teach SCEV to handle more cases of 'and X, CST', specifically where CST is any number of contiguous 1 bits in a row, with any number of leading and trailing 0 bits.

Unfortunately, this in turn led to some lower quality SCEVs due to some different paths through expression simplification, so add getUDivExactExpr and use it. This fixes all instances of the problems that I found, but we can make that function smarter as necessary.

Merge test "xor-and.ll" into "and-xor.ll" since I needed to update it anyways. Test 'nsw-offset.ll' analyzes a little deeper, %n now gets a scev in terms of %no instead of a SCEVUnknown.

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

10 years agoAdditional fix for 200201: due to dependence on bitwidth test was moved to X86 directory.
Stepan Dyatkovskiy [Mon, 27 Jan 2014 09:43:10 +0000 (09:43 +0000)]
Additional fix for 200201: due to dependence on bitwidth test was moved to X86 directory.

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

10 years agoFix for PR18102.
Stepan Dyatkovskiy [Mon, 27 Jan 2014 09:18:31 +0000 (09:18 +0000)]
Fix for PR18102.

Issue outcomes from DAGCombiner::MergeConsequtiveStores, more precisely from
mem-ops sequence sorting.

Consider, how MergeConsequtiveStores works for next example:

store i8 1, a[0]
store i8 2, a[1]
store i8 3, a[1]   ; a[1] again.
return   ; DAG starts here

1. Method will collect all the 3 stores.
2. It sorts them by distance from the base pointer (farthest with highest
index).
3. It takes first consecutive non-overlapping stores and (if possible) replaces
them with a single store instruction.

The point is, we can't determine here which 'store' instruction
would be the second after sorting ('store 2' or 'store 3').
It happens that 'store 3' would be the second, and 'store 2' would be the third.

So after merging we have the next result:

store i16 (1 | 3 << 8), base   ; is a[0] but bit-casted to i16
store i8 2, a[1]

So actually we swapped 'store 3' and 'store 2' and got wrong contents in a[1].

Fix: In sort routine just also take into account mem-op sequence number.

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

10 years ago[vectorizer] Clean up the handling of unvectorized loop unrolling in the
Chandler Carruth [Mon, 27 Jan 2014 08:17:58 +0000 (08:17 +0000)]
[vectorizer] Clean up the handling of unvectorized loop unrolling in the
LoopVectorize pass.

The logic here doesn't make much sense. We *only* unrolled if the
unvectorized loop was a reduction loop with a single basic block *and*
small loop body. The reduction part in particular doesn't make much
sense. Instead, if we just fall through to the vectorized unroll logic
it makes more sense of unrolling if there is a vectorized reduction that
could be hacked on by the SLP vectorizer *or* if the loop is small.

This is mostly a cleanup and nothing in the test suite really exercises
this, but I did run benchmarks across this change and saw no really
significant changes.

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

10 years agoR600/SI: Add intrinsic for BUFFER_LOAD_DWORD* instructions
Michel Danzer [Mon, 27 Jan 2014 07:20:51 +0000 (07:20 +0000)]
R600/SI: Add intrinsic for BUFFER_LOAD_DWORD* instructions

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200196 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600/SI: Add intrinsic for S_SENDMSG instruction
Michel Danzer [Mon, 27 Jan 2014 07:20:44 +0000 (07:20 +0000)]
R600/SI: Add intrinsic for S_SENDMSG instruction

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200195 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRoll back the ConstStringRef change for now
Alp Toker [Mon, 27 Jan 2014 05:24:39 +0000 (05:24 +0000)]
Roll back the ConstStringRef change for now

There are a couple of interesting things here that we want to check over
(particularly the expecting asserts in StringRef) and get right for general use
in ADT so hold back on this one. For clang we have a workable templated
solution to use in the meanwhile.

This reverts commit r200187.

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

10 years agoPrint .mask and .fmask with the target streamer.
Rafael Espindola [Mon, 27 Jan 2014 04:33:11 +0000 (04:33 +0000)]
Print .mask and .fmask with the target streamer.

Testing this also found the missing '\n' after .frame that this patch also
fixes.

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

10 years agoRename IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA.
Rui Ueyama [Mon, 27 Jan 2014 04:22:24 +0000 (04:22 +0000)]
Rename IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA.

editbin.exe and link.exe both accepts /highentropyva option to set this bit, so
doing s/VIRTUAL_ADDRESS/VA/ should make sense.

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

10 years agoMove true/false StringRef helper to StringExtras
Alp Toker [Mon, 27 Jan 2014 04:07:36 +0000 (04:07 +0000)]
Move true/false StringRef helper to StringExtras

StringRef is a low-level data wrapper that shouldn't know about language
strings like 'true' and 'false' whereas StringExtras is just the place for
higher-level utilities.

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

10 years agoStringRef: Extend constexpr capabilities and introduce ConstStringRef
Alp Toker [Mon, 27 Jan 2014 04:07:17 +0000 (04:07 +0000)]
StringRef: Extend constexpr capabilities and introduce ConstStringRef

(1) Add llvm_expect(), an asserting macro that can be evaluated as a constexpr
    expression as well as a runtime assert or compiler hint in release builds. This
    technique can be used to construct functions that are both unevaluated and
    compiled depending on usage.

(2) Update StringRef using llvm_expect() to preserve runtime assertions while
    extending the same checks to static asserts in C++11 builds that support the
    feature.

(3) Introduce ConstStringRef, a strong subclass of StringRef that references
    compile-time constant strings. It's convertible to, but not from, ordinary
    StringRef and thus can be used to add compile-time safety to various interfaces
    in LLVM and clang that only accept fixed inputs such as diagnostic format
    strings that tend to get misused.

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

10 years agoPrint .frame via the target streamer.
Rafael Espindola [Mon, 27 Jan 2014 03:53:56 +0000 (03:53 +0000)]
Print .frame via the target streamer.

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

10 years ago[AArch64 NEON] Try to generate CONCAT_VECTOR when lowering BUILD_VECTOR or SHUFFLE_VE...
Kevin Qin [Mon, 27 Jan 2014 02:53:54 +0000 (02:53 +0000)]
[AArch64 NEON] Try to generate CONCAT_VECTOR when lowering BUILD_VECTOR or SHUFFLE_VECTOR.

Replace r199791.

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

10 years agoRevert r199791.
Kevin Qin [Mon, 27 Jan 2014 02:53:41 +0000 (02:53 +0000)]
Revert r199791.

It's old version which has some bugs. I'll commit lattest patch soon.

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

10 years agoUse SwitchSection in MipsAsmPrinter::EmitStartOfAsmFile.
Rafael Espindola [Mon, 27 Jan 2014 01:33:33 +0000 (01:33 +0000)]
Use SwitchSection in MipsAsmPrinter::EmitStartOfAsmFile.

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

10 years agoRemove dead code.
Rafael Espindola [Mon, 27 Jan 2014 00:47:51 +0000 (00:47 +0000)]
Remove dead code.

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

10 years agoAdd back spaces I missed in the conversion to emitRawComments.
Rafael Espindola [Mon, 27 Jan 2014 00:19:41 +0000 (00:19 +0000)]
Add back spaces I missed in the conversion to emitRawComments.

Sorry about that.

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

10 years agoUse emitRawComment instead of EmitRawText.
Rafael Espindola [Mon, 27 Jan 2014 00:16:00 +0000 (00:16 +0000)]
Use emitRawComment instead of EmitRawText.

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

10 years agoAdd missing file.
Rafael Espindola [Mon, 27 Jan 2014 00:08:17 +0000 (00:08 +0000)]
Add missing file.

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

10 years agoAdd a XCoreTargetStreamer and port over the simple uses of EmitRawText.
Rafael Espindola [Sun, 26 Jan 2014 23:57:05 +0000 (23:57 +0000)]
Add a XCoreTargetStreamer and port over the simple uses of EmitRawText.

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

10 years agoMC: fix test locations/name
Saleem Abdulrasool [Sun, 26 Jan 2014 22:55:02 +0000 (22:55 +0000)]
MC: fix test locations/name

Placed the MC variant diagnostics in the wrong directory accidentally.  Move
them into their respective architecture specific directories.

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

10 years agoARM: improve diagnostics for .word directive
Saleem Abdulrasool [Sun, 26 Jan 2014 22:29:50 +0000 (22:29 +0000)]
ARM: improve diagnostics for .word directive

If a complex expression was passed to the .word directive and the first part of
the directive failed to parse, a secondary diagnostic would be produced that
would clutter the error diagnostics.  Improve the diagnostics by consuming the
remainder of the statement.

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

10 years agoAsmParser: improve diagnostics for invalid variants
Saleem Abdulrasool [Sun, 26 Jan 2014 22:29:43 +0000 (22:29 +0000)]
AsmParser: improve diagnostics for invalid variants

An emitted diagnostic for an invalid relocation variant would place the caret on
the token following the relocation variant indicator or at the end of the line
if there was no following token.  This change corrects the placement of the
caret to point to the token.

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

10 years agoMC: whitespace
Saleem Abdulrasool [Sun, 26 Jan 2014 22:29:36 +0000 (22:29 +0000)]
MC: whitespace

Fix indentation, remove unnecessary line.  NFC.

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

10 years agoAvoid C++ comment in C sources
Alp Toker [Sun, 26 Jan 2014 18:44:34 +0000 (18:44 +0000)]
Avoid C++ comment in C sources

lib/Target/X86/Disassembler/X86DisassemblerDecoder.c:1361:7: error: C++ style comments are not allowed in ISO C90

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

10 years agoFollow up of r200095. Code clean up.
Evan Cheng [Sun, 26 Jan 2014 18:30:13 +0000 (18:30 +0000)]
Follow up of r200095. Code clean up.

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

10 years ago[CMake] tablegen(): Use -I <dir> according to the list by include_directories().
NAKAMURA Takumi [Sun, 26 Jan 2014 12:41:38 +0000 (12:41 +0000)]
[CMake] tablegen(): Use -I <dir> according to the list by include_directories().

For now, local_tds and global_tds are integrated to dependent_tds.

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

10 years ago[CMake] Functionalize tblgen().
NAKAMURA Takumi [Sun, 26 Jan 2014 12:41:33 +0000 (12:41 +0000)]
[CMake] Functionalize tblgen().

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

10 years agoClean up the Legal/Expand logic for SPARC popc.
Jakob Stoklund Olesen [Sun, 26 Jan 2014 08:12:34 +0000 (08:12 +0000)]
Clean up the Legal/Expand logic for SPARC popc.

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

10 years agoImplement the missing bits corresponding to .mips_hack_elf_flags.
Rafael Espindola [Sun, 26 Jan 2014 06:57:13 +0000 (06:57 +0000)]
Implement the missing bits corresponding to .mips_hack_elf_flags.

These were:
* noreorder handling on the target object streamer and asm parser.
* setting the initial flag bits based on the enabled features.
* setting the elf header flag for micromips

It is *really* depressing I am the one doing this instead of someone at
mips actually taking the time to understand the infrastructure.

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

10 years agoPass a MCSubtargetInfo down to the TargetStreamer creation.
Rafael Espindola [Sun, 26 Jan 2014 06:38:58 +0000 (06:38 +0000)]
Pass a MCSubtargetInfo down to the TargetStreamer creation.

With this the target streamers will be able to know the target features that
are in use.

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

10 years ago[CMake] configure_lit_site_cfg: ${SHLIBDIR} should point the build tree.
NAKAMURA Takumi [Sun, 26 Jan 2014 06:18:56 +0000 (06:18 +0000)]
[CMake] configure_lit_site_cfg: ${SHLIBDIR} should point the build tree.

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

10 years agoOnly generate the popc instruction for SPARC CPUs that implement it.
Jakob Stoklund Olesen [Sun, 26 Jan 2014 06:09:59 +0000 (06:09 +0000)]
Only generate the popc instruction for SPARC CPUs that implement it.

The popc instruction is defined in the SPARCv9 instruction set
architecture, but it was emulated on CPUs older than Niagara 2.

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

10 years agoFix swapped CASA operands.
Jakob Stoklund Olesen [Sun, 26 Jan 2014 06:09:54 +0000 (06:09 +0000)]
Fix swapped CASA operands.

Found by SingleSource/UnitTests/AtomicOps.c

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

10 years agoConstruct the MCStreamer before constructing the MCTargetStreamer.
Rafael Espindola [Sun, 26 Jan 2014 06:06:37 +0000 (06:06 +0000)]
Construct the MCStreamer before constructing the MCTargetStreamer.

This has a few advantages:
* Only targets that use a MCTargetStreamer have to worry about it.
* There is never a MCTargetStreamer without a MCStreamer, so we can use a
  reference.
* A MCTargetStreamer can talk to the MCStreamer in its constructor.

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

10 years ago[Sparc] Add support for parsing DW_CFA_GNU_window_save.
Venkatraman Govindaraju [Sun, 26 Jan 2014 05:13:44 +0000 (05:13 +0000)]
[Sparc] Add support for parsing DW_CFA_GNU_window_save.

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

10 years agoConvert some easy uses of EmitRawText to TargetStreamer methods.
Rafael Espindola [Sun, 26 Jan 2014 05:06:48 +0000 (05:06 +0000)]
Convert some easy uses of EmitRawText to TargetStreamer methods.

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

10 years agoCOFF: Add a missing enum value for high entropy ASLR.
Rui Ueyama [Sun, 26 Jan 2014 05:05:23 +0000 (05:05 +0000)]
COFF: Add a missing enum value for high entropy ASLR.

That bit is not documented in the PE/COFF spec published by Microsoft, so we
don't know the official name of it. I named this bit
IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VIRTUAL_ADDRESS because the bit is
reported as "high entropy virtual address" by dumpbin.exe,

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

10 years agoImprove some x86 type constraints.
Craig Topper [Sun, 26 Jan 2014 04:59:39 +0000 (04:59 +0000)]
Improve some x86 type constraints.

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

10 years agoImprove pattern match from v1i8 to v1i32 for AArch64 Neon.
Jiangning Liu [Sun, 26 Jan 2014 04:55:53 +0000 (04:55 +0000)]
Improve pattern match from v1i8 to v1i32 for AArch64 Neon.

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

10 years agoRemove unused typedef.
Rui Ueyama [Sun, 26 Jan 2014 04:50:15 +0000 (04:50 +0000)]
Remove unused typedef.

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

10 years agollvm-readobj: add support for PE32+ (Windows 64 bit executable).
Rui Ueyama [Sun, 26 Jan 2014 04:15:52 +0000 (04:15 +0000)]
llvm-readobj: add support for PE32+ (Windows 64 bit executable).

PE32+ supports 64 bit address space, but the file format remains 32 bit.
So its file format is pretty similar to PE32 (32 bit executable). The
differences compared to PE32 are (1) the lack of "BaseOfData" field and
(2) some of its data members are 64 bit.

In this patch, I added a new member function to get a PE32+ Header object to
COFFObjectFile class and made llvm-readobj to use it.

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

10 years agoRemove -print-hack-directives from a test where we already do the right thing.
Rafael Espindola [Sun, 26 Jan 2014 04:14:50 +0000 (04:14 +0000)]
Remove -print-hack-directives from a test where we already do the right thing.

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

10 years agoMove tests that just use llc from test/MC/Mips to test/MC/Codegen.
Rafael Espindola [Sun, 26 Jan 2014 04:08:47 +0000 (04:08 +0000)]
Move tests that just use llc from test/MC/Mips to test/MC/Codegen.

This is an expanded version of r200064.

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

10 years agoImplement pattern match from v1xx to v1xx for AArch64 Neon.
Jiangning Liu [Sun, 26 Jan 2014 03:27:40 +0000 (03:27 +0000)]
Implement pattern match from v1xx to v1xx for AArch64 Neon.

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

10 years ago[Sparc] Add support for sparc relocation types in ELF object file.
Venkatraman Govindaraju [Sun, 26 Jan 2014 03:21:28 +0000 (03:21 +0000)]
[Sparc] Add support for sparc relocation types in ELF object file.

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

10 years ago[AArch64 NEON] Add patterns for concat_vector on v2i32.
Kevin Qin [Sun, 26 Jan 2014 02:46:15 +0000 (02:46 +0000)]
[AArch64 NEON] Add patterns for concat_vector on v2i32.

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

10 years ago[AArch64 NEON] Add test case for vector FP_ROUND.
Kevin Qin [Sun, 26 Jan 2014 02:23:33 +0000 (02:23 +0000)]
[AArch64 NEON] Add test case for vector FP_ROUND.

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

10 years ago[AArch64 NEON] Fix pattern match failed on FP_ROUND from v1f128 to v1f64.
Kevin Qin [Sun, 26 Jan 2014 02:19:35 +0000 (02:19 +0000)]
[AArch64 NEON] Fix pattern match failed on FP_ROUND from v1f128 to v1f64.

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

10 years agoremoving duplicate enum value
Venkatraman Govindaraju [Sat, 25 Jan 2014 23:50:21 +0000 (23:50 +0000)]
removing duplicate enum value

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

10 years agoMissing ELF relocations for Sparc.
Venkatraman Govindaraju [Sat, 25 Jan 2014 23:40:07 +0000 (23:40 +0000)]
Missing ELF relocations for Sparc.

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

10 years agoRe-enabling MCJIT tests on ARM
Renato Golin [Sat, 25 Jan 2014 23:38:08 +0000 (23:38 +0000)]
Re-enabling MCJIT tests on ARM

After several refactorings on the MCJIT remote communication, things are
finally looking good on Clang-compiled LLVM regarding MCJIT remote tests,
so I'm re-enabling them to see how the self-hosting buildbot behaves over
a longer period.

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

10 years ago[Sparc] Add sparc to the list of XFAIL architecture. It seems that the llvm-cov test...
Venkatraman Govindaraju [Sat, 25 Jan 2014 22:54:47 +0000 (22:54 +0000)]
[Sparc] Add sparc to the list of XFAIL architecture. It seems that the llvm-cov test is not supported in big-endian architectures.

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

10 years agoSet displacementSize to 1 for instrucitons with mod==0x1. Fixes PR17310. Modified...
Craig Topper [Sat, 25 Jan 2014 22:48:43 +0000 (22:48 +0000)]
Set displacementSize to 1 for instrucitons with mod==0x1. Fixes PR17310. Modified from patch by James Courtier-Dutton.

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

10 years agoAdd a TBAA CodeGen failure test case
Hal Finkel [Sat, 25 Jan 2014 20:16:36 +0000 (20:16 +0000)]
Add a TBAA CodeGen failure test case

I disabled the use of TBAA in CodeGen in r200093. This adds a test case that
demonstrates the problems with inttoptr and TBAA in CodeGen (and, specifically,
the problem that causes LLVM to miscompile itself in Release mode). This test
will currently fail if -use-tbaa-in-sched-mi is enabled.

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

10 years agoClean up hack which is no longer needed after r198617. No functionality change.
Evan Cheng [Sat, 25 Jan 2014 19:51:19 +0000 (19:51 +0000)]
Clean up hack which is no longer needed after r198617. No functionality change.

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

10 years agoXFAIL test/CodeGen/SystemZ/alias-01.ll which requires CodeGen TBAA
Hal Finkel [Sat, 25 Jan 2014 19:31:44 +0000 (19:31 +0000)]
XFAIL test/CodeGen/SystemZ/alias-01.ll which requires CodeGen TBAA

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

10 years agoDisable the use of TBAA when using AA in CodeGen
Hal Finkel [Sat, 25 Jan 2014 19:24:54 +0000 (19:24 +0000)]
Disable the use of TBAA when using AA in CodeGen

There are currently two issues, of which I currently know, that prevent TBAA
from being correctly usable in CodeGen:

  1. Stack coloring does not update TBAA when merging allocas. This is easy
     enough to fix, but is not the largest problem.

  2. CGP inserts ptrtoint/inttoptr pairs when sinking address computations.
     Because BasicAA does not handle inttoptr, we'll often miss basic type punning
     idioms that we need to catch so we don't miscompile real-world code (like LLVM).

I don't yet have a small test case for this, but this fixes self hosting a
non-asserts build of LLVM on PPC64 when using -enable-aa-sched-mi and -misched=shuffle.

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

10 years agoDon't use EnforceSmallerThan for EnforceVectorSubVectorTypeIs. EnforceSmallerThan...
Craig Topper [Sat, 25 Jan 2014 17:40:33 +0000 (17:40 +0000)]
Don't use EnforceSmallerThan for EnforceVectorSubVectorTypeIs. EnforceSmallerThan doesn't handle vectors quite right and should really enforce that vectors have the same number of elements. Add explicit checks for vector element count differing in EnforceVectorSubVectorTypeIs instead. This removes some unnecessary type checks in X86GenDAGISel.inc.

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

10 years agoFix "llvm-objdump -d -r" to show relocations inline for ELF files
Mark Seaborn [Sat, 25 Jan 2014 17:38:19 +0000 (17:38 +0000)]
Fix "llvm-objdump -d -r" to show relocations inline for ELF files

This fixes a regression introduced by r182908, which broke
llvm-objdump's ability to display relocations inline in a disassembly
dump for ELF object files.

That change removed a SectionRelocMap from Object/ELF.h, which we
recreate in llvm-objdump.cpp.

I discovered this regression via an out-of-tree test
(test/NaCl/X86/pnacl-hides-sandbox-x86-64.ll) which used llvm-objdump.

Note that the "Unknown" string in the test output on i386 isn't quite
right, but this appears to be a pre-existing bug.

Differential Revision: http://llvm-reviews.chandlerc.com/D2559

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

10 years agoFix typo in commment tyep->type.
Craig Topper [Sat, 25 Jan 2014 17:34:23 +0000 (17:34 +0000)]
Fix typo in commment tyep->type.

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

10 years agoAdd combiner-aa-only-func (debug only)
Hal Finkel [Sat, 25 Jan 2014 17:32:39 +0000 (17:32 +0000)]
Add combiner-aa-only-func (debug only)

This option (which is !NDEBUG only) allows restricting the use of alias
analysis in DAGCombiner to a specific function. This has proved extremely
valuable to isolating bugs related to this feature, and mirrors the
misched-only-func option provided by the new instruction scheduler.

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

10 years agoImprove descriptions of combiner-alias-analysis and combiner-global-alias-analysis
Hal Finkel [Sat, 25 Jan 2014 17:32:37 +0000 (17:32 +0000)]
Improve descriptions of combiner-alias-analysis and combiner-global-alias-analysis

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

10 years agoReverting r199886 (Prevent repetitive warnings for unrecognized processors and features)
Artyom Skrobov [Sat, 25 Jan 2014 16:56:18 +0000 (16:56 +0000)]
Reverting r199886 (Prevent repetitive warnings for unrecognized processors and features)

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

10 years agoAdded .DS_Store entry in .gitignore for ignoring .DS_Store files in the source
Rafael Espindola [Sat, 25 Jan 2014 15:15:16 +0000 (15:15 +0000)]
Added .DS_Store entry in .gitignore for ignoring .DS_Store files in the source
tree generated by OS X.

Patch by Abhay Kadam!

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

10 years agoThis reverts commit r200064 and r200051.
Rafael Espindola [Sat, 25 Jan 2014 15:06:56 +0000 (15:06 +0000)]
This reverts commit r200064 and r200051.

r200064 depends on r200051.

r200051 is broken: I tries to replace .mips_hack_elf_flags, which is a good
thing, but what it replaces it with is even worse.

The new emitMipsELFFlags it adds corresponds to no assembly directive, is not
marked as a hack and is not even printed to the .s file.

The patch also introduces more uses of hasRawTextSupport.

The correct way to remove .mips_hack_elf_flags is to have the mips target
streamer handle the default flags (and command line options). That way the
same code path is used for asm and obj. The streamer interface should *really*
correspond to what is printed in the .s file.

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

10 years ago[LPM] Conclude my immediate work by making the LoopVectorizer
Chandler Carruth [Sat, 25 Jan 2014 10:01:55 +0000 (10:01 +0000)]
[LPM] Conclude my immediate work by making the LoopVectorizer
a FunctionPass. With this change the loop vectorizer no longer is a loop
pass and can readily depend on function analyses. In particular, with
this change we no longer have to form a loop pass manager to run the
loop vectorizer which simplifies the entire pass management of LLVM.

The next step here is to teach the loop vectorizer to leverage profile
information through the profile information providing analysis passes.

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

10 years agoUse isConcrete and getConcrete instead of using TypeVec directly.
Craig Topper [Sat, 25 Jan 2014 05:33:48 +0000 (05:33 +0000)]
Use isConcrete and getConcrete instead of using TypeVec directly.

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