Kai Nacke [Thu, 14 Nov 2013 05:57:40 +0000 (05:57 +0000)]
Add external project LDC to release notes.
LDC, the LLVM-based D compiler, is already using LLVM 3.4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194665
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 14 Nov 2013 04:05:28 +0000 (04:05 +0000)]
R600/SIFixSGPRCopies.cpp: Fix \param to \return. [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194662
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 14 Nov 2013 04:05:22 +0000 (04:05 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194661
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Qin [Thu, 14 Nov 2013 03:27:58 +0000 (03:27 +0000)]
[AArch64 neon] support poly64 and relevant intrinsic functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194659
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Kledzik [Thu, 14 Nov 2013 03:03:05 +0000 (03:03 +0000)]
remove extra semicolon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194658
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Qin [Thu, 14 Nov 2013 02:44:13 +0000 (02:44 +0000)]
Implement aarch64 neon instruction class SIMD misc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194656
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Kledzik [Thu, 14 Nov 2013 02:38:07 +0000 (02:38 +0000)]
Add dyn_cast<> support to YAML I/O's IO class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194655
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 14 Nov 2013 02:27:46 +0000 (02:27 +0000)]
Added BlockFrequencyInfo::view for displaying the block frequency propagation graph via graphviz.
This is useful for debugging issues in the BlockFrequency implementation since
one can easily visualize where probability mass and other errors occur in the
propagation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194654
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 14 Nov 2013 02:05:41 +0000 (02:05 +0000)]
Suppress llvm-cov.test on Win32, with REQUIRES: shell
"cd" is unsupported in lit internal runner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194652
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 14 Nov 2013 02:03:02 +0000 (02:03 +0000)]
Update emacs llvm mode.
It seems this hasn't been done in a while.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194650
91177308-0d34-0410-b5e6-
96231b3b80d8
Jiangning Liu [Thu, 14 Nov 2013 01:57:32 +0000 (01:57 +0000)]
Implement AArch64 NEON instruction set AdvSIMD (table).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194648
91177308-0d34-0410-b5e6-
96231b3b80d8
Yunzhong Gao [Thu, 14 Nov 2013 01:10:52 +0000 (01:10 +0000)]
Fixing a heisenbug where the memory dependence analysis behaves differently
with and without -g.
Adding a test case to make sure that the threshold used in the memory
dependence analysis is respected. The test case also checks that debug
intrinsics are not counted towards this threshold.
Differential Revision: http://llvm-reviews.chandlerc.com/D2141
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194646
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Kledzik [Thu, 14 Nov 2013 00:59:59 +0000 (00:59 +0000)]
Add simple support for tags in YAML I/O
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194644
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Thu, 14 Nov 2013 00:38:41 +0000 (00:38 +0000)]
llvm-cov: Slightly improved error checking.
- readInt() should check all 4 bytes can be read, not just 1.
- In the event of false data in the gcno file, it was possible to index
into a non-existent index of SmallVector, causing assertion error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194639
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Thu, 14 Nov 2013 00:32:00 +0000 (00:32 +0000)]
llvm-cov: Removed StringMap holding GCOVLines.
According to the hazy gcov documentation, it appeared to be technically
possible for lines within a block to belong to different source files.
However, upon further investigation, gcov does not actually support
multiple source files for a single block.
This change removes a level of separation between blocks and lines by
replacing the StringMap of GCOVLines with a SmallVector of ints
representing line numbers. This also means that the GCOVLines class is
no longer needed.
This paves the way for supporting the "-a" option, which will output
block information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194637
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Thu, 14 Nov 2013 00:07:15 +0000 (00:07 +0000)]
llvm-cov: Replaced asserts with proper error handling.
Unified the interface for read functions. They all return a boolean
indicating if the read from file succeeded. Functions that previously
returned the read value now store it into a variable that is passed in
by reference instead. Callers will need to check the return value to
detect if an error occurred.
Also added a new test which ensures that no assertions occur when file
contains invalid data. llvm-cov should return with error code 1 upon
failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194635
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 14 Nov 2013 00:05:07 +0000 (00:05 +0000)]
Fixed 80+ violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194634
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 13 Nov 2013 23:58:51 +0000 (23:58 +0000)]
R600: Fix uninitialized variable usage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194632
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Wed, 13 Nov 2013 23:52:18 +0000 (23:52 +0000)]
Take care of long short branch immediate instructions for mips16 in
constant islands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194630
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 13 Nov 2013 23:36:50 +0000 (23:36 +0000)]
R600/SI: Add support for private address space load/store
Private address space is emulated using the register file with
MOVRELS and MOVRELD instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194626
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 13 Nov 2013 23:36:37 +0000 (23:36 +0000)]
R600/SI: Prefer SALU instructions for bit shift operations
All shift operations will be selected as SALU instructions and then
if necessary lowered to VALU instructions in the SIFixSGPRCopies pass.
This allows us to do more operations on the SALU which will improve
performance and is also required for implementing private memory
using indirect addressing, since the private memory pointers must stay
in the scalar registers.
This patch includes some fixes from Matt Arsenault.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194625
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Wed, 13 Nov 2013 23:33:17 +0000 (23:33 +0000)]
llvm-cov: Changed XFAIL targets to be more generic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194622
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Wed, 13 Nov 2013 22:50:15 +0000 (22:50 +0000)]
Added basic unit test for llvm-cov.
This test compares the output of llvm-cov against a coverage file
generated by gcov. Currently, llvm-cov does not work on certain
platforms (namely big-endian architectures such as PowerPC, among
others). These platforms are marked as XFAIL for now, but will be fixed
later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194616
91177308-0d34-0410-b5e6-
96231b3b80d8
Sebastian Pop [Wed, 13 Nov 2013 22:37:58 +0000 (22:37 +0000)]
add more comments around the delinearization of arrays
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194612
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 13 Nov 2013 21:55:41 +0000 (21:55 +0000)]
Path: Add tests for existing file magics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194607
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 13 Nov 2013 20:31:21 +0000 (20:31 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194605
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 13 Nov 2013 20:29:10 +0000 (20:29 +0000)]
Revert my CMake patches concerning building with /MT (r194589, r194596)
Reid pointed out we already have LLVM_USE_CRT_{buildtype} to set it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194604
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Wed, 13 Nov 2013 20:18:38 +0000 (20:18 +0000)]
Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194602
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Wed, 13 Nov 2013 20:09:11 +0000 (20:09 +0000)]
Use StringRef instead of std::string
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194601
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 13 Nov 2013 20:05:37 +0000 (20:05 +0000)]
[AArch64] Add support for legacy AArch32 NEON scalar shift by immediate
instructions. This patch does not include the shift right and accumulate
instructions. A number of non-overloaded intrinsics have been remove in favor
of their overloaded counterparts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194598
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 13 Nov 2013 19:12:02 +0000 (19:12 +0000)]
CMake: make building with /MT an option instead of always forcing it
for release builds.
This is a follow-up to r194589. Aaron pointed out that building
libraries with /MT and using them in an application that uses a
different run-time library can be a bad idea.
Move the option to build with /MT behind a CMake option so it can be
turned on selectively, such as when building the toolchain installer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194596
91177308-0d34-0410-b5e6-
96231b3b80d8
Weiming Zhao [Wed, 13 Nov 2013 18:29:49 +0000 (18:29 +0000)]
Enable generating legacy IT block for AArch32
By default, the behavior of IT block generation will be determinated
dynamically base on the arch (armv8 vs armv7). This patch adds backend
options: -arm-restrict-it and -arm-no-restrict-it. The former one
restricts the generation of IT blocks (the same behavior as thumbv8) for
both arches. The later one allows the generation of legacy IT block (the
same behavior as ARMv7 Thumb2) for both arches.
Clang will support -mrestrict-it and -mno-restrict-it, which is
compatible with GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194592
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 13 Nov 2013 18:16:23 +0000 (18:16 +0000)]
cmake: link release builds statically against run-time library on windows (use /MT instead of /MD)
This should fix the problem of snapshot builds created with MSVC 2012 not
working for users with MSVC 2010, etc.
Differential Revision: http://llvm-reviews.chandlerc.com/D2157
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194589
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 13 Nov 2013 18:07:27 +0000 (18:07 +0000)]
DIEHash: Move header include to be first in the implementation file to flush out header inclusion ordering issues
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194588
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Wed, 13 Nov 2013 16:57:53 +0000 (16:57 +0000)]
[SystemZ] Add the general form of BCR
At the moment this is just the MC support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194585
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 13 Nov 2013 15:35:17 +0000 (15:35 +0000)]
Move Delinearization pass into an anonymous namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194582
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 13 Nov 2013 15:35:13 +0000 (15:35 +0000)]
Make sure LLVMLoadLibraryPermanently gets an extern "C" symbol.
Otherwise it's impossible to use it. Also don't include C++ headers in
a C header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194581
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 13 Nov 2013 14:12:52 +0000 (14:12 +0000)]
FileCheck: fix matching of one check-prefix is a prefix of another
Summary:
Fix a case when "FileCheck --check-prefix=CHECK --check-prefix=CHECKER"
would silently ignore check-lines of the form:
CHECKER: foo
Reviewers: dsanders
Reviewed By: dsanders
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2168
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194577
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 13 Nov 2013 14:01:59 +0000 (14:01 +0000)]
Remove AllowQuotesInName and friends from MCAsmInfo.
Accepting quotes is a property of an assembler, not of an object file. For
example, ELF can support any names for sections and symbols, but the gnu
assembler only accepts quotes in some contexts and llvm-mc in a few more.
LLVM should not produce different symbols based on a guess about which assembler
will be reading the code it is printing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194575
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 13 Nov 2013 13:44:11 +0000 (13:44 +0000)]
Don't call doFinalization from verifyFunction.
verifyFunction needs to call doInitialization to collect metadata and avoid
crashing when verifying debug info in a function.
But it should not call doFinalization since that is where the verifier will
check declarations, variables and aliases, which is not desirable when one
only wants to verify a function.
A possible cleanup would be to split the class into a ModuleVerifier and
FunctionVerifier.
Issue reported by Ilia Filippov. Patch by Michael Kruse.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194574
91177308-0d34-0410-b5e6-
96231b3b80d8
Vladimir Medic [Wed, 13 Nov 2013 13:18:04 +0000 (13:18 +0000)]
Fix bug in .gpword directive parsing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194570
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Wed, 13 Nov 2013 13:15:03 +0000 (13:15 +0000)]
Support for microMIPS trap instruction with immediate operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194569
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 13 Nov 2013 13:09:39 +0000 (13:09 +0000)]
Fix -Wdelete-non-virtual-dtor warnings by making SampleProfile methods non-virtual
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194568
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Wed, 13 Nov 2013 12:22:21 +0000 (12:22 +0000)]
SampleProfileLoader pass. Initial setup.
This adds a new scalar pass that reads a file with samples generated
by 'perf' during runtime. The samples read from the profile are
incorporated and emmited as IR metadata reflecting that profile.
The profile file is assumed to have been generated by an external
profile source. The profile information is converted into IR metadata,
which is later used by the analysis routines to estimate block
frequencies, edge weights and other related data.
External profile information files have no fixed format, each profiler
is free to define its own. This includes both the on-disk representation
of the profile and the kind of profile information stored in the file.
A common kind of profile is based on sampling (e.g., perf), which
essentially counts how many times each line of the program has been
executed during the run.
The SampleProfileLoader pass is organized as a scalar transformation.
On startup, it reads the file given in -sample-profile-file to
determine what kind of profile it contains. This file is assumed to
contain profile information for the whole application. The profile
data in the file is read and incorporated into the internal state of
the corresponding profiler.
To facilitate testing, I've organized the profilers to support two file
formats: text and native. The native format is whatever on-disk
representation the profiler wants to support, I think this will mostly
be bitcode files, but it could be anything the profiler wants to
support. To do this, every profiler must implement the
SampleProfile::loadNative() function.
The text format is mostly meant for debugging. Records are separated by
newlines, but each profiler is free to interpret records as it sees fit.
Profilers must implement the SampleProfile::loadText() function.
Finally, the pass will call SampleProfile::emitAnnotations() for each
function in the current translation unit. This function needs to
translate the loaded profile into IR metadata, which the analyzer will
later be able to use.
This patch implements the first steps towards the above design. I've
implemented a sample-based flat profiler. The format of the profile is
fairly simplistic. Each sampled function contains a list of relative
line locations (from the start of the function) together with a count
representing how many samples were collected at that line during
execution. I generate this profile using perf and a separate converter
tool.
Currently, I have only implemented a text format for these profiles. I
am interested in initial feedback to the whole approach before I send
the other parts of the implementation for review.
This patch implements:
- The SampleProfileLoader pass.
- The base ExternalProfile class with the core interface.
- A SampleProfile sub-class using the above interface. The profiler
generates branch weight metadata on every branch instructions that
matches the profiles.
- A text loader class to assist the implementation of
SampleProfile::loadText().
- Basic unit tests for the pass.
Additionally, the patch uses profile information to compute branch
weights based on instruction samples.
This patch converts instruction samples into branch weights. It
does a fairly simplistic conversion:
Given a multi-way branch instruction, it calculates the weight of
each branch based on the maximum sample count gathered from each
target basic block.
Note that this assignment of branch weights is somewhat lossy and can be
misleading. If a basic block has more than one incoming branch, all the
incoming branches will get the same weight. In reality, it may be that
only one of them is the most heavily taken branch.
I will adjust this assignment in subsequent patches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194566
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 13 Nov 2013 11:56:22 +0000 (11:56 +0000)]
FileCheck: fix a bug with multiple --check-prefix options.
Summary:
This fixes a subtle bug in new FileCheck feature added
in r194343. When we search for the first satisfying check-prefix,
we should actually return the first encounter of some check-prefix as a
substring, even if it's not a part of valid check-line. Otherwise
"FileCheck --check-prefix=FOO --check-prefix=BAR" with check file:
FOO not a vaild check-line
FOO: foo
BAR: bar
incorrectly accepted file:
fog
bar
as it skipped the first two encounters of FOO, matching only BAR: line.
Reviewers: arsenm, dsanders
Reviewed By: dsanders
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2166
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194565
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Lytton [Wed, 13 Nov 2013 10:19:31 +0000 (10:19 +0000)]
XCore target: implement exception handling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194564
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Wed, 13 Nov 2013 10:07:16 +0000 (10:07 +0000)]
Fix typo + add URL
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194563
91177308-0d34-0410-b5e6-
96231b3b80d8
Vladimir Medic [Wed, 13 Nov 2013 09:48:53 +0000 (09:48 +0000)]
This patch fixes a bug in floating point operands parsing, when instruction alias uses default register operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194562
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 13 Nov 2013 07:43:10 +0000 (07:43 +0000)]
Add XFAIL:arm again on 4 MCJIT tests, since r194558. AArch64 has been left removed.
They are failing on clang-native-arm-cortex-a9.
Please tweak MCJIT/lit.local.cfg, if this didn't satisfy bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194561
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 13 Nov 2013 06:28:00 +0000 (06:28 +0000)]
Remove XFAIL:aarch64,arm from 4 tests in test/ExecutionEngine/MCJIT.
They are reported as XPASSing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194558
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 13 Nov 2013 06:27:53 +0000 (06:27 +0000)]
Mips16InstrInfo.cpp: Use <cctype> instead of <ctype.h>
Also, prune <stdlib.h>, seems stray.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194557
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Wed, 13 Nov 2013 04:37:52 +0000 (04:37 +0000)]
Allow the code which returns the length for inline assembler to know
specifically about the .space directive. This allows us to force large
blocks of code to appear in test cases for things like constant islands
without having to make giant test cases to force things like long
branches to take effect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194555
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Wed, 13 Nov 2013 04:24:13 +0000 (04:24 +0000)]
Add myself to CODE_OWNERS for the OCaml bindings
Per discussion with Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194554
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 13 Nov 2013 03:46:19 +0000 (03:46 +0000)]
Add a test case to verify that misusing anyregcc crashes as expected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194553
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 13 Nov 2013 02:49:38 +0000 (02:49 +0000)]
Add another (perhaps better) video for Sean's talk. (Thanks Marshall!)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194549
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 13 Nov 2013 02:48:20 +0000 (02:48 +0000)]
Fix a null pointer dereference when copying a null polymorphic pointer.
This bug only bit the C++98 build bots because all of the actual uses
really do move. ;] But not *quite* ready to do the whole C++11 switch
yet, so clean it up. Also add a unit test that catches this immediately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194548
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 13 Nov 2013 02:39:07 +0000 (02:39 +0000)]
R600: Fix selection failure on EXTLOAD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194547
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Wed, 13 Nov 2013 01:57:54 +0000 (01:57 +0000)]
SelectionDAG: Teach the legalizer to split SETCC if VSELECT needs splitting too.
This patch reapplies r193676 with an additional fix for the Hexagon backend. The
SystemZ backend has already been fixed by r194148.
The Type Legalizer recognizes that VSELECT needs to be split, because the type
is to wide for the given target. The same does not always apply to SETCC,
because less space is required to encode the result of a comparison. As a result
VSELECT is split and SETCC is unrolled into scalar comparisons.
This commit fixes the issue by checking for VSELECT-SETCC patterns in the DAG
Combiner. If a matching pattern is found, then the result mask of SETCC is
promoted to the expected vector mask type for the given target. Now the type
legalizer will split both VSELECT and SETCC.
This allows the following X86 DAG Combine code to sucessfully detect the MIN/MAX
pattern. This fixes PR16695, PR17002, and <rdar://problem/
14594431>.
Reviewed by Nadav
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194542
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 13 Nov 2013 01:51:36 +0000 (01:51 +0000)]
Give folks a reference to some material on the fundamental design
pattern in use here. Addresses review feedback from Sean (thanks!) and
others.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194541
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 13 Nov 2013 01:12:08 +0000 (01:12 +0000)]
Introduce an AnalysisManager which is like a pass manager but with a lot
more smarts in it. This is where most of the interesting logic that used
to live in the implicit-scheduling-hackery of the old pass manager will
live.
Like the previous commits, note that this is a very early prototype!
I expect substantial changes before this is ready to use.
The core of the design is the following:
- We have an AnalysisManager which can be used across a series of
passes over a module.
- The code setting up a pass pipeline registers the analyses available
with the manager.
- Individual transform passes can check than an analysis manager
provides the analyses they require in order to fail-fast.
- There is *no* implicit registration or scheduling.
- Analysis passes are different from other passes: they produce an
analysis result that is cached and made available via the analysis
manager.
- Cached results are invalidated automatically by the pass managers.
- When a transform pass requests an analysis result, either the analysis
is run to produce the result or a cached result is provided.
There are a few aspects of this design that I *know* will change in
subsequent commits:
- Currently there is no "preservation" system, that needs to be added.
- All of the analysis management should move up to the analysis library.
- The analysis management needs to support at least SCC passes. Maybe
loop passes. Living in the analysis library will facilitate this.
- Need support for analyses which are *both* module and function passes.
- Need support for pro-actively running module analyses to have cached
results within a function pass manager.
- Need a clear design for "immutable" passes.
- Need support for requesting cached results when available and not
re-running the pass even if that would be necessary.
- Need more thorough testing of all of this infrastructure.
There are other aspects that I view as open questions I'm hoping to
resolve as I iterate a bit on the infrastructure, and especially as
I start writing actual passes against this.
- Should we have separate management layers for function, module, and
SCC analyses? I think "yes", but I'm not yet ready to switch the code.
Adding SCC support will likely resolve this definitively.
- How should the 'require' functionality work? Should *that* be the only
way to request results to ensure that passes always require things?
- How should preservation work?
- Probably some other things I'm forgetting. =]
Look forward to more patches in shorter order now that this is in place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194538
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 13 Nov 2013 01:12:01 +0000 (01:12 +0000)]
Update the docs to match the function name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194537
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 13 Nov 2013 00:20:43 +0000 (00:20 +0000)]
Removing llvm::huge_vald and llvm::huge_vall because they are not currently used, and HUGE_VALD does not appear to be supported everywhere anyways.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194535
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 13 Nov 2013 00:15:44 +0000 (00:15 +0000)]
Replacing HUGE_VALF with llvm::huge_valf in order to work around a warning triggered in MSVC 12.
Patch reviewed by Reid Kleckner and Jim Grosbach.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194533
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 12 Nov 2013 23:27:08 +0000 (23:27 +0000)]
Remove always true flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194530
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 12 Nov 2013 22:58:39 +0000 (22:58 +0000)]
Cleanup the stackmap operand folding code and fix a corner case.
I still don't know how to refer to the fixed operands symbolically. I
plan to look into it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194529
91177308-0d34-0410-b5e6-
96231b3b80d8
Sebastian Pop [Tue, 12 Nov 2013 22:47:30 +0000 (22:47 +0000)]
improve dependence analysis testcases
print the name of the function on which the dependence analysis is performed
such that changes to the testcase are easier to review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194528
91177308-0d34-0410-b5e6-
96231b3b80d8
Sebastian Pop [Tue, 12 Nov 2013 22:47:20 +0000 (22:47 +0000)]
delinearization of arrays
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194527
91177308-0d34-0410-b5e6-
96231b3b80d8
Sebastian Pop [Tue, 12 Nov 2013 22:47:05 +0000 (22:47 +0000)]
remove virtual methods in SCEVApplyRewriter and SCEVParameterRewriter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194526
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 12 Nov 2013 22:38:59 +0000 (22:38 +0000)]
Fold (iszero(A&K1) | iszero(A&K2)) -> (A&(K1|K2)) != (K1|K2) if we know that K1 and K2 are 'one-hot' (only one bit is on).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194525
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 12 Nov 2013 22:37:16 +0000 (22:37 +0000)]
FoldBranchToCommonDest merges branches into a single branch with or/and of the condition. It has a heuristics for estimating when some of the dependencies are processed by out-of-order processors. This patch adds another rule to the heuristics that says that if the "BonusInstruction" that we speculatively execute is used by the condition of the second branch then it is okay to hoist it. This change exposes more opportunities for other passes to transform the code. It does not matter that much that we if-convert the code because the selectiondag builder splits or/and branches into multiple branches when profitable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194524
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 12 Nov 2013 22:16:18 +0000 (22:16 +0000)]
[mips] Fix a bug in function CC_MipsO32_FP64. The second double precision
argument was not being passed in $f14.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194522
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 12 Nov 2013 22:06:45 +0000 (22:06 +0000)]
[mips] Run test case with command line option -mattr=+fp64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194519
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 12 Nov 2013 21:47:44 +0000 (21:47 +0000)]
Add a FIXME for 32-bit q modifiers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194515
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Tue, 12 Nov 2013 21:44:01 +0000 (21:44 +0000)]
Protect user-supplied runtime library functions in LTO
Add user-supplied C runtime and compiler-rt library functions to
llvm.compiler.used to protect them from premature optimization by
passes like -globalopt and -ipsccp. Calls to (seemingly unused)
runtime library functions can be added by -instcombine and instruction
lowering.
Patch by Duncan Exon Smith, thanks!
Fixes <rdar://problem/
14740087>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194514
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 12 Nov 2013 21:32:41 +0000 (21:32 +0000)]
ARM: diagnose invalid system LDM/STM
The system LDM and STM instructions can't usually writeback to the base
register. The one exception is when an LDM is actually an exception-return
(i.e. contains PC in the register list).
(There's already a test that "ldm sp!, {r0-r3, pc}^" works, which is why there
is no positive test).
rdar://problem/
15223374
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194512
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 12 Nov 2013 21:10:25 +0000 (21:10 +0000)]
[mips] Revert part of r194510 that was accidentally committed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194511
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 12 Nov 2013 21:03:57 +0000 (21:03 +0000)]
[mips] Fix and re-enable a test case that has been disabled for a long time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194510
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 12 Nov 2013 20:55:49 +0000 (20:55 +0000)]
[OCaml] Dynamically link LLVM on --enable-shared builds
This commit significantly speeds up both bytecode and native
builds of LLVM clients (from ~20 second to sub-second link time),
and allows to invoke LLVM functions from OCaml toplevel.
The behavior for --disable-shared builds is unchanged.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194509
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 12 Nov 2013 20:55:42 +0000 (20:55 +0000)]
[OCaml] Fix a typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194508
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 12 Nov 2013 20:21:43 +0000 (20:21 +0000)]
Corruptly merge constants with explicit and implicit alignments.
Constant merge can merge a constant with implicit alignment with one that has
explicit alignment. Before this change it was assuming that the explicit
alignment was higher than the implicit one, causing the result to be under
aligned in some cases.
Fixes pr17815.
Patch by Chris Smowton!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194506
91177308-0d34-0410-b5e6-
96231b3b80d8
Weiming Zhao [Tue, 12 Nov 2013 19:57:43 +0000 (19:57 +0000)]
Export intrinsics:__builtin_arm_{dmb,dsb} to frontend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194505
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 12 Nov 2013 19:13:08 +0000 (19:13 +0000)]
[AArch64] Implemented AdvSIMD scalar x indexed element format and AdvSIMD scalar
copy in MC layer. Added the MC layer tests. Fixed triple setting in test cases.
Patch by Ana Pazos <apazos@codeaurora.org>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194501
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Tue, 12 Nov 2013 19:04:45 +0000 (19:04 +0000)]
Expand rotate instructions on sparcv9 as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194500
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 12 Nov 2013 18:06:12 +0000 (18:06 +0000)]
Simplify operand folding when rematerializing a load.
We already know how to fold a reload from a frameindex without
analyzing the load instruction. Generalize this to handle any
frameindex load. This streamlines the logic for rematerializing loads
from stack arguments. As a side effect, it allows stackmaps to record
a stack argument location without spilling it.
Verified no effect on codegen for llvm test-suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194497
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 12 Nov 2013 18:06:09 +0000 (18:06 +0000)]
GraphViz CFGPrinter: wrap long lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194496
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 12 Nov 2013 18:06:06 +0000 (18:06 +0000)]
whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194495
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 12 Nov 2013 16:37:31 +0000 (16:37 +0000)]
Revert "Remove unused variable."
This reverts commit r194485.
The variable is unused in some macro instantiations, but not others. We should
probably fix clang to not warn on this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194486
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 12 Nov 2013 16:31:59 +0000 (16:31 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194485
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Tue, 12 Nov 2013 16:26:47 +0000 (16:26 +0000)]
R600: Reenable llvm.R600.load.input/interp.input for compatibility
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194484
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 12 Nov 2013 12:56:01 +0000 (12:56 +0000)]
[mips][msa] Enable inlinse assembly for MSA.
Like GCC, this re-uses the 'f' constraint and a new 'w' print-modifier:
asm ("ldi.w %w0, 1", "=f"(result));
Unlike GCC, the 'w' print-modifer is not _required_ to produce the intended
output. This is a consequence of differences in the internal handling of
the registers in each compiler. To be source-compatible between the
compilers, users must use the 'w' print-modifier.
MSA registers (including control registers) are supported in clobber lists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194476
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 12 Nov 2013 12:24:36 +0000 (12:24 +0000)]
SimplifyCFG: Use existing constant folding logic when forming switch tables.
Both simpler and more powerful than the hand-rolled folding logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194475
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 12 Nov 2013 11:14:18 +0000 (11:14 +0000)]
[mips][msa] Fix buildbot failures caused by an unused variable when assertions are disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194472
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 12 Nov 2013 10:45:18 +0000 (10:45 +0000)]
[mips][msa] Added support for matching bclr, and bclri from normal IR (i.e. not intrinsics)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194471
91177308-0d34-0410-b5e6-
96231b3b80d8
Bradley Smith [Tue, 12 Nov 2013 10:38:05 +0000 (10:38 +0000)]
[ARM] Add support for FP_HP_extension build attribute
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194470
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 12 Nov 2013 10:31:49 +0000 (10:31 +0000)]
[mips][msa] Added support for matching bset, bseti, bneg, and bnegi from normal IR (i.e. not intrinsics)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194469
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 12 Nov 2013 10:14:18 +0000 (10:14 +0000)]
[mips][msa] Change constant used in ori tests to avoid conflict with bseti (also xori to avoid bnegi)
Upcoming commit(s) are going to add support for bseti and bnegi. This would
cause some existing tests to (correctly) change behaviour and emit a different
instruction. This patch prevents this by changing the constant used in ori and
xori tests so that they will not be matchable by the bseti and bnegi patterns
when these instructions are matchable from normal IR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194467
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Lytton [Tue, 12 Nov 2013 10:11:35 +0000 (10:11 +0000)]
XCore target: fix bug in aligning 'byval i8*' on the stack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194466
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Lytton [Tue, 12 Nov 2013 10:11:30 +0000 (10:11 +0000)]
XCore target test for hidden declaration
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194465
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Lytton [Tue, 12 Nov 2013 10:11:26 +0000 (10:11 +0000)]
Add XCore support for ATOMIC_FENCE.
ATOMIC_FENCE is lowered to a compiler barrier which is codegen only. There
is no need to emit an instructions since the XCore provides sequential
consistency.
Original patch by Richard Osborne
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194464
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Lytton [Tue, 12 Nov 2013 10:11:05 +0000 (10:11 +0000)]
XCore target: return error for unsupported alignment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194463
91177308-0d34-0410-b5e6-
96231b3b80d8