OSDN Git Service
Lang Hames [Wed, 20 Jan 2016 17:39:52 +0000 (17:39 +0000)]
[Orc] Fix a use-after-move bug in the Orc C-bindings stack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258324
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 20 Jan 2016 16:41:43 +0000 (16:41 +0000)]
80-cols; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258323
91177308-0d34-0410-b5e6-
96231b3b80d8
Keith Walker [Wed, 20 Jan 2016 15:59:14 +0000 (15:59 +0000)]
Write AArch64 big endian data fixup entries as BE.
There was support for writing the AArch64 big endian data fixup entries in
the .eh_frame section in BE. This is changed to write all such fixup
entries in BE with no restriction on the section. This is similar to
the existing support for fixup entries for ARM.
A test is added to check the length field in the .debug_line section as
this is an example of where such a fixup occurs.
Differential Revision: http://reviews.llvm.org/D16064
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258320
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 20 Jan 2016 15:48:27 +0000 (15:48 +0000)]
Correctly initialize SIAnnotateControlFlow
Reviewers: arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D16304
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258319
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Wed, 20 Jan 2016 15:24:56 +0000 (15:24 +0000)]
[AVX512] Adding VPERMB Intrinsics
Differential Revision: http://reviews.llvm.org/D16296
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258316
91177308-0d34-0410-b5e6-
96231b3b80d8
Marina Yatsina [Wed, 20 Jan 2016 14:03:47 +0000 (14:03 +0000)]
Fixing bug in rL258132: [X86] Adding support for missing variations of X86 string related instructions
There was a bug in my rL258132 because there's an overloading of the "movsd" and "cmpsd" instructions, e.g. movsd can be either "Move Data from String to String" (the case I wanted to handle) or "Move or Merge Scalar Double-Precision Floating-Point Value" (the case that causes the asserts).
Added code for escaping the unfamiliar scenarios and falling back to old behviour.
Also changed the asserts to llvm_unreachable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258312
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 20 Jan 2016 13:14:52 +0000 (13:14 +0000)]
Proper handling of diamond-like cases in if-conversion
If converter was somewhat careless about "diamond" cases, where there
was no join block, or in other words, where the true/false blocks did
not have analyzable branches. In such cases, it was possible for it to
remove (needed) branches, resulting in a loss of entire basic blocks.
Differential Revision: http://reviews.llvm.org/D16156
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258310
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Wed, 20 Jan 2016 13:11:47 +0000 (13:11 +0000)]
AVX512: Store (MOVNTPD, MOVNTPS, MOVNTDQ) using non-temporal hint intrinsic implementation.
Differential Revision: http://reviews.llvm.org/D16350
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258309
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Wed, 20 Jan 2016 12:54:31 +0000 (12:54 +0000)]
[AArch64] Fix two bugs in the .inst directive
The AArch64 .inst directive was implemented using EmitIntValue, which resulted
in both $x and $d (code and data) mapping symbols being emitted at the same
address. This fixes it to only emit the $x mapping symbol.
EmitIntValue also emits the value in big-endian order when targeting big-endian
systems, but instructions are always emitted in little-endian order for
AArch64.
Differential Revision: http://reviews.llvm.org/D16349
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258308
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Wed, 20 Jan 2016 09:30:01 +0000 (09:30 +0000)]
[AVR] Defnined calling conventions. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258300
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Pavlu [Wed, 20 Jan 2016 09:03:42 +0000 (09:03 +0000)]
[LTO] Fix error reporting when a file passed to libLTO is invalid or non-existent
This addresses PR26060 where function lto_module_create() could return nullptr
but lto_get_error_message() returned an empty string.
The error() call after LTOModule::createFromFile() in llvm-lto is then removed
because any error from this function should go through the diagnostic handler in
llvm-lto which will exit the program. The error() call was added because this
previously did not happen when the file was non-existent. This is fixed by the
patch. (The situation that llvm-lto reports an error when the input file does
not exist is tested by llvm/tools/llvm-lto/error.ll).
Differential Revision: http://reviews.llvm.org/D16106
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258298
91177308-0d34-0410-b5e6-
96231b3b80d8
Ivan Krasin [Wed, 20 Jan 2016 08:41:22 +0000 (08:41 +0000)]
[Verifier] Fix performance regression for LTO builds
Summary:
Fix a significant performance regression by introducing GlobalValueVisited field and reusing the map.
This is a follow up to r257823 that slowed down linking Chrome with LTO by 2.5x.
If you revert this commit, please, also revert r257823.
BUG=https://llvm.org/bugs/show_bug.cgi?id=26214
Reviewers: pcc, loladiro, joker.eph
Subscribers: krasin1, joker.eph, loladiro, pcc
Differential Revision: http://reviews.llvm.org/D16338
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258297
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Jan 2016 07:03:08 +0000 (07:03 +0000)]
[SelectionDAG] Fold more offsets into GlobalAddresses
SelectionDAG previously missed opportunities to fold constants into
GlobalAddresses in several areas. For example, given `(add (add GA, c1), y)`, it
would often reassociate to `(add (add GA, y), c1)`, missing the opportunity to
create `(add GA+c, y)`. This isn't often visible on targets such as X86 which
effectively reassociate adds in their complex address-mode folding logic,
however it is currently visible on WebAssembly since it currently has very
simple address mode folding code that doesn't reassociate anything.
This patch fixes this by making SelectionDAG fold offsets into GlobalAddresses
at the same times that it folds constants together, so that it doesn't miss any
opportunities to perform such folding.
Differential Revision: http://reviews.llvm.org/D16090
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258296
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Jan 2016 05:55:09 +0000 (05:55 +0000)]
[WebAssembly] Tighten up some regexes in some tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258295
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Jan 2016 05:54:22 +0000 (05:54 +0000)]
[WebAssembly] Minor code cleanups. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258294
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Jan 2016 05:50:29 +0000 (05:50 +0000)]
[WebAssembly] Remove the Relooper code, as it is not currently being used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258293
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 20 Jan 2016 05:10:59 +0000 (05:10 +0000)]
[Orc] 'this' qualify more lambda-captured members.
More workaround attempts for GCC ICEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258288
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 20 Jan 2016 04:32:05 +0000 (04:32 +0000)]
[Orc] More qualifications of lambda-captured member variables to fix GCC ICEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258286
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Jan 2016 04:21:16 +0000 (04:21 +0000)]
[WebAssembly] Don't stackify stores across instructions with side effects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258285
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Wilkins [Wed, 20 Jan 2016 04:03:09 +0000 (04:03 +0000)]
tools/llvm-config: improve shared library support
Summary:
This is a re-commit of r257003, which was reverted,
along with the fixes from http://reviews.llvm.org/D15986.
r252532 added support for reporting the monolithic library
when LLVM_BUILD_LLVM_DYLIB is used. This would only be done
if the individual components were not found, and the dynamic
library is found.
This diff extends this as follows:
- If LLVM_LINK_LLVM_DYLIB is set, then prefer the shared
library, even if all component libraries exist.
- Two flags, --link-shared and --link-static are introduced
to provide explicit guidance. If --link-shared is passed
and the shared library does not exist, an error results.
Additionally, changed the expected shared library names from
(e.g.) LLVM-3.8.0 to LLVM-3.8. The former exists only in an
installation (and then only in CMake builds I think?), and not
in the build tree; this breaks usage of llvm-config during
builds, e.g. by llvm-go.
Reviewers: DiamondLovesYou, beanz
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D15986
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258283
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 20 Jan 2016 03:12:40 +0000 (03:12 +0000)]
[Orc] Qualify captured variable to work around GCC ICE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258278
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 20 Jan 2016 02:49:53 +0000 (02:49 +0000)]
Fix a bug in test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258276
91177308-0d34-0410-b5e6-
96231b3b80d8
Joseph Tremoulet [Wed, 20 Jan 2016 02:15:15 +0000 (02:15 +0000)]
[Inliner/WinEH] Honor implicit nounwinds
Summary:
Funclet EH tables require that a given funclet have only one unwind
destination for exceptional exits. The verifier will therefore reject
e.g. two cleanuprets with different unwind dests for the same cleanup, or
two invokes exiting the same funclet but to different unwind dests.
Because catchswitch has no 'nounwind' variant, and because IR producers
are not *required* to annotate calls which will not unwind as 'nounwind',
it is legal to nest a call or an "unwind to caller" catchswitch within a
funclet pad that has an unwind destination other than caller; it is
undefined behavior for such a call or catchswitch to unwind.
Normally when inlining an invoke, calls in the inlined sequence are
rewritten to invokes that unwind to the callsite invoke's unwind
destination, and "unwind to caller" catchswitches in the inlined sequence
are rewritten to unwind to the callsite invoke's unwind destination.
However, if such a call or "unwind to caller" catchswitch is located in a
callee funclet that has another exceptional exit with an unwind
destination within the callee, applying the normal transformation would
give that callee funclet multiple unwind destinations for its exceptional
exits. There would be no way for EH table generation to determine which
is the "true" exit, and the verifier would reject the function
accordingly.
Add logic to the inliner to detect these cases and leave such calls and
"unwind to caller" catchswitches as calls and "unwind to caller"
catchswitches in the inlined sequence.
This fixes PR26147.
Reviewers: rnk, andrew.w.kaylor, majnemer
Subscribers: alexcrichton, llvm-commits
Differential Revision: http://reviews.llvm.org/D16319
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258273
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 20 Jan 2016 01:26:34 +0000 (01:26 +0000)]
[PGO] Add a new interface to be used by Indirect Call Promotion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258271
91177308-0d34-0410-b5e6-
96231b3b80d8
Eduard Burtescu [Wed, 20 Jan 2016 00:26:52 +0000 (00:26 +0000)]
[NFC] Replace several manual GEP loops with gep_type_iterator.
Reviewers: dblaikie
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16335
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258262
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 20 Jan 2016 00:24:36 +0000 (00:24 +0000)]
Function name change /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258260
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 20 Jan 2016 00:23:32 +0000 (00:23 +0000)]
MachineScheduler: Allow independent scheduling of sub register defs
Note that this is disabled by default and still requires a patch to
handleMove() which is not upstreamed yet.
If the TrackLaneMasks policy/strategy is enabled the MachineScheduler
will build a schedule graph where definitions of independent
subregisters are no longer serialised.
Implementation comments:
- Without lane mask tracking a sub register def also counts as a use
(except for the first one with the read-undef flag set), with lane
mask tracking enabled this is no longer the case.
- Pressure Diffs where previously maintained per definition of a
vreg with the help of the SSA information contained in the
LiveIntervals. With lanemask tracking enabled we cannot do this
anymore and instead change the pressure diffs for all uses of the vreg
as it becomes live/dead. For this changed style to work correctly we
ignore uses of instructions that define the same register again: They
won't affect register pressure.
- With lanemask tracking we remove all read-undef flags from
sub register defs when building the graph and re-add them later when
all vreg lanes have become dead.
Differential Revision: http://reviews.llvm.org/D14969
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258259
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 20 Jan 2016 00:23:26 +0000 (00:23 +0000)]
RegisterPressure: Make liveness tracking subregister aware
Differential Revision: http://reviews.llvm.org/D14968
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258258
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 20 Jan 2016 00:23:21 +0000 (00:23 +0000)]
LiveInterval: Add utility class to rename independent subregister usage
This renaming is necessary to avoid a subregister aware scheduler
accidentally creating liveness "holes" which are rejected by the
MachineVerifier.
Explanation as found in this patch:
Helper class that can divide MachineOperands of a virtual register into
equivalence classes of connected components.
MachineOperands belong to the same equivalence class when they are part of
the same SubRange segment or adjacent segments (adjacent in control
flow); Different subranges affected by the same MachineOperand belong to
the same equivalence class.
Example:
vreg0:sub0 = ...
vreg0:sub1 = ...
vreg0:sub2 = ...
...
xxx = op vreg0:sub1
vreg0:sub1 = ...
store vreg0:sub0_sub1
The example contains 3 different equivalence classes:
- One for the (dead) vreg0:sub2 definition
- One containing the first vreg0:sub1 definition and its use,
but not the second definition!
- The remaining class contains all other operands involving vreg0.
We provide a utility function here to rename disjunct classes to different
virtual registers.
Differential Revision: http://reviews.llvm.org/D16126
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258257
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 20 Jan 2016 00:13:22 +0000 (00:13 +0000)]
AMDGPU/SI: Prevent the DAGCombiner from creating setcc with i1 inputs
Reviewers: arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D15035
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258256
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 20 Jan 2016 00:06:14 +0000 (00:06 +0000)]
[MachineSink] Don't break ImplicitNulls
Summary:
This teaches MachineSink to not sink instructions that might break the
implicit null check optimization that runs later. This should not
affect frontends that do not use implicit null checks.
Reviewers: aadg, reames, hfinkel, atrick
Subscribers: majnemer, llvm-commits
Differential Revision: http://reviews.llvm.org/D14632
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258254
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 19 Jan 2016 23:39:28 +0000 (23:39 +0000)]
Reinstate the second part of a comment. NFC.
Reported by: Filipe Cabecinhas
Pointy-hat to: me
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258223
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 19 Jan 2016 23:29:03 +0000 (23:29 +0000)]
[X86] Do not run shrink-wrapping on function with split-stack attribute or HiPE
calling convention.
The implementation of the related callbacks in the x86 backend for such
functions are not ready to deal with a prologue block that is not the entry
block of the function.
This fixes PR26107, but the longer term solution would be to fix those callbacks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258221
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 19 Jan 2016 23:07:10 +0000 (23:07 +0000)]
add tests to show missing memset/malloc optimizations (PR25892)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258218
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 19 Jan 2016 23:05:27 +0000 (23:05 +0000)]
[MC, COFF] Add .reloc support for WinCOFF
This adds rudimentary support for a few relocations that we will use for
the CodeView debug format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258216
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 19 Jan 2016 23:04:56 +0000 (23:04 +0000)]
[X86][SSE] Add VZEXT_MOVL target shuffle decoding.
Add support for decoding VZEXT_MOVL target shuffle masks, allowing it to be used as a source in target shuffle combines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258215
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 19 Jan 2016 22:46:33 +0000 (22:46 +0000)]
Reenable -Wexpansion-to-defined.
I think I fixed all instances of this in the codebase
(r258202, 258200, 258190). Also, the suppression didn't
have an effect on bots using make anyways, and it looks
like many bots still use configure/make bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258210
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 19 Jan 2016 22:32:58 +0000 (22:32 +0000)]
[Orc] Oops - lambda capture changed in r258206 was correct.
Fully qualify reference to Finalized in the body of the lambda instead to work
around GCC ICE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258208
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 19 Jan 2016 22:31:12 +0000 (22:31 +0000)]
[MachineFunction] Constify getter. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258207
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 19 Jan 2016 22:31:01 +0000 (22:31 +0000)]
[Orc] Add missing capture to lambda.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258206
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 19 Jan 2016 22:24:12 +0000 (22:24 +0000)]
[X86][SSE] Add INSERTPS target shuffle combines.
As vector shuffles can only reference two inputs many (V)INSERTPS patterns end up being split over two targets shuffles.
This patch adds combines to attempt to combine (V)INSERTPS nodes with input/output nodes that are just zeroing out these additional vector elements.
Differential Revision: http://reviews.llvm.org/D16072
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258205
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 19 Jan 2016 22:22:43 +0000 (22:22 +0000)]
[Orc] Qualify call to make_unique to avoid ambiguity with std::make_unique.
This should fix some of the bot failures associated with r258185.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258204
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 19 Jan 2016 22:20:21 +0000 (22:20 +0000)]
[Orc] #undef a MACRO after I'm done with it.
Suggested by Philip Reames in review of r257951.
Thanks Philip!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258203
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 19 Jan 2016 21:47:24 +0000 (21:47 +0000)]
[AArch64] Remove a bunch of useless FIXME comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258193
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 19 Jan 2016 21:31:41 +0000 (21:31 +0000)]
[WebAssembly] Remove an unused data member. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258192
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 19 Jan 2016 21:27:05 +0000 (21:27 +0000)]
[AArch64] Remove more dead code after r258093.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258191
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 19 Jan 2016 21:22:36 +0000 (21:22 +0000)]
Fix undefined behavior in llvm's local changes to googletest.
r100895 landed an llvm-only change to add minix support to googletest.
It did that by putting "defined()" in a macro, which has undefined
behavior. Slightly reshuffle things to remove that undefined behavior.
Also mention in README.LLVM that minix support is a local change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258190
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Tue, 19 Jan 2016 21:18:12 +0000 (21:18 +0000)]
Fix a coverage reading bug
function record pointer is not advanced when
duplicate entry is found.
Test case to be added.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258188
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 19 Jan 2016 21:13:54 +0000 (21:13 +0000)]
[Orc] Fix a stale comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258187
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 19 Jan 2016 21:06:38 +0000 (21:06 +0000)]
[Orc] Refactor ObjectLinkingLayer::addObjectSet to defer loading objects until
they're needed.
Prior to this patch objects were loaded (via RuntimeDyld::loadObject) when they
were added to the ObjectLinkingLayer, but were not relocated and finalized until
a symbol address was requested. In the interim, another object could be loaded
and finalized with the same memory manager, causing relocation/finalization of
the first object to fail (as the first finalization call may have marked the
allocated memory for the first object read-only).
By deferring the loadObject call (and subsequent memory allocations) until an
object file is needed we can avoid prematurely finalizing memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258185
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 19 Jan 2016 20:53:51 +0000 (20:53 +0000)]
[SCEV] Fix PR26207
In some cases, the max backedge taken count can be more conservative
than the exact backedge taken count (for instance, because
ScalarEvolution::getRange is not control-flow sensitive whereas
computeExitLimitFromICmp can be). In these cases,
computeExitLimitFromCond (specifically the bit that deals with `and` and
`or` instructions) can create an ExitLimit instance with a
`SCEVCouldNotCompute` max backedge count expression, but a computable
exact backedge count expression. This violates an implicit SCEV
assumption: a computable exact BE count should imply a computable max BE
count.
This change
- Makes the above implicit invariant explicit by adding an assert to
ExitLimit's constructor
- Changes `computeExitLimitFromCond` to be more robust around
conservative max backedge counts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258184
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 19 Jan 2016 20:53:46 +0000 (20:53 +0000)]
[SCEV] Use range-for; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258183
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Tue, 19 Jan 2016 20:53:12 +0000 (20:53 +0000)]
WebAssembly: mark known failure caused by r258125
The following test program triggers the assertion:
https://github.com/gcc-mirror/gcc/blob/master/gcc/testsuite/gcc.c-torture/execute/
20030916-1.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258182
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 19 Jan 2016 20:52:17 +0000 (20:52 +0000)]
Fix bootstrap -Werror builds after clang r258128
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258181
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 19 Jan 2016 20:33:57 +0000 (20:33 +0000)]
[libFuzzer] use std::mt19937 for generating random numbers by default. Fix MyStoll to handle negative values. Use std::any_of instead of std::find_if
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258178
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 19 Jan 2016 19:58:49 +0000 (19:58 +0000)]
getParent()->getParent() == getModule() ; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258176
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 19 Jan 2016 19:46:10 +0000 (19:46 +0000)]
function names start with a lowercase letter; NFC
Note: There are no uses of these functions outside of
SimplifyLibCalls, so they could be static functions in
that file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258172
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 19 Jan 2016 19:21:58 +0000 (19:21 +0000)]
test-release.sh: Use CMake also for Darwin
This didn't work for 3.7, but hopefully it should work now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258168
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 19 Jan 2016 19:17:47 +0000 (19:17 +0000)]
fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258167
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 19 Jan 2016 19:16:10 +0000 (19:16 +0000)]
don't repeat documentation comments in implementation file; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258166
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 19 Jan 2016 19:10:10 +0000 (19:10 +0000)]
don't repeat function names in documentation comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258164
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Jacob [Tue, 19 Jan 2016 19:04:49 +0000 (19:04 +0000)]
Move part of an if condition into an assertion. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258163
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Tue, 19 Jan 2016 18:47:02 +0000 (18:47 +0000)]
[AVX512] Adding VPERMT2B and VPERMI2B instruction .
Differential Revision: http://reviews.llvm.org/D16297
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258161
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 19 Jan 2016 18:41:10 +0000 (18:41 +0000)]
Revert 258157
According the build bots, clang is using the Registry class somewhere as well. Will reapply with appropriate clang changes at a later point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258159
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 19 Jan 2016 18:38:52 +0000 (18:38 +0000)]
[LibCallSimplifier] use instruction-level fast-math-flags to shrink calls
This is a continuation of adding FMF to call instructions:
http://reviews.llvm.org/rL255555
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258158
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 19 Jan 2016 18:34:27 +0000 (18:34 +0000)]
[GC] Registry initialization and linkage interactions
The Registry class constructs a linked list of nodes whose storage is inside static variables and nodes are added via static initializers. The trick is that those static initializers are in both the LLVM code base, and some random plugin that might get loaded in at runtime. The existing code tries to use C++ templates and their ODR rules to get a single definition of the registry for each type, but, experimentally, this doesn't quite work as designed. (Well, the entire structure doesn't. It might not actually be an ODR problem.)
Previously, when I tried moving the GCStrategy class (along with it's registry) from CodeGen to IR, I ran into a problem where asking the GCStrategyRegistry a question would return inconsistent results depending on whether you asked from CodeGen (where the static initializers still were) or Transforms. My best guess is that this is a result of either a) an order of initialization error, or b) we ended up with two copies of the registry being created. I remember at the time having convinced myself it was probably (b), but I don't have any of my notes around from that investigation any more.
See http://reviews.llvm.org/rL226311 for the original patch in question.
This patch tries to remove the possibility of (b) above. (a) was already fixed in change 258109.
Differential Revision: http://reviews.llvm.org/D16170
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258157
91177308-0d34-0410-b5e6-
96231b3b80d8
Rong Xu [Tue, 19 Jan 2016 18:29:54 +0000 (18:29 +0000)]
[PGO] Create the profile data variable before the lowering
This patch creates the profile data variable before lowering the profile intrinsics.
Reviewers: davidxl, silvas
Differential Revision: http://reviews.llvm.org/D16015
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258156
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 19 Jan 2016 18:26:01 +0000 (18:26 +0000)]
Add clarifying comments defining what a Loop is
Our loop construct is not a way to identify cycles in the CFG. This wasn't immediately obvious from the header, so clarify that fact.
The motivation for this was that I just fixed a out of tree bug due to a mistaken assumption (on my part) on what a Loop actually was. While it was fresh in my mind, I wanted to document the key point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258154
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 19 Jan 2016 18:15:12 +0000 (18:15 +0000)]
[LibCallSimplifier] use instruction-level fast-math-flags to transform pow(x, [small integer]) calls
This is a continuation of adding FMF to call instructions:
http://reviews.llvm.org/rL255555
As with D15937, the intent of the patch is to preserve the current behavior of the transform
except that we use the pow call's 'fast' attribute as a trigger rather than a function-level
attribute.
The TODO comment notes a potential follow-on patch that would propagate FMF to the new
instructions.
Differential Revision: http://reviews.llvm.org/D16122
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258153
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Ray [Tue, 19 Jan 2016 18:01:20 +0000 (18:01 +0000)]
NFC Test Commit whitespace change in a comment
Changed whitespace so comments line up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258151
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 19 Jan 2016 17:47:48 +0000 (17:47 +0000)]
Use larger write sizes for MCFillFragment.
This brings the pr26208 testcase down to 3.2 seconds. Not checking it in
since it does create a 4GB .o file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258149
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Tue, 19 Jan 2016 17:36:02 +0000 (17:36 +0000)]
[cmake] Fix add_version_info_from_vcs git svn version bug.
Summary:
add_version_info_from_vcs was setting SVN_REVISION to the last fetched
svn revision when using git svn instead of the svn revision
corresponding to HEAD. This leads to conflicts with the definition of
SVN_REVISION in SVNVersion.inc generated by GetSVN.cmake when HEAD is
not the most recently fetched svn revision.
Use 'git svn info' to determine SVN_REVISION when git svn is being used
instead (as is done in GetSVN.cmake).
Reviewers: beanz
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16299
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258148
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 19 Jan 2016 17:29:22 +0000 (17:29 +0000)]
remove outdated comment; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258147
91177308-0d34-0410-b5e6-
96231b3b80d8
Eduard Burtescu [Tue, 19 Jan 2016 17:28:00 +0000 (17:28 +0000)]
[opaque pointer types] [NFC] GEP: replace get(Pointer)ElementType uses with get{Source,Result}ElementType.
Summary:
GEPOperator: provide getResultElementType alongside getSourceElementType.
This is made possible by adding a result element type field to GetElementPtrConstantExpr, which GetElementPtrInst already has.
GEP: replace get(Pointer)ElementType uses with get{Source,Result}ElementType.
Reviewers: mjacob, dblaikie
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16275
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258145
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Tue, 19 Jan 2016 17:07:43 +0000 (17:07 +0000)]
[AVX512] Adding VPERMB instruction
Differential Revision: http://reviews.llvm.org/D16294
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258144
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 19 Jan 2016 16:59:23 +0000 (16:59 +0000)]
[WebAssembly] Rematerialize constants rather than hold them live in registers.
Teach the register stackifier to rematerialize constants that have multiple
uses instead of leaving them in registers. In the WebAssembly encoding, it's
the same code size to materialize most constants as it is to read a value
from a register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258142
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 19 Jan 2016 16:57:08 +0000 (16:57 +0000)]
Simplify MCFillFragment.
The value size was always 1 or 0, so we don't need to store it.
In a no asserts build this takes the testcase of pr26208 from 11 to 10
seconds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258141
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 19 Jan 2016 16:52:50 +0000 (16:52 +0000)]
[WebAssembly] Change a FIXME to a TODO in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258139
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 19 Jan 2016 16:52:09 +0000 (16:52 +0000)]
[WebAssembly] Re-enable this test, now that interactions with the coalescer are resolved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258138
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 19 Jan 2016 16:50:45 +0000 (16:50 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258137
91177308-0d34-0410-b5e6-
96231b3b80d8
Marina Yatsina [Tue, 19 Jan 2016 16:35:38 +0000 (16:35 +0000)]
[X86] Add support for "xlat m8"
According to x86 spec "xlat m8" is a legal instruction and it is equivalent to "xlatb".
Differential Revision: http://reviews.llvm.org/D15150
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258135
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Jacob [Tue, 19 Jan 2016 16:34:31 +0000 (16:34 +0000)]
Fix constant folding of constant vector GEPs with undef or null as pointer argument.
Reviewers: eddyb
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16321
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258134
91177308-0d34-0410-b5e6-
96231b3b80d8
Marina Yatsina [Tue, 19 Jan 2016 15:37:56 +0000 (15:37 +0000)]
[X86] Adding support for missing variations of X86 string related instructions
The following are legal according to X86 spec:
ins mem, DX
outs DX, mem
lods mem
stos mem
scas mem
cmps mem, mem
movs mem, mem
Differential Revision: http://reviews.llvm.org/D14827
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258132
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Jacob [Tue, 19 Jan 2016 15:21:15 +0000 (15:21 +0000)]
Rename Variable `Ptr` to `PtrTy`. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258130
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 19 Jan 2016 15:19:08 +0000 (15:19 +0000)]
Handle 64 bit offsets.
No tests since llvm-mc takes 14 seconds on it. I will try to improve it
and then test.
Part of pr26208.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258129
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 19 Jan 2016 14:55:02 +0000 (14:55 +0000)]
[WebAssembly] Disable some WebAssembly-specific optimization passes at -O0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258127
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 19 Jan 2016 14:53:19 +0000 (14:53 +0000)]
[WebAssembly] Use the templated form of MachineFunction::getSubtarget(). NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258126
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 19 Jan 2016 14:49:23 +0000 (14:49 +0000)]
[WebAssembly] Re-enable loop idiom recognition for memcpy et al.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258125
91177308-0d34-0410-b5e6-
96231b3b80d8
Asaf Badouh [Tue, 19 Jan 2016 14:21:39 +0000 (14:21 +0000)]
[X86][AVX512]fix dag & add intrinsics for fixupimm
cover all width and types (pd/ps/sd/ss) of fixupimm instruction and inrtinsics
Differential Revision: http://reviews.llvm.org/D16313
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258124
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Wilkins [Tue, 19 Jan 2016 05:43:21 +0000 (05:43 +0000)]
docs: address post-commit review
Rewording/expansion of CMake options
suggested by Dan Liew.
See http://reviews.llvm.org/D16208.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258112
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 19 Jan 2016 04:18:24 +0000 (04:18 +0000)]
[GC] Lower vectors-of-pointers directly by default
This commit changes the default on our lowering of vectors-of-pointers from splitting in RS4GC to reporting them in the final stack map. All of the changes to do so are already in place and tested. Assuming no problems are unearthed in the next week, we will be deleting the old code entirely next Monday.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258111
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 19 Jan 2016 03:57:18 +0000 (03:57 +0000)]
[GC] Consolidate all built in GCs into a single file [NFC]
Combine a bunch of small files into a single, still rather small, file. The primary purpose of this is to get all of the static initializers into a single file so as to have a well defined order of initialization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258109
91177308-0d34-0410-b5e6-
96231b3b80d8
Kelvin Li [Tue, 19 Jan 2016 00:04:41 +0000 (00:04 +0000)]
parseArch() supports more variations of arch names for PowerPC builds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258103
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Edler von Koch [Mon, 18 Jan 2016 23:35:24 +0000 (23:35 +0000)]
Add a change accidentally left out from r258100
Also remove an executable bit introduced by r258083.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258101
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Edler von Koch [Mon, 18 Jan 2016 23:24:54 +0000 (23:24 +0000)]
[LTO] Restore original linkage of externals prior to splitting
Summary:
This is a companion patch for http://reviews.llvm.org/D16124.
Internalized symbols increase the size of strongly-connected components in
SCC-based module splitting and thus reduce the amount of parallelism. This
patch records the original linkage of non-local symbols prior to
internalization and then restores it just before splitting/CodeGen. This is
also useful for cases where the linker requires symbols to remain external, for
instance, so they can be placed according to linker script rules.
It's currently under its own flag (-restore-globals) but should eventually
share a common flag with D16124.
Reviewers: joker.eph, pcc
Subscribers: slarin, llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D16229
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258100
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 18 Jan 2016 22:54:46 +0000 (22:54 +0000)]
Fixed MSVC warning that not all control paths return a value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258099
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 18 Jan 2016 22:09:04 +0000 (22:09 +0000)]
AMDGPU: Reduce 64-bit SRAs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258096
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 18 Jan 2016 22:01:13 +0000 (22:01 +0000)]
AMDGPU: Split 64-bit and of constant up
This breaks the tests that were meant for testing
64-bit inline immediates, so move those to shl where
they won't be broken up.
This should be repeated for the other related bit ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258095
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 18 Jan 2016 21:58:21 +0000 (21:58 +0000)]
[X86][AVX2] Ensure integer execution domain for integer blend tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258094
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 18 Jan 2016 21:56:40 +0000 (21:56 +0000)]
[AArch64] Remove unused arguments. NFC.
AFAICT, these have been unused since the initial backend import.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258093
91177308-0d34-0410-b5e6-
96231b3b80d8