125334 Commits

Author SHA1 Message Date
Andy Gibbs
02fd5dfa7c Revert r254592 (virtual dtor in SCEVPredicate).
Clang has better diagnostics in this case.  It is not necessary therefore
to change the destructor to avoid what is effectively an invalid warning
in gcc.  Instead, better handle the warning flags given to the compiler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255905 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 16:43:53 +00:00
Teresa Johnson
a8b43ff7ef Mark a couple ModuleLinker member functions as const (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255903 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 16:34:53 +00:00
Rafael Espindola
cdfe790540 Avoid explicit relocation sorting most of the time.
These days relocations are created and stored in a deterministic way.
The order they are created is also suitable for the .o file, so we don't
need an explicit sort.

The last remaining exception is MIPS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255902 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 16:22:06 +00:00
Rafael Espindola
7396da8120 Revert "[AArch64] Enable PostRAScheduler for AArch64 generic build"
This reverts commit r255896. It broke the tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255899 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 15:12:26 +00:00
Rafael Espindola
f50f96be5d Always sort by offset first. NFC.
Every target changing sortRelocs was first calling the parent
implementation. Just run that first.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255898 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 15:08:24 +00:00
Diego Novillo
b8e9fb8816 Fix unused variable warning in release builds. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255897 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 14:58:34 +00:00
MinSeong Kim
fc5140b622 [AArch64] Enable PostRAScheduler for AArch64 generic build
This patch enables PostRAScheduler specifically for AArch64 generic build,
which is beneficial from the performance perspective.
Speedups up to 2 to 7% for some benchmarks on A57 and A53 are observed.
Also benchmarks from LLVM test-suite did not regress.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255896 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 14:51:22 +00:00
Matthew Simpson
dbf81cc034 [AArch64] Add DAG combine for extract extend pattern
This patch adds a DAG combine for (any_extend (extract_vector_elt v, i)) ->
(extract_vector_elt v, i). The combine enables us to better match some SMOV
patterns.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255895 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 14:30:55 +00:00
Rafael Espindola
adb5a4d946 Simplify. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255894 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 14:19:52 +00:00
Tobias Grosser
0bc653bad8 DOTGraphTraits: Allow the decision to show a graph to consider the analysis
The method processFunction() is called to decide if a graph should be shown for
a certain function. To allow DOTGraphTraitViewers to take this decision based
on the analysis results for the given function, we forward a reference to the
analysis result. This will be used by Polly to only visualize functions where
interesting loop regions have been detected.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255889 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 12:48:25 +00:00
Alexander Kornienko
62fecef128 Removed empty directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255888 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 12:19:05 +00:00
Alexey Bataev
d5572b6d8d [X86] Add option for enabling LEA optimization pass, by Andrey Turetsky
Add option to enable/disable LEA optimization pass. By default the pass is disabled.
Differential Revision: http://reviews.llvm.org/D15573


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255881 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 07:34:39 +00:00
Dan Gohman
98f658e2a0 [WebAssembly] Convert WebAssemblyTargetObjectFile to TargetLoweringObjectFileELF
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255877 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 04:55:44 +00:00
Matthias Braun
d7696fd2cb AArch64: Simplify emitEpilogue() and related code; NFC
This is in preparation to an upcoming patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255872 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 03:18:47 +00:00
Davide Italiano
4151f0d8f9 [llvm-objdump] Use report_fatal_error() for a more uniform error handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255871 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 01:59:50 +00:00
Dan Gohman
5731435941 [WebAssembly] Experimental ELF writer support
This creates the initial infrastructure for writing ELF output files. It
doesn't yet have any implementation for encoding instructions.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255869 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 01:39:00 +00:00
Cong Hou
51a9d17bfc Fix PR25838.
This is a quick fix to PR25838. The issue comes from the restriction that we
cannot normalize probabilities containing both known and unknown ones. A patch
that removes this restriction is under the review now:

http://reviews.llvm.org/D15548



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255867 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 01:29:08 +00:00
Xinliang David Li
88a450e9e9 [PGO] InstrPGO and coverage code refactoring (NFC)
Introduce a new class InstrProfSymtab to abstract
the PGO symbol table for prof and coverage reader.
The symtab is is to lookup function's PGO name
using function keys. The first user of the class
is CoverageMapping Reader. More will follow.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255862 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 00:53:37 +00:00
JF Bastien
b26c1cd856 WebAssembly: update expected torture test failures
We now have 240 expected failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255858 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-17 00:12:06 +00:00
Rafael Espindola
0d2b021de6 Use std::unique_ptr. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255852 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 23:49:14 +00:00
Dan Gohman
f2640be5df [WebAssembly] Fix legalization of shift operators on large integer types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255847 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 23:25:51 +00:00
Derek Schuff
6b90fe4207 [WebAssembly] Implement eliminateCallFramePseudo
Summary:
Implement eliminateCallFramePsuedo to handle ADJCALLSTACKUP/DOWN
pseudo-instructions. Add a test calling a vararg function which causes non-0
adjustments. This revealed an issue with RegisterCoalescer wherein it
eliminates a COPY from SP32 to a vreg but failes to update the live ranges
of EXPR_STACK, causing a machineinstr verifier failure (so this test
is commented out).

Also add a dynamic alloca test, which causes a callseq_end dag node with
a 0 (instead of undef) second argument to be generated. We currently fail to
select that, so adjust the ADJCALLSTACKUP tablegen code to handle it.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255844 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 23:21:30 +00:00
Rafael Espindola
d912be98f8 Change linkInModule to take a std::unique_ptr.
Passing in a std::unique_ptr should help find errors when the module
is used after being linked into another module.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255842 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 23:16:33 +00:00
Eric Christopher
2f9965d134 Fix funciton->function typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255841 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 23:10:53 +00:00
Rafael Espindola
bb7c983c5a Drop an unnecessary use of writev.
It looks like the code this patch deletes is based on a misunderstanding of
what guarantees writev provides. In particular, writev with 1 iovec is
not "more atomic" than a write.

Testing on OS X shows that both write and writev from multiple processes
can be intermixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255837 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 22:59:06 +00:00
Ahmed Bougacha
7a36028a83 [AArch64] Simplify some TRI/TII getters. NFC.
We don't need static_casts when we use the right Subtarget.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255836 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 22:54:06 +00:00
NAKAMURA Takumi
8e1bd38ea1 Move llvm/test/DebugInfo/live-debug-values.ll into X86, due to target triple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255834 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 22:44:10 +00:00
Rafael Espindola
df7186636e Simplify memory management with std::unique_ptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255831 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 22:28:34 +00:00
Ahmed Bougacha
411b15e22e [CodeGen] Make MachineInstrBuilder::copyImplicitOps const. NFC.
This matches the other MIB methods, none of which modify the builder.
Without this, we can't chain copyImplicitOps.
Also reformat the few users, in PPCEarlyReturn.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255828 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 22:15:30 +00:00
Nathan Slingerland
fd56824d39 [PGO] Handle and report overflow during profile merge for all types of data
Summary: Surface counter overflow when merging profile data. Merging still occurs on overflow but counts saturate to the maximum representable value. Overflow is reported to the user.

Reviewers: davidxl, dnovillo, silvas

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255825 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 21:45:43 +00:00
Teresa Johnson
5af13d7042 Use LLVM style variable name (NFC)
Fixes variable name from r255779.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255824 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 21:37:48 +00:00
Manman Ren
3559ef2a36 CXX_FAST_TLS calling convention: performance improvement for AArch64.
The access function has a short entry and a short exit, the initialization
block is only run the first time. To improve the performance, we want to
have a short frame at the entry and exit.

We explicitly handle most of the CSRs via copies. Only the CSRs that are not
handled via copies will be in CSR_SaveList.

Frame lowering and prologue/epilogue insertion will generate a short frame
in the entry and exit according to CSR_SaveList. The majority of the CSRs will
be handled by register allcoator. Register allocator will try to spill and
reload them in the initialization block.

We add CSRsViaCopy, it will be explicitly handled during lowering.

1> we first set FunctionLoweringInfo->SplitCSR if conditions are met (the target
   supports it for the given machine function and the function has only return
   exits). We also call TLI->initializeSplitCSR to perform initialization.
2> we call TLI->insertCopiesSplitCSR to insert copies from CSRsViaCopy to
   virtual registers at beginning of the entry block and copies from virtual
   registers to CSRsViaCopy at beginning of the exit blocks.
3> we also need to make sure the explicit copies will not be eliminated.

The target independent portion was committed as r255353.
rdar://problem/23557469

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255821 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 21:04:19 +00:00
Krzysztof Parzyszek
f2677d0fc2 [Hexagon] Update e_flags in the ELF definitions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255820 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 20:57:07 +00:00
Manman Ren
8f2b4f1f9e CXX_FAST_TLS calling convention: target independent portion.
Update supportSplitCSR's interface to take machine function instead of the
calling convention.

Review comments for http://reviews.llvm.org/D15341


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255818 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 20:45:48 +00:00
Derek Schuff
9ad8cc389c Remove now-unused include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255817 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 20:43:10 +00:00
Derek Schuff
01ab2e44ca Iterate over phys regs instead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255816 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 20:43:08 +00:00
Derek Schuff
30d7ede265 [WebAssembly] Print an extra local decl when the user stack pointer is used
Differential Revision: http://reviews.llvm.org/D15546

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255815 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 20:43:06 +00:00
Krzysztof Parzyszek
1895c55f4f [Hexagon] Misc fixes to r255807
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255811 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 20:07:04 +00:00
Paul Robinson
23c4c62511 Set debugger tuning from TargetOptions (NFC)
Differential Revision: http://reviews.llvm.org/D15427


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255810 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 19:58:30 +00:00
Krzysztof Parzyszek
dcf9d4a0cb [Hexagon] Update the Hexagon packetizer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255807 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 19:36:12 +00:00
Reid Kleckner
1b44fe3dd9 Revert "[ARM] Add ARMv8.2-A FP16 scalar instructions"
This reverts commit r255762.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255806 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 19:21:03 +00:00
Dan Gohman
fd7b160a14 [WebAssembly] Fix the CFG Stackifier to handle unoptimized branches
If a branch both branches to and falls through to the same block, treat it as
an explicit branch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255803 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 19:06:41 +00:00
Justin Bogner
50776d0d9e LPM: Make callers of LPM.deleteLoopFromQueue update LoopInfo directly. NFC
As of r255720, the loop pass manager will DTRT when passes update the
loop info for removed loops, so they no longer need to reach into
LPPassManager APIs to do this kind of transformation. This change very
nearly removes the need for the LPPassManager to even be passed into
loop passes - the only remaining pass that uses the LPM argument is
LoopUnswitch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255797 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 18:40:20 +00:00
Matt Arsenault
b11dd50509 AMDGPU: Override getCFInstrCost
The default cost was 0 with the assumption that it is predictable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255796 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 18:37:19 +00:00
Tom Stellard
8b1351038e MachineScheduler: Add a target hook for deciding which RegPressure sets to
increase

Summary:
This patch adds a function called getRegPressureSetScore() to
TargetRegisterInfo.  The MachineScheduler uses this when comparing
instruction that increase the register pressure of different sets
to determine which set is safer to increase.

This hook is useful for GPU targets where the number of registers in the
class is not the best metric for determing which presser set is safer to
increase.

Future work may include adding more parameters to this function, like
for example, the current pressure level of the set or the amount that
the pressure will be increased/decreased.

Reviewers: qcolombet, escha, arsenm, atrick, MatzeB

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255795 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 18:31:01 +00:00
Chris Bieneman
536f97b8b4 [CMake] Adding llvm-profdata to the list of tools clang needs.
Bootstrapping clang to generate PGO data (patches coming soon), requires llvm-profdata targets to be generated before clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255794 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 18:30:36 +00:00
Reid Kleckner
c81f0007ce Reland "[llvm-readobj] Simplify usage of -codeview flag"
Relands r255790 with fixed tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255793 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 18:28:12 +00:00
Charlie Turner
8c888e8a57 [SLPVectorizer] Ensure dominated reduction values.
When considering incoming values as part of a reduction phi, ensure the
incoming value is dominated by said phi.

Failing to ensure this property causes miscompiles.

Fixes PR25787.

Many thanks to Mattias Eriksson for reporting, reducing and analyzing the
problem for me.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255792 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 18:23:44 +00:00
Reid Kleckner
3a06c2dfa3 Revert "[llvm-readobj] Simplify usage of -codeview flag"
This reverts commit r255790.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255791 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 18:19:34 +00:00
Reid Kleckner
377b54ca02 [llvm-readobj] Simplify usage of -codeview flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255790 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-16 18:18:39 +00:00