Nick Lewycky [Wed, 26 Feb 2014 02:39:43 +0000 (02:39 +0000)]
Delete two declared overloads of CallInst::CallInst that are never defined or used. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202218
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Wed, 26 Feb 2014 01:23:26 +0000 (01:23 +0000)]
Constify the Optnone checks in IR passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202213
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Tue, 25 Feb 2014 23:49:11 +0000 (23:49 +0000)]
Simplify base64 routine a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202210
91177308-0d34-0410-b5e6-
96231b3b80d8
Mark Seaborn [Tue, 25 Feb 2014 23:48:59 +0000 (23:48 +0000)]
Exception handling docs: Describe landingpad clauses' meanings in more detail
The original text is very terse, so I've expanded on it.
Specifically, in the original text:
* "The selector value is a positive number if the exception matched a
type info" -- It wasn't clear that this meant "if the exception
matched a 'catch' clause".
* "If nothing is matched, the behavior of the program is
`undefined`_." -- It's actually implementation-defined in C++
rather than undefined, as the new text explains.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202209
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 25 Feb 2014 23:42:11 +0000 (23:42 +0000)]
Add DIUnspecifiedParameter, so we can pretty-print it.
This will be used for testcases in CFE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202207
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 25 Feb 2014 23:35:13 +0000 (23:35 +0000)]
fix crash in SmallDenseMap copy constructor
Prevent a crash in the SmallDenseMap copy constructor whenever the other
map is not in small mode.
<rdar://problem/
14292693>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202206
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 25 Feb 2014 23:25:17 +0000 (23:25 +0000)]
Use DataLayout from the module when easily available.
Eventually DataLayoutPass should go away, but for now that is the only easy
way to get a DataLayout in some APIs. This patch only changes the ones that
have easy access to a Module.
One interesting issue with sometimes using DataLayoutPass and sometimes
fetching it from the Module is that we have to make sure they are equivalent.
We can get most of the way there by always constructing the pass with a Module.
In fact, the pass could be changed to point to an external DataLayout instead
of owning one to make this stricter.
Unfortunately, the C api passes a DataLayout, so it has to be up to the caller
to make sure the pass and the module are in sync.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202204
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 25 Feb 2014 23:03:00 +0000 (23:03 +0000)]
Attempt to unbreak an MSVC buildbot by switching to %llc_dwarf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202202
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 25 Feb 2014 22:46:44 +0000 (22:46 +0000)]
DwarfDebug: Avoid emitting an empty debug_aranges section when aranges are disabled
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202201
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 25 Feb 2014 22:27:14 +0000 (22:27 +0000)]
Address review comments for r202188.
This is refactoring / simplifying code, updating comments and enabling the
testcase on non-x86 platforms.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202199
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 25 Feb 2014 22:23:04 +0000 (22:23 +0000)]
Fix resetting the DataLayout in a Module.
No tool does this currently, but as everything else in a module we should be
able to change its DataLayout.
Most of the fix is in DataLayout to make sure it can be reset properly.
The test uses Module::setDataLayout since the fact that we mutate a DataLayout
is an implementation detail. The module could hold a OwningPtr<DataLayout> and
the DataLayout itself could be immutable.
Thanks to Philip Reames for pushing me in the right direction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202198
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 25 Feb 2014 21:54:50 +0000 (21:54 +0000)]
[reassociate] Switch two std::sort calls into std::stable_sort calls as
their inputs come from std::stable_sort and they are not total orders.
I'm not a huge fan of this, but the really bad std::stable_sort is right
at the beginning of Reassociate. After we commit to stable-sort based
consistent respect of source order, the downstream sorts shouldn't undo
that unless they have a total order or they are used in an
order-insensitive way. Neither appears to be true for these cases.
I don't have particularly good test cases, but this jumped out by
inspection when looking for output instability in this pass due to
changes in the ordering of std::sort.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202196
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 25 Feb 2014 21:36:21 +0000 (21:36 +0000)]
R600: Don't unconditionally unroll loops with private memory accesses
This causes the size of the scrypt kernel to explode and eats all the
memory on some systems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202195
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 25 Feb 2014 21:36:18 +0000 (21:36 +0000)]
R600/SI: Custom select 64-bit ADD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202194
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 25 Feb 2014 21:24:45 +0000 (21:24 +0000)]
[SROA] Add an off-by-default *strict* inbounds check to SROA. I had SROA
implemented this way a long time ago and due to the overwhelming bugs
that surfaced, moved to a much more relaxed variant. Richard Smith would
like to understand the magnitude of this problem and it seems fairly
harmless to keep some flag-controlled logic to get the extremely strict
behavior here. I'll remove it if it doesn't prove useful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202193
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 25 Feb 2014 20:51:50 +0000 (20:51 +0000)]
Account for 128-bit integer operations in PPCCTRLoops
We need to abort the formation of counter-register-based loops where there are
128-bit integer operations that might become function calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202192
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 25 Feb 2014 20:41:28 +0000 (20:41 +0000)]
Don't try to set a dummy DataLayout. It is parsed now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202191
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 25 Feb 2014 20:01:08 +0000 (20:01 +0000)]
Store a DataLayout in Module.
Now that DataLayout is not a pass, store one in Module.
Since the C API expects to be able to get a char* to the datalayout description,
we have to keep a std::string somewhere. This patch keeps it in Module and also
uses it to represent modules without a DataLayout.
Once DataLayout is mandatory, we should probably move the string to DataLayout
itself since it won't be necessary anymore to represent the special case of a
module without a DataLayout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202190
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 25 Feb 2014 19:57:42 +0000 (19:57 +0000)]
Debug info: Support variadic functions.
Variadic functions have an unspecified parameter tag after the last
argument. In IR this is represented as an unspecified parameter in the
subroutine type.
Paired commit with CFE r202185.
rdar://problem/
13690847
This re-applies r202184 + a bugfix in DwarfDebug's argument handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202188
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 25 Feb 2014 19:48:36 +0000 (19:48 +0000)]
Revert "Debug info: Support variadic functions."
This reverts commit r202184 because of buildbot breakage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202187
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 25 Feb 2014 19:47:15 +0000 (19:47 +0000)]
Remove outdated comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202186
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 25 Feb 2014 19:38:07 +0000 (19:38 +0000)]
Debug info: Support variadic functions.
Variadic functions have an unspecified parameter tag after the last
argument. In IR this is represented as an unspecified parameter in the
subroutine type.
Paired commit with CFE.
rdar://problem/
13690847
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202184
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 25 Feb 2014 17:31:15 +0000 (17:31 +0000)]
[XCore] Add intrinsic for CLRPT (clear port time) instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202172
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 25 Feb 2014 17:31:06 +0000 (17:31 +0000)]
[XCore] Add intrinsic for EDU (event disable unconditional) instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202171
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 25 Feb 2014 17:30:31 +0000 (17:30 +0000)]
Make DataLayout a plain object, not a pass.
Instead, have a DataLayoutPass that holds one. This will allow parts of LLVM
don't don't handle passes to also use DataLayout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202168
91177308-0d34-0410-b5e6-
96231b3b80d8
Logan Chien [Tue, 25 Feb 2014 16:57:28 +0000 (16:57 +0000)]
Keep the link register for uwtable.
The function with uwtable attribute might be visited by the
stack unwinder, thus the link register should be considered
as clobbered after the execution of the branch and link
instruction (i.e. the definition of the machine instruction
can't be ignored) even when the callee function are marked
with noreturn.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202165
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 25 Feb 2014 16:37:15 +0000 (16:37 +0000)]
[XCore] Prefer to word align functions.
The behaviour of the XCore's instruction buffer means that the performance
of the same code sequence can differ depending on whether it starts at a 4
byte aligned address or not. Since we don't model the instruction buffer
in the backend we have no way of knowing for sure if it is beneficial to
word align a specific function. However, in the absence of precise
modelling, it is better on balance to word align functions because:
* It makes a fetch-nop while executing the prologue slightly less likely.
* If we don't word align functions then a small perturbation in one
function can have a dramatic knock on effect. If the size of the function
changes it might change the alignment and therefore the performance of
all the functions that happen to follow it in the binary. This butterfly
effect makes it harder to reason about and measure the performance of
code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202163
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 25 Feb 2014 15:52:19 +0000 (15:52 +0000)]
Factor out calls to AA.getDataLayout().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202157
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 25 Feb 2014 14:24:11 +0000 (14:24 +0000)]
Make a few more DataLayout variables const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202155
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 25 Feb 2014 11:21:48 +0000 (11:21 +0000)]
[SROA] Use the original load name with the SROA-prefixed IRB rather than
just "load". This helps avoid pointless de-duping with order-sensitive
numbers as we already have unique names from the original load. It also
makes the resulting IR quite a bit easier to read.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202140
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 25 Feb 2014 11:19:56 +0000 (11:19 +0000)]
[SROA] Thread the ability to add a pointer-specific name prefix through
the pointer adjustment code. This is the primary code path that creates
totally new instructions in SROA and being able to lump them based on
the pointer value's name for which they were created causes
*significantly* fewer name collisions and general noise in the debug
output. This is particularly significant because it is making it much
harder to track down instability in the output of SROA, as name
de-duplication is a totally harmless form of instability that gets in
the way of seeing real problems.
The new fancy naming scheme tries to dig out the root "pre-SROA" name
for pointer values and associate that all the way through the pointer
formation instructions. Digging out the root is important to prevent the
multiple iterative rounds of SROA from just layering too much cruft on
top of cruft here. We already track the layers of SROAs iteration in the
alloca name prefix. We don't need to duplicate it here.
Should have no functionality change, and shouldn't have any really
measurable impact on NDEBUG builds, as most of the complex logic is
debug-only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202139
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 25 Feb 2014 11:12:04 +0000 (11:12 +0000)]
[SROA] Rather than copying the logic for building a name prefix into the
PHI-pointer builder, just copy the builder and clobber the obvious
fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202136
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 25 Feb 2014 11:08:02 +0000 (11:08 +0000)]
[SROA] Simplify some of the logic to dig out the old pointer value by
using OldPtr more heavily. Lots of this code was written before the
rewriter had an OldPtr member setup ahead of time. There are already
asserts in place that should ensure this doesn't change any
functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202135
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 25 Feb 2014 11:07:58 +0000 (11:07 +0000)]
[SROA] Adjust to new clang-format style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202134
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Tue, 25 Feb 2014 09:50:40 +0000 (09:50 +0000)]
Reuse constants for COFF string table entry offsets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202130
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 25 Feb 2014 09:45:27 +0000 (09:45 +0000)]
[SROA] Fix a *glaring* bug in r202091: you have to actually *write*
the break statement, not just think it to yourself....
No idea how this worked at all, much less survived most bots, my
bootstrap, and some bot bootstraps!
The Polly one didn't survive, and this was filed as PR18959. I don't
have a reduced test case and honestly I'm not seeing the need. What we
probably need here are better asserts / debug-build behavior in
SmallPtrSet so that this madness doesn't make it so far.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202129
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Tue, 25 Feb 2014 09:31:05 +0000 (09:31 +0000)]
Disable old JIT unittests for AARch64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202127
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Tue, 25 Feb 2014 09:31:00 +0000 (09:31 +0000)]
Ignore old JIT tests in AARch64 - CMake style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202126
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Tue, 25 Feb 2014 09:30:54 +0000 (09:30 +0000)]
Add aarch64 to config.guess
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202125
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 25 Feb 2014 07:56:00 +0000 (07:56 +0000)]
Silence GCC warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202119
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Tue, 25 Feb 2014 04:21:15 +0000 (04:21 +0000)]
Fix typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202107
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 25 Feb 2014 03:59:29 +0000 (03:59 +0000)]
[SROA] Add a debugging tool which shuffles the slices sequence prior to
sorting it. This helps uncover latent reliance on the original ordering
which aren't guaranteed to be preserved by std::sort (but often are),
and which are based on the use-def chain orderings which also aren't
(technically) guaranteed.
Only available in C++11 debug builds, and behind a flag to prevent noise
at the moment, but this is generally useful so figured I'd put it in the
tree rather than keeping it out-of-tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202106
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 25 Feb 2014 03:50:14 +0000 (03:50 +0000)]
[SROA] Use a more direct way of determining whether we are processing
the destination operand or source operand of a memmove.
It so happens that it was impossible for SROA to try to rewrite
self-memmove where the operands are *identical*, because either such
a think is volatile (and we don't rewrite) or it is non-volatile, and we
don't even register it as a use of the alloca.
However, making the 'IsDest' test *rely* on this subtle fact is... Very
confusing for the reader. We should use the direct and readily available
test of the Use* which gives us concrete information about which operand
is being rewritten.
No functionality changed, I hope! ;]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202103
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 25 Feb 2014 03:34:17 +0000 (03:34 +0000)]
Add some convenience accessors for the underlying Use of an operand.
These complement many of the existing accessors and make it
significantly easier to write code which needs to poke at the underlying
Use without hard coding the operand number at which it resides for
a particular instruction. No functionality changed of course.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202102
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 25 Feb 2014 00:43:21 +0000 (00:43 +0000)]
Indent this continued line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202096
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 25 Feb 2014 00:07:09 +0000 (00:07 +0000)]
[SROA] Fix another instability in SROA with respect to the slice
ordering.
The fundamental problem that we're hitting here is that the use-def
chain ordering is *itself* not a stable thing to be relying on in the
rewriting for SROA. Further, we use a non-stable sort over the slices to
arrange them based on the section of the alloca they're operating on.
With a debugging STL implementation (or different implementations in
stage2 and stage3) this can cause stage2 != stage3.
The specific aspect of this problem fixed in this commit deals with the
rewriting and load-speculation around PHIs and Selects. This, like many
other aspects of the use-rewriting in SROA, is really part of the
"strong SSA-formation" that is doen by SROA where it works very hard to
canonicalize loads and stores in *just* the right way to satisfy the
needs of mem2reg[1]. When we have a select (or a PHI) with 2 uses of the
same alloca, we test that loads downstream of the select are
speculatable around it twice. If only one of the operands to the select
needs to be rewritten, then if we get lucky we rewrite that one first
and the select is immediately speculatable. This can cause the order of
operand visitation, and thus the order of slices to be rewritten, to
change an alloca from promotable to non-promotable and vice versa.
The fix is to defer all of the speculation until *after* the rewrite
phase is done. Once we've rewritten everything, we can accurately test
for whether speculation will work (once, instead of twice!) and the
order ceases to matter.
This also happens to simplify the other subtlety of speculation -- we
need to *not* speculate anything unless the result of speculating will
make the alloca fully promotable by mem2reg. I had a previous attempt at
simplifying this, but it was still pretty horrible.
There is actually already a *really* nice test case for this in
basictest.ll, but on multiple STL implementations and inputs, we just
got "lucky". Fortunately, the test case is very small and we can
essentially build it in exactly the opposite way to get reasonable
coverage in both directions even from normal STL implementations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202092
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 24 Feb 2014 23:58:54 +0000 (23:58 +0000)]
llvm-dwarfdump: Support for debug_line.dwo section for file names for type units under fission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202091
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 24 Feb 2014 23:12:18 +0000 (23:12 +0000)]
Make some DataLayout pointers const.
No functionality change. Just reduces the noise of an upcoming patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202087
91177308-0d34-0410-b5e6-
96231b3b80d8
Bernard Ogden [Mon, 24 Feb 2014 22:23:43 +0000 (22:23 +0000)]
Permit CMAKE_INSTALL_RPATH to be set on command line
Commit 201921 overrides setting of CMAKE_INSTALL_RPATH via the
command line. Last time this happened we applied another patch
to only set CMAKE_INSTALL_RPATH if already defined (r197825).
This patch does the same thing again, but only for the UNIX
case - we leave APPLE alone as presumably the original committer
is happy with the non-overriding behaviour.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202085
91177308-0d34-0410-b5e6-
96231b3b80d8
Albrecht Kadlec [Mon, 24 Feb 2014 22:18:38 +0000 (22:18 +0000)]
trivial test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202084
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Mon, 24 Feb 2014 22:12:11 +0000 (22:12 +0000)]
llvm-objdump: Do not attempt to disassemble symbols outside of section
boundaries.
It is possible to create an ELF executable where symbol from say .text
section 'points' to the address outside the section boundaries. It does
not have a sense to disassemble something outside the section.
Without this fix llvm-objdump prints finite or infinite (depends on
the executable file architecture) number of 'invalid instruction
encoding' warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202083
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 24 Feb 2014 21:37:30 +0000 (21:37 +0000)]
Disable an MCJIT test on older Darwins until we have a better interface.
See
<rdar://
16149106> [MCJIT] provide a platform-independent way to communicate callee-save frame info.
<rdar://
16149279> [MCJIT] get the host OS version from a runtime check, not a configure-time check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202082
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 24 Feb 2014 21:16:50 +0000 (21:16 +0000)]
Fix unused variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202080
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 24 Feb 2014 21:01:28 +0000 (21:01 +0000)]
R600/SI - Add new CI arithmetic instructions.
Does not yet include larger part required
to match v_mad_i64_i32 / v_mad_u64_u32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202077
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 24 Feb 2014 21:01:23 +0000 (21:01 +0000)]
R600: Make check clearer.
The check is clearer as southern islands or later,
rather than checking for later than northern islands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202076
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 24 Feb 2014 21:01:21 +0000 (21:01 +0000)]
Fix DOT4 missing from getTargetOpcodeName
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202075
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 24 Feb 2014 21:01:18 +0000 (21:01 +0000)]
Add missing const
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202074
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 24 Feb 2014 21:01:15 +0000 (21:01 +0000)]
Trivial code simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202073
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Mon, 24 Feb 2014 19:52:29 +0000 (19:52 +0000)]
SLPVectorizer: Try vectorizing 'splat' stores
Vectorize sequential stores of a broadcasted value.
5% on eon.
radar://
16124699
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202067
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Mon, 24 Feb 2014 19:33:51 +0000 (19:33 +0000)]
[X86][SchedModel] Add missing scheduling model for SSE related instructions.
The patch defines new or refines existing generic scheduling classes to match
the behavior of the SSE instructions.
It also maps those scheduling classes on the related SSE instructions.
<rdar://problem/
15607571>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202065
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Mon, 24 Feb 2014 18:41:31 +0000 (18:41 +0000)]
Add a dwarf number to the Y register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202057
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 24 Feb 2014 18:20:12 +0000 (18:20 +0000)]
Replace the F_Binary flag with a F_Text one.
After this I will set the default back to F_None. The advantage is that
before this patch forgetting to set F_Binary would corrupt a file on windows.
Forgetting to set F_Text produces one that cannot be read in notepad, which
is a better failure mode :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202052
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Mon, 24 Feb 2014 18:19:31 +0000 (18:19 +0000)]
LTO: Add the loop vectorizer to the LTO pipeline.
During the LTO phase LICM will move loop invariant global variables out of loops
(informed by GlobalModRef). This makes more loops countable presenting
opportunity for the loop vectorizer.
Adding the loop vectorizer improves some TSVC benchmarks and twolf/ref dataset
(5%) on x86-64.
radar://
15970632
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202051
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 24 Feb 2014 16:40:34 +0000 (16:40 +0000)]
Fix windows unittest I missed in the raw_fd_ostream constructor change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202050
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Mon, 24 Feb 2014 16:33:56 +0000 (16:33 +0000)]
For lcov tests, don't Xfail mips littl endian (mipsel-... and mip64el-...)
targets. Just big endian (mips-... and mips64-...)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202049
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 24 Feb 2014 15:07:20 +0000 (15:07 +0000)]
Don't make F_None the default.
This will make it easier to switch the default to being binary files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202042
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 24 Feb 2014 15:07:06 +0000 (15:07 +0000)]
[CMake] Remove dependency on non-existing profile_rt-shared. Patch by Brad King.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202041
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 24 Feb 2014 13:44:24 +0000 (13:44 +0000)]
[asan] remove test that should have been removed in r202033
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202034
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 24 Feb 2014 13:40:24 +0000 (13:40 +0000)]
[asan] simplify the code that compute the shadow offset; get rid of two internal flags that allowed to override it. The tests pass, but still this change might break asan on some platform not covered by tests. If you see this, please submit a fix with a test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202033
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Pirker [Mon, 24 Feb 2014 11:34:50 +0000 (11:34 +0000)]
Add AArch64 big endian Target (aarch64_be)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202024
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Mon, 24 Feb 2014 10:08:30 +0000 (10:08 +0000)]
AVX-512: Fixed encoding of VPCMPEQ and VPCMPGT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202015
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 24 Feb 2014 03:07:41 +0000 (03:07 +0000)]
Share a createUniqueEntity implementation between unix and windows.
The only extra bit of functionality that had to be exposed for this be be
implemented in Path.cpp is opening a file in rw mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202005
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 24 Feb 2014 01:07:38 +0000 (01:07 +0000)]
Delete dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202001
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 23 Feb 2014 23:02:23 +0000 (23:02 +0000)]
Asm Parser: support .error directive
The .error directive is similar to .err in that it will halt assembly if it is
evaluated for assembly. However, it permits a user supplied message to be
rendered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201999
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 23 Feb 2014 23:02:18 +0000 (23:02 +0000)]
AsmParser: support .ifeqs directive
The .ifeqs directive assembles the following code if the quoted string
parameters are equal. The strings must be quoted using double quotes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201998
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 23 Feb 2014 21:43:52 +0000 (21:43 +0000)]
SPARC: Implement TRAP lowering. Matches what GCC emits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201994
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 23 Feb 2014 17:45:36 +0000 (17:45 +0000)]
ARMAsmParser: whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201989
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 23 Feb 2014 17:45:32 +0000 (17:45 +0000)]
ARM IAS: support .align without parameters
.align is handled specially on certain targets. .align without any parameters
on ARM indicates a default alignment (4). Handle the special case in the target
parser, but fall back to the generic parser for the normal version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201988
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 23 Feb 2014 15:53:41 +0000 (15:53 +0000)]
MCAsmParser: support .ifne
The .ifne directive assembles the following section of code if the argument
expression is non-zero. Effectively, it is equivalent to if.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201986
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 23 Feb 2014 15:53:36 +0000 (15:53 +0000)]
MCAsmParser: handle space properly for .ifc/.ifnc
If the strings are not quoted, the first string stops at the first comma, and
the second string stops at the end of the line. Strings which contain
whitespace should be quoted. Unquoted space is to be discarded.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201985
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 23 Feb 2014 15:53:30 +0000 (15:53 +0000)]
MCAsmParser: add support for .err directive
The .err directive produces an error whenever it is assembled. This can be
useful for preventing assembly when an unexpected condition occurs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201984
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 23 Feb 2014 15:16:03 +0000 (15:16 +0000)]
Use static instead of an anonymous namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201983
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Sun, 23 Feb 2014 14:28:35 +0000 (14:28 +0000)]
AVX-512: Fixed encoding of VPTESTMQ
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201980
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 23 Feb 2014 13:56:14 +0000 (13:56 +0000)]
Simplify remove, create_directory and create_directories.
Before this patch they would take an boolean argument to say if the path
already existed. This was redundant with the returned error_code which is able
to represent that. This allowed for callers to incorrectly check only the
existed flag instead of first checking the error code.
Instead, pass in a boolean flag to say if the previous (non-)existence should be
an error or not.
Callers of the of the old simple versions are not affected. They still ignore
the previous (non-)existence as they did before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201979
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 23 Feb 2014 13:37:37 +0000 (13:37 +0000)]
Use simpler form of llvm::sys::fs::remove.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201975
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 23 Feb 2014 13:34:21 +0000 (13:34 +0000)]
LocalStackSlotAllocation: Turn one-iteration loop into if.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201974
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 23 Feb 2014 12:54:15 +0000 (12:54 +0000)]
TableGen.cmake: Functionalize and reformat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201972
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 23 Feb 2014 06:27:04 +0000 (06:27 +0000)]
Simplify linking to system libraries
The LLVMSupport library implementation consolidates all dependencies on
system libraries. Move the logic gathering system libraries out of
'cmake/modules/LLVM-Config.cmake' and into 'lib/Support/CMakeLists.txt'.
Use the target_link_libraries() command there to tell CMake about the
link dependencies of the LLVMSupport implementation. CMake will
automatically propagate this to all targets that link LLVMSupport
directly or indirectly.
We still need to build knowledge of system library dependencies into
'llvm-config'. Store the list of libraries needed in a property on
LLVMSupport and teach 'tools/llvm-config/CMakeLists.txt' to retrieve it
from there.
Drop all calls to 'link_system_libs' and 'get_system_libs' from our
CMake code. Replace their implementations with a warning that explains
the calls are no longer necessary. Also drop from 'LLVMConfig.cmake'
the HAVE_* and related variables that were published there only to allow
'get_system_libs' to run outside our build process.
Contributed by Brad King.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201969
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 23 Feb 2014 06:22:09 +0000 (06:22 +0000)]
ARM IAS: support .short and .hword
This adds support for the .short and its alias .hword for adding literal values
into the object file. This is similar to the .word directive, however, rather
than inserting a value of 4 bytes, adds a 2-byte value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201968
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sun, 23 Feb 2014 04:43:26 +0000 (04:43 +0000)]
[python-bindings] Remove some cruft that snuck in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201966
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 22 Feb 2014 20:14:02 +0000 (20:14 +0000)]
Make test more resilient against scheduling decisions.
Should bring the atom buildbots back to life.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201951
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Sat, 22 Feb 2014 19:31:28 +0000 (19:31 +0000)]
Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201944
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Sat, 22 Feb 2014 16:12:20 +0000 (16:12 +0000)]
MC: Support COFF string tables larger than 10MB
Offsets past the range of single-slash encoding are encoded as base64,
padded to 6 characters, and prefixed with two slashes. This encoding is
undocumented but used by MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201940
91177308-0d34-0410-b5e6-
96231b3b80d8
Logan Chien [Sat, 22 Feb 2014 15:39:39 +0000 (15:39 +0000)]
Don't inline get[S|U]LEB128Size() until they are proved to be hot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201939
91177308-0d34-0410-b5e6-
96231b3b80d8
Logan Chien [Sat, 22 Feb 2014 14:00:39 +0000 (14:00 +0000)]
Move get[S|U]LEB128Size() to LEB128.h.
This commit moves getSLEB128Size() and getULEB128Size() from
MCAsmInfo to LEB128.h and removes some copy-and-paste code.
Besides, this commit also adds some unit tests for the LEB128
functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201937
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 22 Feb 2014 13:29:31 +0000 (13:29 +0000)]
Revert "Revert "Use relative rpath so that the installation and build dirs are relocatable.""
This reverts commit r201934.
Polly has been fixed to work with this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201936
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 22 Feb 2014 12:36:28 +0000 (12:36 +0000)]
Revert "Use relative rpath so that the installation and build dirs are relocatable."
This reverts commit r201921.
This should bring the polly bots back. I will try to build it locally to
understand how cmake was setting the rpath of LLVMPolly.so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201934
91177308-0d34-0410-b5e6-
96231b3b80d8
Logan Chien [Sat, 22 Feb 2014 09:06:55 +0000 (09:06 +0000)]
Add const to some member functions of SuccIterator.
The operator+() and operator-() do not change the member
variables of SuccIterator. This CL will qualify the *this*
pointer with const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201933
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 22 Feb 2014 07:31:10 +0000 (07:31 +0000)]
Prune debug message in AddLLVM.cmake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201932
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 22 Feb 2014 07:27:04 +0000 (07:27 +0000)]
llvm/test/CodeGen/X86/shift-pcmp.ll: Tweak to appease FileCheck. "CHECK-LABEL" doesn't identify labels magically and CHECK-LABEL behaves free from other contexts.
For targeting pecoff, ".def foo" appears before ".short 32".
.def foo;
...
.LCPI0_0:
.short 32
foo:
CHECK-LABEL seeks not from ".short 32" but from the top of the input.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201931
91177308-0d34-0410-b5e6-
96231b3b80d8