7 years agoDiscourage in-source autoconf builds (as we already do for the cmake build)
Jonathan Roelofs [Fri, 27 Feb 2015 23:35:47 +0000 (23:35 +0000)]
Discourage in-source autoconf builds (as we already do for the cmake build)


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

7 years agoRegenerated test case from pr 230801 for change in LLVM IR syntax
Bill Schmidt [Fri, 27 Feb 2015 23:29:57 +0000 (23:29 +0000)]
Regenerated test case from pr 230801 for change in LLVM IR syntax

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

7 years agoUpdate SystemZ/Large test generators to handle new gep IR syntax
David Blaikie [Fri, 27 Feb 2015 23:29:39 +0000 (23:29 +0000)]
Update SystemZ/Large test generators to handle new gep IR syntax

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

7 years agoUpdate SystemZ/Large test generators to handle new load IR syntax
David Blaikie [Fri, 27 Feb 2015 23:29:33 +0000 (23:29 +0000)]
Update SystemZ/Large test generators to handle new load IR syntax

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

7 years ago[new docs] Performance Tips for Frontend Authors
Philip Reames [Fri, 27 Feb 2015 23:14:50 +0000 (23:14 +0000)]
[new docs] Performance Tips for Frontend Authors

As mentioned on llvm-dev, this is a new documentation page intended to collect tips for frontend authors on how to generate IR that LLVM is able to optimize well. These types of things come up repeated in review threads and it would be good to have a place to save them.

I added a small handful to start us off, but I mostly want to get the framework in place. Once the docs are here, we can add to them incrementally.  If you know of something appropriate for this page, please add it!

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

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

7 years agoMachineDominators: Move applySplitCriticalEdges into the cpp file.
Benjamin Kramer [Fri, 27 Feb 2015 23:13:13 +0000 (23:13 +0000)]
MachineDominators: Move applySplitCriticalEdges into the cpp file.

It's too big for inlining anyways. Also clean it up slightly. No functionality
change intended.

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

7 years agollvm-vtabledump: Update field with a better name
David Majnemer [Fri, 27 Feb 2015 22:35:25 +0000 (22:35 +0000)]
llvm-vtabledump: Update field with a better name

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

7 years agoRevert test case until it can be fixed
Bill Schmidt [Fri, 27 Feb 2015 22:31:14 +0000 (22:31 +0000)]
Revert test case until it can be fixed

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

7 years ago[PowerPC] Fix PR22711 - Misaligned .toc section
Bill Schmidt [Fri, 27 Feb 2015 22:14:10 +0000 (22:14 +0000)]
[PowerPC] Fix PR22711 - Misaligned .toc section

Straightforward patch to emit an alignment directive when emitting a
TOC entry.  The test case was generated from the test in PR22711 that
demonstrated a misaligned .toc section.  The object code is run
through llvm-readobj to verify that the correct alignment has been
applied to the .toc section.

Thanks to Ulrich Weigand for running down where the fix was needed.

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

7 years agoReduce double set lookups.
Benjamin Kramer [Fri, 27 Feb 2015 21:43:14 +0000 (21:43 +0000)]
Reduce double set lookups.

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

7 years ago[opaque pointer type] Add textual IR support for explicit type parameter to load...
David Blaikie [Fri, 27 Feb 2015 21:17:42 +0000 (21:17 +0000)]
[opaque pointer type] Add textual IR support for explicit type parameter to load instruction

Essentially the same as the GEP change in r230786.

A similar migration script can be used to update test cases, though a few more
test case improvements/changes were required this time around: (r229269-r229278)

import fileinput
import sys
import re

pat = re.compile(r"((?:=|:|^)\s*load (?:atomic )?(?:volatile )?(.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$)")

for line in sys.stdin:
  sys.stdout.write(re.sub(pat, r"\1, \2\3*\4", line))

Reviewers: rafael, dexonsmith, grosser

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

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

7 years agoTarget/X86: Never use the redzone for Win64 ABI functions.
Charles Davis [Fri, 27 Feb 2015 21:11:16 +0000 (21:11 +0000)]
Target/X86: Never use the redzone for Win64 ABI functions.

Until now, we did this (among other things) based on whether or not the
target was Windows. This is clearly wrong, not just for Win64 ABI functions
on non-Windows, but for System V ABI functions on Windows, too. In this
change, we make this decision based on the ABI the calling convention
specifies instead.

Reviewers: rnk

Subscribers: llvm-commits

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

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

7 years ago[PowerPC] Use vector types for memcpy and friends (sometimes)
Hal Finkel [Fri, 27 Feb 2015 19:58:28 +0000 (19:58 +0000)]
[PowerPC] Use vector types for memcpy and friends (sometimes)

When using Altivec, we can use vector loads and stores for aligned memcpy and
friends. Starting with the P7 and VXS, we have reasonable unaligned vector
stores. Starting with the P8, we have fast unaligned loads too.

For QPX, we use vector loads are stores, but only for aligned memory accesses.

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

7 years ago[opaque pointer type] Add textual IR support for explicit type parameter to getelemen...
David Blaikie [Fri, 27 Feb 2015 19:29:02 +0000 (19:29 +0000)]
[opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction

One of several parallel first steps to remove the target type of pointers,
replacing them with a single opaque pointer type.

This adds an explicit type parameter to the gep instruction so that when the
first parameter becomes an opaque pointer type, the type to gep through is
still available to the instructions.

* This doesn't modify gep operators, only instructions (operators will be
  handled separately)

* Textual IR changes only. Bitcode (including upgrade) and changing the
  in-memory representation will be in separate changes.

* geps of vectors are transformed as:
    getelementptr <4 x float*> %x, ...
  ->getelementptr float, <4 x float*> %x, ...
  Then, once the opaque pointer type is introduced, this will ultimately look
    getelementptr float, <4 x ptr> %x
  with the unambiguous interpretation that it is a vector of pointers to float.

* address spaces remain on the pointer, not the type:
    getelementptr float addrspace(1)* %x
  ->getelementptr float, float addrspace(1)* %x
  Then, eventually:
    getelementptr float, ptr addrspace(1) %x

Importantly, the massive amount of test case churn has been automated by
same crappy python code. I had to manually update a few test cases that
wouldn't fit the script's model (r228970,r229196,r229197,r229198). The
python script just massages stdin and writes the result to stdout, I
then wrapped that in a shell script to handle replacing files, then
using the usual find+xargs to migrate all the files.

import fileinput
import sys
import re

ibrep = re.compile(r"(^.*?[^%\w]getelementptr inbounds )(((?:<\d* x )?)(.*?)(| addrspace\(\d\)) *\*(|>)(?:$| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$))")
normrep = re.compile(       r"(^.*?[^%\w]getelementptr )(((?:<\d* x )?)(.*?)(| addrspace\(\d\)) *\*(|>)(?:$| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$))")

def conv(match, line):
  if not match:
    return line
  line = match.groups()[0]
  if len(match.groups()[5]) == 0:
    line += match.groups()[2]
  line += match.groups()[3]
  line += ", "
  line += match.groups()[1]
  line += "\n"
  return line

for line in sys.stdin:
  if line.find("getelementptr ") == line.find("getelementptr inbounds"):
    if line.find("getelementptr inbounds") != line.find("getelementptr inbounds ("):
      line = conv(re.match(ibrep, line), line)
  elif line.find("getelementptr ") != line.find("getelementptr ("):
    line = conv(re.match(normrep, line), line)

for name in "$@"
  python3 `dirname "$0"`/update.py < "$name" > "$name.tmp" && mv "$name.tmp" "$name"
  rm -f "$name.tmp"

The actual commands:
From llvm/src:
find test/ -name *.ll | xargs ./apply.sh
From llvm/src/tools/clang:
find test/ -name *.mm -o -name *.m -o -name *.cpp -o -name *.c | xargs -I '{}' ../../apply.sh "{}"
From llvm/src/tools/polly:
find test/ -name *.ll | xargs ./apply.sh

After that, check-all (with llvm, clang, clang-tools-extra, lld,
compiler-rt, and polly all checked out).

The extra 'rm' in the apply.sh script is due to a few files in clang's test
suite using interesting unicode stuff that my python script was throwing
exceptions on. None of those files needed to be migrated, so it seemed
sufficient to ignore those cases.

Reviewers: rafael, dexonsmith, grosser

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

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

7 years agoRefer users looking for the release notes to 3.6.
Benjamin Kramer [Fri, 27 Feb 2015 19:06:26 +0000 (19:06 +0000)]
Refer users looking for the release notes to 3.6.

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

7 years agoRemove the Forward Control Flow Integrity pass and its dependencies.
Eric Christopher [Fri, 27 Feb 2015 19:03:38 +0000 (19:03 +0000)]
Remove the Forward Control Flow Integrity pass and its dependencies.

This work is currently being rethought along different lines and
if this work is needed it can be resurrected out of svn. Remove it
for now as no current work in ongoing on it and it's unused. Verified
with the authors before removal.

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

7 years agoObject: Test for reading kext bundles
Justin Bogner [Fri, 27 Feb 2015 18:58:23 +0000 (18:58 +0000)]
Object: Test for reading kext bundles

In the review for r230567, it was pointed out we should really test
the lib/Object part of that change. This does so using llvm-readobj.

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

7 years agoDelete LLVM_DELETED_FUNCTION from coding standards
Reid Kleckner [Fri, 27 Feb 2015 18:34:16 +0000 (18:34 +0000)]
Delete LLVM_DELETED_FUNCTION from coding standards

It didn't seem worth leaving behind a guideline to use '= delete' to
make a class uncopyable. That's a well known C++ design pattern.

Reported on the mailing list and in PR22724.

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

7 years agoChange the fast-isel-abort option from bool to int to enable "levels"
Mehdi Amini [Fri, 27 Feb 2015 18:32:11 +0000 (18:32 +0000)]
Change the fast-isel-abort option from bool to int to enable "levels"

Currently fast-isel-abort will only abort for regular instructions,
and just warn for function calls, terminators, function arguments.
There is already fast-isel-abort-args but nothing for calls and

This change turns the fast-isel-abort options into an integer option,
so that multiple levels of strictness can be defined.
This will help no being surprised when the "abort" option indeed does
not abort, and enables the possibility to write test that verifies
that no intrinsics are forgotten by fast-isel.

Reviewers: resistor, echristo

Subscribers: jfb, llvm-commits

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

From: Mehdi Amini <mehdi.amini@apple.com>

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

7 years agoMinor follow-ups to r229720 suggested on llvmdev
Reid Kleckner [Fri, 27 Feb 2015 18:22:46 +0000 (18:22 +0000)]
Minor follow-ups to r229720 suggested on llvmdev

"svn" patch by Sedat Dilek plus trimming whitespace added in r229720.

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

7 years agoCentralize handling of the eh_begin and eh_end labels.
Rafael Espindola [Fri, 27 Feb 2015 18:18:39 +0000 (18:18 +0000)]
Centralize handling of the eh_begin and eh_end labels.

This removes a bit of duplicated code and more importantly, remembers the
labels so that they don't need to be looked up by name.

This in turn allows for any name to be used and avoids a crash if the name
we wanted was already taken.

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

7 years agoremove function names from comments; NFC
Sanjay Patel [Fri, 27 Feb 2015 18:07:41 +0000 (18:07 +0000)]
remove function names from comments; NFC

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

7 years agoSwitch a std::map to a DenseMap in CodeGenRegisters.
Owen Anderson [Fri, 27 Feb 2015 17:57:01 +0000 (17:57 +0000)]
Switch a std::map to a DenseMap in CodeGenRegisters.

The keys of the map are unique by pointer address, so there's no need
to use the llvm::less comparator. This allows us to use DenseMap
instead, which reduces tblgen time by 20% on my stress test.

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

7 years agoremove function names from comments; NFC
Sanjay Patel [Fri, 27 Feb 2015 17:27:15 +0000 (17:27 +0000)]
remove function names from comments; NFC

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

7 years agoEqually to NetBSD, Bitrig/ARM uses the Itanium-ABI.
Renato Golin [Fri, 27 Feb 2015 16:35:27 +0000 (16:35 +0000)]
Equally to NetBSD, Bitrig/ARM uses the Itanium-ABI.

Patch by Patrick Wildt.

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

7 years ago[mips][microMIPS] Change register class for GP register
Zoran Jovanovic [Fri, 27 Feb 2015 15:03:50 +0000 (15:03 +0000)]
[mips][microMIPS] Change register class for GP register
Differential Revision: http://reviews.llvm.org/D7934

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

7 years agoR600/SI: Add missing mubuf instructions
Tom Stellard [Fri, 27 Feb 2015 14:59:46 +0000 (14:59 +0000)]
R600/SI: Add missing mubuf instructions

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

7 years agoR600/SI: Consistently put soffset before the offset operand for mubuf instructions
Tom Stellard [Fri, 27 Feb 2015 14:59:44 +0000 (14:59 +0000)]
R600/SI: Consistently put soffset before the offset operand for mubuf instructions

This matches the assembly syntax.

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

7 years agoR600/SI: Add slc, glc, and tfe to non-atomic _ADDR64 instructions
Tom Stellard [Fri, 27 Feb 2015 14:59:41 +0000 (14:59 +0000)]
R600/SI: Add slc, glc, and tfe to non-atomic _ADDR64 instructions

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

7 years agoPass correct -mtriple for krait-cpu-div-attribute.ll
Petar Jovanovic [Fri, 27 Feb 2015 14:46:41 +0000 (14:46 +0000)]
Pass correct -mtriple for krait-cpu-div-attribute.ll

Not passing mtriple for one of the tests caused a regression failure
on MIPS buildbot. The issue was introduced by r230651.

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

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

7 years ago[x86] Run most of the rest of the shuffle combining over non-128-bit
Chandler Carruth [Fri, 27 Feb 2015 12:13:14 +0000 (12:13 +0000)]
[x86] Run most of the rest of the shuffle combining over non-128-bit
vectors. This lets us fix the rest of the v16 lowering problems when
pshufb is clearly better.

We might still be able to improve some of the lowerings by enabling the
other combine-based rewriting to fire for non-128-bit vectors, but this
at least should remove any regressions from using the fancy v16i16
lowering strategy.

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

7 years ago[x86] Teach a bunch of the x86-specific shuffle combining to work with
Chandler Carruth [Fri, 27 Feb 2015 11:45:13 +0000 (11:45 +0000)]
[x86] Teach a bunch of the x86-specific shuffle combining to work with
256-bit vectors as well as 128-bit vectors. Fixes some of the redundant
shuffles for v16i16.

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

7 years ago[x86] Make the v8i16 clever single-input shuffle lowering usable for
Chandler Carruth [Fri, 27 Feb 2015 11:33:46 +0000 (11:33 +0000)]
[x86] Make the v8i16 clever single-input shuffle lowering usable for
repeated 128-bit lane shuffles of wider vector types and use it to lower
256-bit v16i16 vector shuffles where applicable.

This should let us perfectly lowering the pattern of pshuflw and pshufhw
even for AVX2 256-bit patterns.

I've not added AVX-512 support, but it should be trivial for someone
working on that to wire up.

Note that currently this generates bad, long shuffle chains because we
don't combine 256-bit target shuffles. The subsequent patches will fix

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

7 years ago[x86] Add a bunch more tests for v16i16 shuffles. All of these are taken
Chandler Carruth [Fri, 27 Feb 2015 11:25:10 +0000 (11:25 +0000)]
[x86] Add a bunch more tests for v16i16 shuffles. All of these are taken
by mirroring v8i16 test cases across both 128-bit lanes. This should
highlight problems where we aren't correctly using 128-bit shuffles to
implement things.

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

7 years ago[mips] Remove redundant periods from -mattr=help descriptions for MIPS.
Toma Tabacu [Fri, 27 Feb 2015 10:44:02 +0000 (10:44 +0000)]
[mips] Remove redundant periods from -mattr=help descriptions for MIPS.

Summary: Also fixes an infringement of the 80-column limit rule.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

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

7 years ago[llvm-pdbdump] Fix member initialization order warnings.
Zachary Turner [Fri, 27 Feb 2015 09:53:55 +0000 (09:53 +0000)]
[llvm-pdbdump] Fix member initialization order warnings.

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

7 years ago[llvm-pdbdump] Colorize output.
Zachary Turner [Fri, 27 Feb 2015 09:15:59 +0000 (09:15 +0000)]
[llvm-pdbdump] Colorize output.

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

7 years ago[llvm-pdbdump] Fix warnings found by clang-cl self host.
Zachary Turner [Fri, 27 Feb 2015 09:15:31 +0000 (09:15 +0000)]
[llvm-pdbdump] Fix warnings found by clang-cl self host.

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

7 years ago[llvm-pdbdump] Add support for dumping global variables.
Zachary Turner [Fri, 27 Feb 2015 09:15:18 +0000 (09:15 +0000)]
[llvm-pdbdump] Add support for dumping global variables.

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

7 years ago[x86] Make the single-input v8i16 lowering directly recurse rather than
Chandler Carruth [Fri, 27 Feb 2015 09:11:38 +0000 (09:11 +0000)]
[x86] Make the single-input v8i16 lowering directly recurse rather than
going back through the entire vector shuffle lowering.

This is an important step to being able to re-use this logic.

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

7 years ago[mips] Account for constant-zero operands in ADDE nodes.
Vasileios Kalintiris [Fri, 27 Feb 2015 09:01:39 +0000 (09:01 +0000)]
[mips] Account for constant-zero operands in ADDE nodes.

We identify the cases where the operand to an ADDE node is a constant
zero. In such cases, we can avoid generating an extra ADDu instruction
disguised as an identity move alias (ie. addu $r, $r, 0 --> move $r, $r).

Reviewers: dsanders

Subscribers: llvm-commits

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

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

7 years ago[asan] Skip promotable allocas to improve performance at -O0
Anna Zaks [Fri, 27 Feb 2015 03:12:36 +0000 (03:12 +0000)]
[asan] Skip promotable allocas to improve performance at -O0

Currently, the ASan executables built with -O0 are unnecessarily slow.
The main reason is that ASan instrumentation pass inserts redundant
checks around promotable allocas. These allocas do not get instrumented
under -O1 because they get converted to virtual registered by mem2reg.
With this patch, ASan instrumentation pass will only instrument non
promotable allocas, giving us a speedup of 39% on a collection of
benchmarks with -O0. (There is no measurable speedup at -O1.)

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

7 years agoDon't modify the DenseMap being iterated over from within the loop
Sanjoy Das [Fri, 27 Feb 2015 02:24:16 +0000 (02:24 +0000)]
Don't modify the DenseMap being iterated over from within the loop
that is iterating over it

Inserting elements into a `DenseMap` invalidated iterators pointing
into the `DenseMap` instance.

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

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

7 years agoFix a use-iterator-after-invalidate error
Sanjoy Das [Fri, 27 Feb 2015 02:19:11 +0000 (02:19 +0000)]
Fix a use-iterator-after-invalidate error

AnalysisResult::getResultImpl reuses an iterator into a DenseMap after
inserting elements into it. This change adds code to recompute the
iterator before the second use.

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

7 years agoTarget/X86: Save Win64 non-volatile registers in a Win64 ABI function.
Charles Davis [Fri, 27 Feb 2015 00:57:01 +0000 (00:57 +0000)]
Target/X86: Save Win64 non-volatile registers in a Win64 ABI function.

This change causes us to actually save non-volatile registers in a Win64
ABI function that calls a System V ABI function, and vice-versa.

Reviewers: rnk

Subscribers: llvm-commits

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

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

7 years agollvm-vtabledump: Dump catch/throw exception structures for MS ABI
David Majnemer [Fri, 27 Feb 2015 00:43:58 +0000 (00:43 +0000)]
llvm-vtabledump: Dump catch/throw exception structures for MS ABI

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

7 years agoRewrite MachineOperand::print and MachineInstr::print to avoid
Eric Christopher [Fri, 27 Feb 2015 00:11:34 +0000 (00:11 +0000)]
Rewrite MachineOperand::print and MachineInstr::print to avoid
uses of TM->getSubtargetImpl and propagate to all calls.

This could be a debugging regression in places where we had a
TargetMachine and/or MachineFunction but don't have it as part
of the MachineInstr. Fixing this would require passing a
MachineFunction/Function down through the print operator, but
none of the existing uses in tree seem to do this.

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

7 years agoPut jump tables in distinct sections if -ffunction-sections is used.
Rafael Espindola [Thu, 26 Feb 2015 23:55:11 +0000 (23:55 +0000)]
Put jump tables in distinct sections if -ffunction-sections is used.

A small regression in r230411 was that we were basing the decision on

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

7 years ago[Orc][Kaleidoscope] More tutorial cleanup, a little extra debugging output.
Lang Hames [Thu, 26 Feb 2015 23:52:42 +0000 (23:52 +0000)]
[Orc][Kaleidoscope] More tutorial cleanup, a little extra debugging output.

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

7 years ago[llvm-pdbdump] Add missing files.
Zachary Turner [Thu, 26 Feb 2015 23:51:49 +0000 (23:51 +0000)]
[llvm-pdbdump] Add missing files.

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

7 years ago[llvm-pdbdump] Fix dumping of function pointers and basic types.
Zachary Turner [Thu, 26 Feb 2015 23:49:23 +0000 (23:49 +0000)]
[llvm-pdbdump] Fix dumping of function pointers and basic types.

Function pointers were not correctly handled by the dumper, and
they would print as "* name".  They now print as
"int (__cdecl *name)(int arg1, int arg2)" as they should.

Also, doubles were being printed as floats.  This fixes that bug
as well, and adds tests for all builtin types. as well as a test
for function pointers.

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

7 years agoRemove commented out function.
Eric Christopher [Thu, 26 Feb 2015 23:36:28 +0000 (23:36 +0000)]
Remove commented out function.

(Saving files works, who knew?)

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

7 years agoRemove DebugLoc::print(LLVMContext, raw_ostream), it was just
Eric Christopher [Thu, 26 Feb 2015 23:32:17 +0000 (23:32 +0000)]
Remove DebugLoc::print(LLVMContext, raw_ostream), it was just
forwarding to the one that didn't take a context.

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

7 years agogetRegForInlineAsmConstraint wants to use TargetRegisterInfo for
Eric Christopher [Thu, 26 Feb 2015 22:38:43 +0000 (22:38 +0000)]
getRegForInlineAsmConstraint wants to use TargetRegisterInfo for
a lookup, pass that in rather than use a naked call to getSubtargetImpl.
This involved passing down and around either a TargetMachine or
TargetRegisterInfo. Update all callers/definitions around the targets
and SelectionDAG.

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

7 years agoAdd a TargetMachine argument to the AddressingModeMatcher, we'll
Eric Christopher [Thu, 26 Feb 2015 22:38:34 +0000 (22:38 +0000)]
Add a TargetMachine argument to the AddressingModeMatcher, we'll
need this shortly to get a TargetRegisterInfo from the subtarget
for TargetLowering routines.

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

7 years ago[x86] Fix PR22706 where we would incorrectly try lower a v32i8 dynamic
Chandler Carruth [Thu, 26 Feb 2015 22:15:34 +0000 (22:15 +0000)]
[x86] Fix PR22706 where we would incorrectly try lower a v32i8 dynamic
blend as legal.

We made the same mistake in two different places. Whenever we are custom
lowering a v32i8 blend we need to check whether we are custom lowering
it only for constant conditions that can be shuffled, or whether we
actually have AVX2 and full dynamic blending support on bytes. Both are
fixed, with comments added to make it clear what is going on and a new
test case.

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

7 years agoSimplify arange output.
Rafael Espindola [Thu, 26 Feb 2015 22:02:02 +0000 (22:02 +0000)]
Simplify arange output.

Move SectionMap to its only user (emitDebugARanges) and
reorder to save a call to sort.

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

7 years agoRe-instate the pragma optimize hack for MSVC, but not clang-cl
Reid Kleckner [Thu, 26 Feb 2015 21:34:11 +0000 (21:34 +0000)]
Re-instate the pragma optimize hack for MSVC, but not clang-cl

Reverts commit r230686 with define modifications.

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

7 years ago[x86] Restructure the comments and the conditions for handling
Chandler Carruth [Thu, 26 Feb 2015 21:29:06 +0000 (21:29 +0000)]
[x86] Restructure the comments and the conditions for handling
dynamic blends.

This makes it much more clear what is going on. The case we're handling
is that of dynamic conditions, and we're bailing when the nature of the
vector types and subtarget preclude lowering the dynamic condition
vselect as an actual blend.

No functionality changed here, but this will make a subsequent bug-fix
to this code much more clear.

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

7 years ago[x86] Re-order the combines of select in the X86 backend. This doesn't
Chandler Carruth [Thu, 26 Feb 2015 21:21:36 +0000 (21:21 +0000)]
[x86] Re-order the combines of select in the X86 backend. This doesn't
change functionality, but makes it more clear that the dynamic case and
the shuffle case don't overlap in any interesting way.

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

7 years ago[x86] Add an assert to catch if we ever try to blend a v32i8 without
Chandler Carruth [Thu, 26 Feb 2015 21:18:20 +0000 (21:18 +0000)]
[x86] Add an assert to catch if we ever try to blend a v32i8 without

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

7 years agoRemove stale pragma hack for an unsupported MSVC version
Reid Kleckner [Thu, 26 Feb 2015 21:08:27 +0000 (21:08 +0000)]
Remove stale pragma hack for an unsupported MSVC version

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

7 years agoSilence some Win64 clang-cl warnings about unused stuff due to ifdefs
Reid Kleckner [Thu, 26 Feb 2015 21:08:21 +0000 (21:08 +0000)]
Silence some Win64 clang-cl warnings about unused stuff due to ifdefs

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

7 years agoUse wider type for overflow check on LLP64 platforms like Win64, found by clang-cl...
Reid Kleckner [Thu, 26 Feb 2015 21:07:30 +0000 (21:07 +0000)]
Use wider type for overflow check on LLP64 platforms like Win64, found by clang-cl -Wtautological

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

7 years agoIRCE: add a test case for r230619.
Sanjoy Das [Thu, 26 Feb 2015 20:14:32 +0000 (20:14 +0000)]
IRCE: add a test case for r230619.

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

7 years agoInstrProf: Simplify the construction of BinaryCoverageReader
Justin Bogner [Thu, 26 Feb 2015 20:06:28 +0000 (20:06 +0000)]
InstrProf: Simplify the construction of BinaryCoverageReader

Creating BinaryCoverageReader is a strange and complicated dance where
the constructor sets error codes that member functions will later
read, and the object is in an invalid state if readHeader isn't
immediately called after construction.

Instead, make the constructor private and add a static create method
to do the construction properly. This also has the benefit of removing
readHeader completely and simplifying the interface of the object.

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

7 years agoInstrProf: Rename ObjectFileCoverageMappingReader to BinaryCoverageReader
Justin Bogner [Thu, 26 Feb 2015 20:06:24 +0000 (20:06 +0000)]
InstrProf: Rename ObjectFileCoverageMappingReader to BinaryCoverageReader

The current name is long and confusing. A shorter one is both easier
to understand and easier to work with.

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

7 years agoSCEVExpander incorrectly marks generated subtractions as nuw/nsw
Sanjoy Das [Thu, 26 Feb 2015 19:51:35 +0000 (19:51 +0000)]
SCEVExpander incorrectly marks generated subtractions as nuw/nsw

It is not sound to mark the increment operation as `nuw` or `nsw`
based on a proof off of the add recurrence if the increment operation
we emit happens to be a `sub` instruction.

I could not come up with a test case for this -- the cases where
SCEVExpander decides to emit a `sub` instruction is quite small, and I
cannot think of a way I'd be able to get SCEV to prove that the
increment does not overflow in those cases.

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

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

7 years agoTry to fix a docs link.
Nico Weber [Thu, 26 Feb 2015 19:48:43 +0000 (19:48 +0000)]
Try to fix a docs link.

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

7 years ago[MC] Use the non-EH register mapping in the debug_frame section.
Frederic Riss [Thu, 26 Feb 2015 19:48:07 +0000 (19:48 +0000)]
[MC] Use the non-EH register mapping in the debug_frame section.

On 32bits x86 Darwin, the register mappings for the eh_frane and
debug_frame sections are different. Thus the same CFI instructions
should result in different registers in the object file. The
problem isn't target specific though, but it requires that the
mappings for EH register numbers be different from the standard
Dwarf one.

The patch looks a bit clumsy. LLVM uses the EH mapping as
canonical for everything frame related. Thus we need to do a
double conversion EH -> LLVM -> Non-EH, when emitting the
debug_frame section.

Fixes PR22363.

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

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

7 years agoSupport bitrig in autoconf build system.
Eric Christopher [Thu, 26 Feb 2015 19:46:32 +0000 (19:46 +0000)]
Support bitrig in autoconf build system.

Patch by Dave Huseby.

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

7 years agoDon't sibcall between SysV and Win64 convention functions
Reid Kleckner [Thu, 26 Feb 2015 19:43:20 +0000 (19:43 +0000)]
Don't sibcall between SysV and Win64 convention functions

The shadow stack space expectations won't match.

Fixes PR22709.

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

7 years ago[Orc][Kaleidoscope] Fix a missed symbol mangling operation in the fully lazy tutorial.
Lang Hames [Thu, 26 Feb 2015 19:28:37 +0000 (19:28 +0000)]
[Orc][Kaleidoscope] Fix a missed symbol mangling operation in the fully lazy tutorial.

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

7 years ago[InstCombine/PowerPC] Convert aligned QPX load/store intrinsics into loads/stores
Hal Finkel [Thu, 26 Feb 2015 18:56:03 +0000 (18:56 +0000)]
[InstCombine/PowerPC] Convert aligned QPX load/store intrinsics into loads/stores

InstCombine has long had logic to convert aligned Altivec load/store intrinsics
into regular loads and stores. This mirrors that functionality for QPX vector
load/store intrinsics.

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

7 years agoWhen the source has a series of assignments, users reasonably want to
Paul Robinson [Thu, 26 Feb 2015 18:47:57 +0000 (18:47 +0000)]
When the source has a series of assignments, users reasonably want to
have the debugger step through each one individually. Turn off the
combine for adjacent stores at -O0 so we get this behavior.

Possibly, DAGCombine shouldn't run at all at -O0, but that's for
another day; see PR22346.

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

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

7 years ago[Orc][Kaleidoscope] More diff-reduction between tutorial versions.
Lang Hames [Thu, 26 Feb 2015 18:36:34 +0000 (18:36 +0000)]
[Orc][Kaleidoscope] More diff-reduction between tutorial versions.

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

7 years agoFix justify error for small structures in varargs for MIPS64BE
Petar Jovanovic [Thu, 26 Feb 2015 18:35:15 +0000 (18:35 +0000)]
Fix justify error for small structures in varargs for MIPS64BE

There was a problem when passing structures as variable arguments.
The structures smaller than 64 bit were not left justified on MIPS64
big endian. This is now fixed by shifting the value to make it left-
justified when appropriate.

This fixes the bug http://llvm.org/bugs/show_bug.cgi?id=21608

Patch by Aleksandar Beserminji.

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

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

7 years agogold-plugin: "Upgrade" debug info and handle its warnings.
Rafael Espindola [Thu, 26 Feb 2015 18:24:37 +0000 (18:24 +0000)]
gold-plugin: "Upgrade" debug info and handle its warnings.

The gold plugin never calls MaterializeModule, so any old debug info
was not deleted and could cause crashes.

Now that it is being "upgraded", the plugin also has to handle warnings
and create Modules with a nice id (it shows in the warning).

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

7 years agoUse ".arch_extension" ARM directive to support hwdiv on krait
Sumanth Gundapaneni [Thu, 26 Feb 2015 18:08:41 +0000 (18:08 +0000)]
Use ".arch_extension" ARM directive to support hwdiv on krait

In case of "krait" CPU, asm printer doesn't emit any ".cpu" so the
features bits are not computed. This patch lets the asm printer
emit ".cpu cortex-a9" directive for krait and the hwdiv feature is
enabled through ".arch_extension". In short, krait is treated
as "cortex-a9" with hwdiv. We can not emit ".krait" as CPU since
it is not supported bu GNU GAS yet

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

7 years agoUse ".arch_extension" ARM directive to specify the additional CPU features
Sumanth Gundapaneni [Thu, 26 Feb 2015 18:07:35 +0000 (18:07 +0000)]
Use ".arch_extension" ARM directive to specify the additional CPU features

This patch is in response to r223147 where the avaiable features are
computed based on ".cpu" directive. This will work clean for the standard
variants like cortex-a9. For custom variants which rely on standard cpu names
for assembly, the additional features of a CPU should be propagated. This can be
done via ".arch_extension" as long as the assembler supports it. The
implementation for krait along with unit test will be submitted in next patch.

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

7 years ago[LV/LoopAccesses] Backward dependences are not safe just because the
Adam Nemet [Thu, 26 Feb 2015 17:58:48 +0000 (17:58 +0000)]
[LV/LoopAccesses] Backward dependences are not safe just because the
accesses are via different types

Noticed this while generalizing the code for loop distribution.

I confirmed with Arnold that this was indeed a bug and managed to create
a testcase.

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

7 years agoR600/SI: Remove M0 from DS assembly strings
Tom Stellard [Thu, 26 Feb 2015 17:08:43 +0000 (17:08 +0000)]
R600/SI: Remove M0 from DS assembly strings

This matches the assembly syntax for the proprietary compiler.

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

7 years ago[X86][MMX] Fix a typo in a couple of tests
Bruno Cardoso Lopes [Thu, 26 Feb 2015 15:16:09 +0000 (15:16 +0000)]
[X86][MMX] Fix a typo in a couple of tests

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

7 years ago[X86][MMX] Remove widening experimental flag from MMX tests.
Bruno Cardoso Lopes [Thu, 26 Feb 2015 15:10:38 +0000 (15:10 +0000)]
[X86][MMX] Remove widening experimental flag from MMX tests.

Turns out that after the past MMX commits, we don't need to rely on this
flag to get better codegen for MMX. Also update the tests to become
triple neutral.

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

7 years ago[X86][Haswell][SchedModel] Fix WriteMULm latency.
Michael Kuperstein [Thu, 26 Feb 2015 14:30:09 +0000 (14:30 +0000)]
[X86][Haswell][SchedModel] Fix WriteMULm latency.

The latency for the WriteMULm class was set to 4, which is actually lower than the latency for WriteMULr (5).
A better estimate would be 4 added to WriteMULr, that is, 9.

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

7 years ago[InstCombine] Add a test for altivec load/store intrinsic simplification
Hal Finkel [Thu, 26 Feb 2015 14:22:41 +0000 (14:22 +0000)]
[InstCombine] Add a test for altivec load/store intrinsic simplification

InstCombine has logic to convert aligned Altivec load/store intrinsics into
regular loads and stores. Unfortunately, there seems to be no regression test
covering this behavior. Adding one...

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

7 years agoReplace obsolete -mattr=n64 command line option with -target-abi=n64. No functional...
Vladimir Medic [Thu, 26 Feb 2015 12:29:48 +0000 (12:29 +0000)]
Replace obsolete -mattr=n64 command line option with -target-abi=n64. No functional changes.

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

7 years ago[x86] Sink the single-input v8i16 lowering code that is actually
Chandler Carruth [Thu, 26 Feb 2015 11:00:40 +0000 (11:00 +0000)]
[x86] Sink the single-input v8i16 lowering code that is actually
formulaic into the top v8i16 lowering routine.

This makes the generalized lowering a completely general and single path
lowering which will allow generalizing it in turn for multiple 128-bit

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

7 years ago[x86] Remove a SimpleTy usage. No need for it here, we already have the
Chandler Carruth [Thu, 26 Feb 2015 10:37:01 +0000 (10:37 +0000)]
[x86] Remove a SimpleTy usage. No need for it here, we already have the

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

7 years agoIRCE: only touch loops that have been shown to have a high
Sanjoy Das [Thu, 26 Feb 2015 08:56:04 +0000 (08:56 +0000)]
IRCE: only touch loops that have been shown to have a high
backedge-taken count in profiliing data.

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

7 years agoIRCE: generalize to handle loops with decreasing induction variables.
Sanjoy Das [Thu, 26 Feb 2015 08:19:31 +0000 (08:19 +0000)]
IRCE: generalize to handle loops with decreasing induction variables.

IRCE can now split the iteration space for loops like:

   for (i = n; i >= 0; i--)
     a[i + k] = 42; // bounds check on access

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

7 years ago[x86] Make the vector shuffle helpers order the SDLoc and MVT arguments.
Chandler Carruth [Thu, 26 Feb 2015 08:19:24 +0000 (08:19 +0000)]
[x86] Make the vector shuffle helpers order the SDLoc and MVT arguments.
This ordering matches that of DAG.getNode.

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

7 years agoIR: Use '= default' instead of r230609, NFC
Duncan P. N. Exon Smith [Thu, 26 Feb 2015 05:00:42 +0000 (05:00 +0000)]
IR: Use '= default' instead of r230609, NFC

Apparently we can use this now!

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

7 years agoFileCheck: Add CHECK-SAME
Duncan P. N. Exon Smith [Thu, 26 Feb 2015 04:53:00 +0000 (04:53 +0000)]
FileCheck: Add CHECK-SAME

Add `CHECK-SAME`, which requires that the pattern matches on the *same*
line as the previous `CHECK`/`CHECK-NEXT` -- in other words, no newline
is allowed in the skipped region.  This is similar to `CHECK-NEXT`,
which requires exactly 1 newline in the skipped region.

My motivation is to simplify checking the long lines of LLVM assembly
for the new debug info hierarchy.  This allows CHECK sequences like the

    CHECK:      ![[REF]] = !SomeMDNode(
    CHECK-SAME: file: ![[FILE:[0-9]+]]
    CHECK-SAME: otherField: 93{{[,)]}}

which is equivalent to:

    CHECK: ![[REF]] = !SomeMDNode({{.*}}file: ![[FILE:[0-9]+]]{{.*}}otherField: 93{{[,)]}}

While this example just has two fields, many nodes in debug info have
more than that.  `CHECK-SAME` will keep the logic easy to follow.

Morever, it enables interleaving `CHECK-NOT`s without allowing newlines.
Consider the following:

    CHECK:      ![[REF]] = !SomeMDNode(
    CHECK-SAME: file: ![[FILE:[0-9]+]]
    CHECK-NOT:  unexpectedField:
    CHECK-SAME: otherField: 93{{[,)]}}
    CHECK-NOT:  otherUnexpectedField:

which doesn't seem to have an equivalent `CHECK` line.

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

7 years agoIR: Add default constructor for DIImportedEntity
Duncan P. N. Exon Smith [Thu, 26 Feb 2015 04:41:10 +0000 (04:41 +0000)]
IR: Add default constructor for DIImportedEntity

Add a default constructor for `DIImportedEntity`, to be used in clang in
a follow-up.

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

7 years ago[LoopAccesses] Add command-line option for RuntimeMemoryCheckThreshold
Adam Nemet [Thu, 26 Feb 2015 04:39:09 +0000 (04:39 +0000)]
[LoopAccesses] Add command-line option for RuntimeMemoryCheckThreshold

Also remove the somewhat misleading initializers from
VectorizationFactor and VectorizationInterleave.  They will get
initialized with the default ctor since no cl::init is provided.

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

7 years agoIRCE: print newline after printing an InductiveRangeCheck.
Sanjoy Das [Thu, 26 Feb 2015 04:03:31 +0000 (04:03 +0000)]
IRCE: print newline after printing an InductiveRangeCheck.

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

7 years ago[GC docs] Add example IR, assembly, and stackmaps to Statepoint documentation
Philip Reames [Thu, 26 Feb 2015 01:18:21 +0000 (01:18 +0000)]
[GC docs] Add example IR, assembly, and stackmaps to Statepoint documentation

When I originally committed the statepoint docs, I left placeholders for example IR fragments.  I'm finally getting around to filling those in.

I also added IR fragments to illustrate the usage of the PlaceSafepoints pass while I was at it.

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

7 years agoReplace a few instances of NULL with nullptr.
David Majnemer [Thu, 26 Feb 2015 01:10:49 +0000 (01:10 +0000)]
Replace a few instances of NULL with nullptr.

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

7 years agoPass /nologo to ml64 for quieter builds
Reid Kleckner [Thu, 26 Feb 2015 00:51:33 +0000 (00:51 +0000)]
Pass /nologo to ml64 for quieter builds

It still prints "Assembling path/to/X86CompilationCallback_Win64.asm",
but linking does the same thing.

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