Commit Graph

114651 Commits

Author SHA1 Message Date
Sanjay Patel
6deb05e63a fixed to use CHECK-LABELs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231517 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 21:05:02 +00:00
Sanjay Patel
d532d10275 fixed to test only the feature, not the feature and a CPU
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231516 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 20:58:15 +00:00
Sanjay Patel
f2b34a568b fixed to test only the feature, not the feature and a CPU
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231515 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 20:57:40 +00:00
Sanjay Patel
9e03e85cac fixed to test feature, not CPU
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231513 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 20:51:25 +00:00
Sanjay Patel
17392758a1 fixed to test features, not CPUs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231512 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 20:46:16 +00:00
Sanjay Patel
91b79125ec fixed test to use SSE2 attribute
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231510 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 20:38:55 +00:00
Sanjay Patel
e7abe0cdbc fixed to test only the feature, not the feature and a CPU
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231509 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 20:34:20 +00:00
Matthias Braun
47941aa098 DAGCombiner: Canonicalize select(and/or,x,y) depending on target.
This is based on the following equivalences:
select(C0 & C1, X, Y) <=> select(C0, select(C1, X, Y), Y)
select(C0 | C1, X, Y) <=> select(C0, X, select(C1, X, Y))

Many target cannot perform and/or on the CPU flags and therefore the
right side should be choosen to avoid materializign the i1 flags in an
integer register. If the target can perform this operation efficiently
we normalize to the left form.

Differential Revision: http://reviews.llvm.org/D7622

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231507 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 19:49:10 +00:00
Matthias Braun
fdd8f37dc6 DAGCombiner: Factor out some and/or combines.
This is in preparation for changing visitSELECT to normalize towards
select(Cond0, select(Cond1, X, Y), Y);
select(Cond0, X, select(Cond1, X, Y)) which perfom an implicit and/or of
the conditions.

The factored function contains all DAGCombine rules which reduce two values
combined by an And/Or operation to a single value. This does not include rules
involving constants as visitSELECT already handles that case.

Differential Revision: http://reviews.llvm.org/D8026

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231506 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 19:49:06 +00:00
Bruno Cardoso Lopes
664388cd2a [AsmPrinter][TLOF] Remove AArch64 test to appease buildbots
Follow up from r231497. Using XFAIL would still trigger fail on some
buildbots. Will re-introduce it as soon as I have a fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231505 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 19:42:18 +00:00
Benjamin Kramer
db108d9228 LoopInterchange: Remove empty method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231503 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 19:37:26 +00:00
Benjamin Kramer
78588257de LoopInterchange: Rephrase instruction moving using ilist's splice and factor it into a function
+ Random cleanups. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231501 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 18:59:14 +00:00
Matthias Braun
ae6bbac733 ExecutionDepsFix: Indizes -> Indices.
Translate german to english.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231500 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 18:56:20 +00:00
Bruno Cardoso Lopes
83f6fece72 [AsmPrinter][TLOF] XFAIL AArch64 test to appease buildbots
The checking for extgotequiv and localgotequiv rely on the emission
order, which is not guaranteed because we use DenseMap to hold the GOT
equivalents. XFAIL this now until I get time to use MapVector and test
out the solution. In the meantime, appease buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231497 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 18:38:42 +00:00
Eric Christopher
be76ce0ca1 Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231495 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 18:20:23 +00:00
Frederic Riss
98ecf5a7ed [dsymutil] Add debug_str construction support.
With this comes the ability to correctly clone string attributes in DIEs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231493 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 17:56:30 +00:00
Tom Stellard
2d6b5022c4 R600/SI: Remove unused register class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231491 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 17:00:16 +00:00
Benjamin Kramer
a8c404923a Fold init() helpers into constructors. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231486 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 16:21:15 +00:00
Chad Rosier
3ad549487e Avoid calls to dumpPassInfo and RegionBase<Tr>::getNameStr() in RGPassManager if
-debug-pass is not specified, as the string is only used when dumping pass
information.  There is a big cost of determining the name in
ReginBase<Tr>:getNameStr() if the region's entry or exit block doesn't have a
name.  This is the case for the Release build, as names are not preserved by the
front-end.

RegionPass is mainly used by Polly, resulting in long compile time for one file
of a customer application with the Release build (1m24s) vs Release+Asserts
build (10s) when Polly is used.  With this change, the compile time with the
Release build went down to 8s.

Patch by Sanjin Sijaric <ssijaric@codeaurora.org>!
Phabricator: http://reviews.llvm.org/D8076

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231485 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 16:15:04 +00:00
James Molloy
4e022da51e [ConstantRange] Teach multiply to be cleverer about signed ranges.
Multiplication is not dependent on signedness, so just treating
all input ranges as unsigned is not incorrect. However it will cause
overly pessimistic ranges (such as full-set) when used with signed
negative values.

Teach multiply to try to interpret its inputs as both signed and
unsigned, and then to take the most specific (smallest population)
as its result.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231483 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 15:50:47 +00:00
Bruno Cardoso Lopes
653997ebc2 [AsmPrinter][TLOF] Make AArch64 test a bit more flexible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231481 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 15:11:41 +00:00
Bruno Cardoso Lopes
9dda04db93 [AsmPrinter][TLOF] Split tests and move to appropriate directories
Follow up from r231474 and 231475 to appease buildbots

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231480 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 14:41:56 +00:00
Bruno Cardoso Lopes
dfc6383227 [AsmPrinter][TLOF] 32-bit MachO support for replacing GOT equivalents
Add MachO 32-bit (i.e. arm and x86) support for replacing global GOT equivalent
symbol accesses. Unlike 64-bit targets, there's no GOTPCREL relocation, and
access through a non_lazy_symbol_pointers section is used instead.

-- before

    _extgotequiv:
       .long _extfoo

    _delta:
       .long _extgotequiv-_delta

-- after

    _delta:
       .long L_extfoo$non_lazy_ptr-_delta

       .section __IMPORT,__pointers,non_lazy_symbol_pointers
    L_extfoo$non_lazy_ptr:
       .indirect_symbol _extfoo
       .long 0

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231475 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 13:49:05 +00:00
Bruno Cardoso Lopes
66aa390799 [AsmPrinter][TLOF] ARM64 MachO support for replacing GOT equivalents
Follow up r230264 and add ARM64 support for replacing global GOT
equivalent symbol accesses by references to the GOT entry for the final
symbol instead, example:

-- before

   .globl  _foo
  _foo:
   .long   42

   .globl  _gotequivalent
  _gotequivalent:
   .quad   _foo

   .globl  _delta
  _delta:
   .long   _gotequivalent-_delta

-- after

   .globl  _foo
  _foo:
   .long   42

   .globl  _delta
  Ltmp3:
   .long _foo@GOT-Ltmp3

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231474 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 13:48:45 +00:00
Benjamin Kramer
a52da9a180 CodingStyle: Allow delegating ctors
Delegating constructors seem to work fine with all supported compilers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231473 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 13:46:50 +00:00
Toma Tabacu
25c2850952 [mips] [IAS] Add missing constraints and improve testing for the .module directive.
Summary:
None of the .set directives can be used before the .module directives. The .set mips0/pop/push were not triggering this constraint.
Also added testing for all the other implemented directives which are supposed to trigger this constraint.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D7140

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231465 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 12:15:12 +00:00
Daniel Jasper
90e6a21e85 Change the way in which error case is being handled.
Specifically this:
* Prevents an "unused" warning in non-assert builds.
* In that error case return with out removing a child loop instead of
  looping forever.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231459 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 10:39:14 +00:00
Karthik Bhat
52610d84ad Add a new pass "Loop Interchange"
This pass interchanges loops to provide a more cache-friendly memory access.

For e.g. given a loop like -
  for(int i=0;i<N;i++)
    for(int j=0;j<N;j++)
      A[j][i] = A[j][i]+B[j][i];

is interchanged to -
  for(int j=0;j<N;j++)
    for(int i=0;i<N;i++)
      A[j][i] = A[j][i]+B[j][i];

This pass is currently disabled by default.

To give a brief introduction it consists of 3 stages-

LoopInterchangeLegality : Checks the legality of loop interchange based on Dependency matrix.
LoopInterchangeProfitability: A very basic heuristic has been added to check for profitibility. This will evolve over time.
LoopInterchangeTransform : Which does the actual transform.

LNT Performance tests shows improvement in Polybench/linear-algebra/kernels/mvt and Polybench/linear-algebra/kernels/gemver becnmarks.

TODO:
1) Add support for reductions and lcssa phi.
2) Improve profitability model.
3) Improve loop selection algorithm to select best loop for interchange. Currently the innermost loop is selected for interchange.
4) Improve compile time regression found in llvm lnt due to this pass.
5) Fix issues in Dependency Analysis module.

A special thanks to Hal for reviewing this code.
Review: http://reviews.llvm.org/D7499




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231458 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 10:11:25 +00:00
David Majnemer
ee711b5b16 X86: Form IMGREL relocations for LLVM Functions
We supported forming IMGREL relocations from ConstantExprs involving
__ImageBase if the minuend was a GlobalVariable.  Extend this
functionality to all GlobalObjects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231456 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 08:11:32 +00:00
Yaron Keren
02dc4fa6b2 Silence C4715 'not all control paths return a value' warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231455 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 07:49:14 +00:00
Rui Ueyama
8617b3bb3e Support: Improve performance of FileOutputBuffer on Windows
We extend an underlying file before mmap'ing it, but it's not needed
on Windows. Extending file is slow on Windows, so we should avoid doing that.
The difference gets larger as the size of an output file gets larger.
It shove off 2 seconds out of 25 seconds when linking chrome.dll with LLD,
for example.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231452 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 06:07:32 +00:00
Michael Gottesman
517e68fe7b [objc-arc] Sprinkle some more auto on some iterators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231447 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 02:10:03 +00:00
Michael Gottesman
18b755804f [objc-arc] Move the detection of potential uses or altering of a ref count onto PtrState.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231446 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 02:07:12 +00:00
Michael Zolotukhin
6023ad2d37 LegalizeTypes: Handle shift by 0 in ExpandShiftByConstant.
Though such shifts are usually optimized away by combiner, we still can
encounter them after a vector shift is legalized.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231443 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 01:13:01 +00:00
Rafael Espindola
b6fd95ab41 Remember to move a type to the correct set when setting the body.
We would set the body of a struct type (therefore making it non-opaque)
but were forgetting to move it to the non-opaque set.

Fixes pr22807.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231442 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 00:50:21 +00:00
Michael Gottesman
b207e98e20 [objc-arc] Move the checking of whether or not we can match onto PtrStates and out of the main dataflow.
These refactored computations check whether or not we are at a stage
of the sequence where we can perform a match. This patch moves the
computation out of the main dataflow and into
{BottomUp,TopDown}PtrState.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231439 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 00:34:42 +00:00
Michael Gottesman
f111a2a5f1 [objc-arc] Refactor (Re-)initialization of PtrState from dataflow -> {TopDown,BottomUp}PtrState Class.
This initialization occurs when we see a new retain or release. Before
we performed the actual initialization inline in the dataflow. That is
just messy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231438 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 00:34:39 +00:00
Michael Gottesman
5c86053f69 [objc-arc] Create two subclasses of PtrState in preparation for moving per ptr state change behavior onto a PtrState class.
This will enable the main ObjCARCOpts dataflow to work with higher
level concepts such as "can this ptr state be modified by this ref
count" and not need to understand the nitty gritty details of how that
is determined. This makes the dataflow cleaner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231437 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 00:34:36 +00:00
Michael Gottesman
c0cb123b8d [objc-arc] Extract out MDNodes into a cache structure so the information can be passed around.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231436 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 00:34:33 +00:00
Michael Gottesman
0d7cce41ff [objc-arc] Remove annotations code.
It will always be in the history if it is needed again. Now it is just dead
code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231435 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 00:34:29 +00:00
Nadav Rotem
368d2e9976 Teach ComputeNumSignBits about signed reminder.
This optimization a continuation of r231140 that reasoned about signed div.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231433 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06 00:23:58 +00:00
Michael Gottesman
b0b6966c1d Fix build error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231430 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-05 23:57:07 +00:00
Michael Gottesman
418e268994 [objc-arc] Change some casts and loop iterators to use auto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231427 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-05 23:29:06 +00:00
Michael Gottesman
3b402bcc83 [objc-arc] Extract out state specific to a ref count from the main objc arc sequence dataflow. This will allow me to separate the actual ARC queries from the meat of the dataflow algorithm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231426 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-05 23:29:03 +00:00
Michael Gottesman
d54a275ee1 [objc-arc] Extract blot map vector into its own file. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231425 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-05 23:28:58 +00:00
Ahmed Bougacha
30fdbe5948 [X86] Remove stale comment. NFC.
It turns out 256bit V[SZ]EXT nodes are still
generated by the new shuffle lowering, so this
is here to stay!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231422 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-05 23:18:41 +00:00
Paul Robinson
a0c307d623 All FileCheck directives allow patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231418 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-05 23:04:26 +00:00
Peter Collingbourne
bdfd937473 Go bindings: use MDNode::replaceAllUsesWith instead of MDTuple::replaceAllUsesWith.
Fixes llgo following Duncan's changes to debug info in r231082. llgo needs
to replace composite types, which are no longer represented using MDTuple.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231416 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-05 22:55:38 +00:00
Philip Reames
292f5ef237 [RewriteStatepointsForGC] Yet more test cases for relocation
At this point, we should have decent coverage of the involved code.  I've got a few more test cases to cleanup and submit, but what's here is already reasonable.

I've got a collection of liveness tests which will be posted for review along with a decent liveness algorithm in the next few days.  Once those are in, the code in this file should be well tested and I can start renaming things without risk of serious breakage.  



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231414 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-05 22:28:06 +00:00
Quentin Colombet
40b4f60056 [CODE_OWNERS] Change the ownership of register allocators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231412 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-05 22:15:17 +00:00