Davide Italiano [Fri, 4 Dec 2015 19:27:58 +0000 (19:27 +0000)]
[llvm-readobj/ELF] Simplify Verdef handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254751
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Aizatsky [Fri, 4 Dec 2015 19:11:54 +0000 (19:11 +0000)]
fixing Makefile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254749
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Aizatsky [Fri, 4 Dec 2015 18:50:18 +0000 (18:50 +0000)]
adding MC dependencies in hopes to pacify the hexagon build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254745
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Aizatsky [Fri, 4 Dec 2015 18:35:37 +0000 (18:35 +0000)]
sancov -not-covered-functions.
Summary: The command prints out list of functions that were not entered.
To do this, addresses are first converted to function locations. Set
operations are used for function locations.
Differential Revision: http://reviews.llvm.org/D14889
review
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254742
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 4 Dec 2015 18:27:03 +0000 (18:27 +0000)]
[WebAssembly] Add several more calling conventions to the supported list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254741
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 4 Dec 2015 17:54:31 +0000 (17:54 +0000)]
don't repeat function names in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254740
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 4 Dec 2015 17:51:55 +0000 (17:51 +0000)]
fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254739
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 4 Dec 2015 17:40:13 +0000 (17:40 +0000)]
[CXX TLS calling convention] Add CXX TLS calling convention.
This commit adds a new target-independent calling convention for C++ TLS
access functions. It aims to minimize overhead in the caller by perserving as
many registers as possible.
The target-specific implementation for X86-64 is defined as following:
Arguments are passed as for the default C calling convention
The same applies for the return value(s)
The callee preserves all GPRs - except RAX and RDI
The access function makes C-style TLS function calls in the entry and exit
block, C-style TLS functions save a lot more registers than normal calls.
The added calling convention ties into the existing implementation of the
C-style TLS functions, so we can't simply use existing calling conventions
such as preserve_mostcc.
rdar://
9001553
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254737
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 4 Dec 2015 17:20:04 +0000 (17:20 +0000)]
[llvm-dwp] Retrieve the DWOID from the CU for the cu_index entry
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254731
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 4 Dec 2015 17:19:44 +0000 (17:19 +0000)]
[WebAssembly] Give names to the callseq begin and end instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254730
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 4 Dec 2015 17:18:32 +0000 (17:18 +0000)]
[WebAssembly] clang-format CallingConvSupported. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254729
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 4 Dec 2015 17:16:07 +0000 (17:16 +0000)]
[WebAssembly] Factor out the list of supported calling conventions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254728
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 4 Dec 2015 17:12:52 +0000 (17:12 +0000)]
[WebAssembly] Check for more unsupported ABI flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254727
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 4 Dec 2015 17:09:42 +0000 (17:09 +0000)]
[WebAssembly] Use SelectionDAG::getUNDEF. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254726
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Fri, 4 Dec 2015 16:18:15 +0000 (16:18 +0000)]
[Hexagon] Simplify LowerCONCAT_VECTORS, handle different types better
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254724
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 4 Dec 2015 16:14:31 +0000 (16:14 +0000)]
Modernize the C++ APIs for creating LTO modules.
This is a continuation of r253367.
These functions return is owned by the caller, so they return
std::unique_ptr now.
The call can fail, so the return is wrapped in ErrorOr.
They have a context where to report diagnostics, so they don't need to
take a string out parameter.
With this there are no call to getGlobalContext in lib/LTO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254721
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 4 Dec 2015 16:10:48 +0000 (16:10 +0000)]
ARM/AArch64: update reference documentation.
There's a more comprehensive ACLE and a real v8 ARM ARM now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254720
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 4 Dec 2015 15:48:45 +0000 (15:48 +0000)]
[Hexagon] Using multiply instead of shift on signed number which can be UB
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254719
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Fri, 4 Dec 2015 12:48:51 +0000 (12:48 +0000)]
[SystemZ] Bugfix: Don't add CC twice to new three-address instruction.
Since BuildMI() automatically adds the implicit operands for a new instruction,
adding the old instructions CC operand resulted in that there were two CC imp-def
operands, where only one was marked as dead. This caused buildSchedGraph() to
miss dependencies on the CC reg.
Review by Ulrich Weigand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254714
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Fri, 4 Dec 2015 10:53:15 +0000 (10:53 +0000)]
LEA code size optimization pass (Part 1): Remove redundant address recalculations, by Andrey Turetsky
Add new x86 pass which replaces address calculations in load or store instructions with def register of existing LEA (must be in the same basic block), if the LEA calculates address that differs only by a displacement. Works only with -Os or -Oz.
Differential Revision: http://reviews.llvm.org/D13294
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254712
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Fri, 4 Dec 2015 09:45:18 +0000 (09:45 +0000)]
[AArch64] Clean up statistical profiling test
This check has nothing to do with the statistical profiling extension, so
shouldn't be in this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254709
91177308-0d34-0410-b5e6-
96231b3b80d8
Yury Gribov [Fri, 4 Dec 2015 09:19:14 +0000 (09:19 +0000)]
[asan] Fix dynamic allocas unpoisoning on PowerPC64.
For PowerPC64 we cannot just pass SP extracted from @llvm.stackrestore to
_asan_allocas_unpoison due to specific ABI requirements
(http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html#DYNAM-STACK).
This patch adds the value returned by @llvm.get.dynamic.area.offset to
extracted from @llvm.stackrestore stack pointer, so dynamic allocas unpoisoning
stuff would work correctly on PowerPC64.
Patch by Max Ostapenko.
Differential Revision: http://reviews.llvm.org/D15108
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254707
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 4 Dec 2015 04:15:05 +0000 (04:15 +0000)]
Revert "[BranchFolding] Merge MMOs during tail merge"
This reverts commit r254694.
It broke bootstrap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254700
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 4 Dec 2015 02:42:28 +0000 (02:42 +0000)]
Move a call to getGlobalContext out of lib/LTO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254696
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 4 Dec 2015 02:32:32 +0000 (02:32 +0000)]
[Orc] Fix Kaleidoscope example for change in r254693.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254695
91177308-0d34-0410-b5e6-
96231b3b80d8
Junmo Park [Fri, 4 Dec 2015 02:29:25 +0000 (02:29 +0000)]
[BranchFolding] Merge MMOs during tail merge
Summary:
If we remove the MMOs from Load/Store instructions,
they are treated as volatile. This makes other optimization passes unhappy.
eg. Load/Store Optimization
So, it looks better to merge, not remove.
Reviewers: gberry, mcrosier
Subscribers: gberry, llvm-commits
Differential Revision: http://reviews.llvm.org/D14797
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254694
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 4 Dec 2015 02:15:39 +0000 (02:15 +0000)]
[Orc] Rename JITCompileCallbackManagerBase to JITCompileCallbackManager.
This class is turning into a useful interface, rather than an implementation
detail, so I'm dropping the 'Base' suffix.
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254693
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 4 Dec 2015 02:14:34 +0000 (02:14 +0000)]
IR: Use format_hex instead of handrolling the conversion. NFC
Cleans up some very old code in AsmWriter's WriteConstantInternal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254688
91177308-0d34-0410-b5e6-
96231b3b80d8
Nathan Slingerland [Fri, 4 Dec 2015 02:13:58 +0000 (02:13 +0000)]
Revert "[llvm-profdata] Add support for weighted merge of profile data"
This reverts commit
b7250858d96b8ce567681214273ac0e62713c661.
Reverting in order to investigate Windows test failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254687
91177308-0d34-0410-b5e6-
96231b3b80d8
Junmo Park [Fri, 4 Dec 2015 02:06:59 +0000 (02:06 +0000)]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254686
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 4 Dec 2015 02:00:12 +0000 (02:00 +0000)]
Move llvm/test/CodeGen/Generic/function-alias.ll to X86. It is incompatible to PECOFF.
FIXME: It may be ELF-generic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254685
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 4 Dec 2015 01:53:14 +0000 (01:53 +0000)]
[ARM] When a bitcast is about to be turned into a VMOVDRR, try to combine it
with its source instead of forcing the values on GPRs.
This improves the lowering of vector code when such bitcasts happen in the
middle of vector computations.
rdar://problem/
23691584
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254684
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 4 Dec 2015 01:51:19 +0000 (01:51 +0000)]
ScheduleDAGInstrs: Rework schedule graph builder.
Re-comitting with a change that avoids undefined uses getting put into
the VRegUses list.
The new algorithm remembers the uses encountered while walking backwards
until a matching def is found. Contrary to the previous version this:
- Works without LiveIntervals being available
- Allows to increase the precision to subregisters/lanemasks
(not used for now)
The changes in the AMDGPU tests are necessary because the R600 scheduler
is not stable with respect to the order of nodes in the ready queues.
Differential Revision: http://reviews.llvm.org/D9068
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254683
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 4 Dec 2015 01:31:59 +0000 (01:31 +0000)]
raw_ostream: << operator for callables with raw_ostream argument
This is a revised version of r254655 which uses a Printable wrapper
class to avoid ambiguous overload problems.
Differential Revision: http://reviews.llvm.org/D14348
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254681
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Fri, 4 Dec 2015 01:18:17 +0000 (01:18 +0000)]
X86InstrInfo::copyPhysReg: workaround reg liveness
Summary:
computeRegisterLiveness and analyzePhysReg are currently getting
confused about liveness in some cases, breaking copyPhysReg's
calculation of whether AX is dead in some cases. Work around this issue
temporarily by assuming that AX is always live.
See detail in: https://llvm.org/bugs/show_bug.cgi?id=25033#c7
And associated bugs PR24535 PR25033 PR24991 PR24992 PR25201.
This workaround makes the code correct but slightly inefficient, but it
seems to confuse the machine instr verifier which now things EAX was
undefined in some cases where it's being conservatively saved /
restored.
Reviewers: majnemer, sanjoy
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D15198
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254680
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 4 Dec 2015 01:14:24 +0000 (01:14 +0000)]
IR: Update a comment and a bool that've been out of date since 2012
It became impossible to get here with a half in r157393, over 3 years
ago.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254679
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Fri, 4 Dec 2015 01:02:10 +0000 (01:02 +0000)]
[PGO] Unify VP data format between raw and indexed profile (Reader)
With the latest refactoring and code sharing patches landed,
it is possible to unify the value profile implementation between
raw and indexed profile. This is the patch in raw profile reader
that uses the common interface.
Differential Revision: http://reviews.llvm.org/D15056
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254677
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Fri, 4 Dec 2015 00:57:25 +0000 (00:57 +0000)]
Fix function-alias.ll test on non-X86 targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254676
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 4 Dec 2015 00:45:57 +0000 (00:45 +0000)]
Simplify the error handling in llvm-lto a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254675
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Fri, 4 Dec 2015 00:45:43 +0000 (00:45 +0000)]
Emit function alias to data as a function symbol.
CFI emits jump slots for indirect functions as a byte array
constant, and declares function-typed aliases to these constants.
This change fixes AsmPrinter to emit these aliases as function
symbols and not data symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254674
91177308-0d34-0410-b5e6-
96231b3b80d8
Cong Hou [Fri, 4 Dec 2015 00:36:58 +0000 (00:36 +0000)]
Don't punish vectorized arithmetic instruction whose type will be split to multiple registers
Currently in LLVM's cost model, a vectorized arithmetic instruction will have
high cost if its type is split into multiple registers. However, this
punishment is too heavy and unnecessary. The overhead of the split should not
be on arithmetic instructions but instructions that implement the split. Note
that during vectorization we have calculated the register pressure, and we
only choose proper interleaving factor (and also vectorization factor) so
that we don't use more registers than the maximum number.
Here is a very simple example: if a vadd has the cost 1, and if we double VF
so that we need two registers to perform it, then its cost will become 4 with
the current implementation, which will prevent us to use larger VF.
Differential revision: http://reviews.llvm.org/D15159
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254671
91177308-0d34-0410-b5e6-
96231b3b80d8
Nathan Slingerland [Fri, 4 Dec 2015 00:00:20 +0000 (00:00 +0000)]
[llvm-profdata] Add support for weighted merge of profile data
This change adds support for an optional weight when merging profile data with the llvm-profdata tool.
Weights are specified by adding an option ':<weight>' suffix to the input file names.
Adding support for arbitrary weighting of input profile data allows for relative importance to be placed on the
input data from multiple training runs.
Both sampled and instrumented profiles are supported.
Reviewers: dnovillo, bogner, davidxl
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D14547
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254669
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin B. Smith [Fri, 4 Dec 2015 00:00:10 +0000 (00:00 +0000)]
[CodeGen] Minor correction to comment on PhysRegInfo.
Differential revision: http://reviews.llvm.org/D15216
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254668
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 3 Dec 2015 23:56:42 +0000 (23:56 +0000)]
Simplify since this function never fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254667
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Thu, 3 Dec 2015 23:43:56 +0000 (23:43 +0000)]
CodeGen peephole: fold redundant phys reg copies
Code generation often exposes redundant physical register copies through
virtual registers such as:
%vreg = COPY %PHYSREG
...
%PHYSREG = COPY %vreg
There are cases where no intervening clobber of %PHYSREG occurs, and the
later copy could therefore be removed. In some cases this further allows
us to remove the initial copy.
This patch contains a motivating example which comes from the x86 build
of Chrome, specifically cc::ResourceProvider::UnlockForRead uses
libstdc++'s implementation of hash_map. That example has two tests live
at the same time, and after machine sinking LLVM has confused itself
enough and things spilling EFLAGS is a great idea even though it's
never restored and the comparison results are both live.
Before this patch we have:
DEC32m %RIP, 1, %noreg, <ga:@L>, %noreg, %EFLAGS<imp-def>
%vreg1<def> = COPY %EFLAGS; GR64:%vreg1
%EFLAGS<def> = COPY %vreg1; GR64:%vreg1
JNE_1 <BB#1>, %EFLAGS<imp-use>
Both copies are useless. This patch tries to eliminate the later copy in
a generic manner.
dec is especially confusing to LLVM when compared with sub.
I wrote this patch to treat all physical registers generically, but only
remove redundant copies of non-allocatable physical registers because
the allocatable ones caused issues (e.g. when calling conventions weren't
properly modeled) and should be handled later by the register allocator
anyways.
The following tests used to failed when the patch also replaced allocatable
registers:
CodeGen/X86/StackColoring.ll
CodeGen/X86/avx512-calling-conv.ll
CodeGen/X86/copy-propagation.ll
CodeGen/X86/inline-asm-fpstack.ll
CodeGen/X86/musttail-varargs.ll
CodeGen/X86/pop-stack-cleanup.ll
CodeGen/X86/preserve_mostcc64.ll
CodeGen/X86/tailcallstack64.ll
CodeGen/X86/this-return-64.ll
This happens because COPY has other special meaning for e.g. dependency
breakage and x87 FP stack.
Note that all other backends' tests pass.
Reviewers: qcolombet
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D15157
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254665
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 3 Dec 2015 23:28:35 +0000 (23:28 +0000)]
AsmPrinter: Simplify emitting FP elements in sequential data. NFC
Use APFloat APIs here Rather than manually type-punning through
unions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254664
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 3 Dec 2015 23:07:03 +0000 (23:07 +0000)]
[WebAssembly] Fix dominance check for PHIs in the StoreResult pass
When a block has no terminator instructions, getFirstTerminator() returns
end(), which can't be used in dominance checks. Check dominance for phi
operands separately.
Also, remove some bits from WebAssemblyRegStackify.cpp that were causing
trouble on the same testcase; they were left behind from an earlier
experiment.
Differential Revision: http://reviews.llvm.org/D15210
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254662
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Thu, 3 Dec 2015 23:00:28 +0000 (23:00 +0000)]
Revert "raw_ostream: << operator for callables with raw_stream argument"
This commit provoked "error C2593: 'operator <<' is ambiguous" on MSVC.
This reverts commit r254655.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254661
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 3 Dec 2015 22:55:36 +0000 (22:55 +0000)]
[CMake] Fixing bots
CMake calls to set_property with APPEND string need to have a leading space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254659
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 3 Dec 2015 22:51:08 +0000 (22:51 +0000)]
[CMake] set_target_properties doesn't append link flags
This fixes a bug introduced in r254627, and another occurance of the same bug in this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254657
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 3 Dec 2015 22:45:19 +0000 (22:45 +0000)]
[Analysis] Become aware of MSVC's new/delete functions
The compiler can take advantage of the allocation/deallocation
function's properties. We knew how to do this for Itanium but had no
support for MSVC-style functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254656
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Thu, 3 Dec 2015 22:17:26 +0000 (22:17 +0000)]
raw_ostream: << operator for callables with raw_stream argument
This allows easier construction of print helpers. Example:
Printable PrintLaneMask(unsigned LaneMask) {
return Printable([LaneMask](raw_ostream &OS) {
OS << format("%08X", LaneMask);
});
}
// Usage:
OS << PrintLaneMask(Mask);
Differential Revision: http://reviews.llvm.org/D14348
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254655
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 3 Dec 2015 22:13:40 +0000 (22:13 +0000)]
[llvm-objdump] Use report_fatal_error() if we can't find a target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254654
91177308-0d34-0410-b5e6-
96231b3b80d8
Chih-Hung Hsieh [Thu, 3 Dec 2015 22:02:40 +0000 (22:02 +0000)]
[X86] Part 1 to fix x86-64 fp128 calling convention.
Almost all these changes are conditioned and only apply to the new
x86-64 f128 type configuration, which will be enabled in a follow up
patch. They are required together to make new f128 work. If there is
any error, we should fix or revert them as a whole.
These changes should have no impact to current configurations.
* Relax type legalization checks to accept new f128 type configuration,
whose TypeAction is TypeSoftenFloat, not TypeLegal, but also has
TLI.isTypeLegal true.
* Relax GetSoftenedFloat to return in some cases f128 type SDValue,
which is TLI.isTypeLegal but not "softened" to i128 node.
* Allow customized FABS, FNEG, FCOPYSIGN on new f128 type configuration,
to generate optimized bitwise operators for libm functions.
* Enhance related Lower* functions to handle f128 type.
* Enhance DAGTypeLegalizer::run, SoftenFloatResult, and related functions
to keep new f128 type in register, and convert f128 operators to library calls.
* Fix Combiner, Emitter, Legalizer routines that did not handle f128 type.
* Add ExpandConstant to handle i128 constants, ExpandNode
to handle ISD::Constant node.
* Add one more parameter to getCommonSubClass and firstCommonClass,
to guarantee that returned common sub class will contain the specified
simple value type.
This extra parameter is used by EmitCopyFromReg in InstrEmitter.cpp.
* Fix infinite loop in getTypeLegalizationCost when f128 is the value type.
* Fix printOperand to handle null operand.
* Enhance ISD::BITCAST node to handle f128 constant.
* Expand new f128 type for BR_CC, SELECT_CC, SELECT, SETCC nodes.
* Enhance X86AsmPrinter to emit f128 values in comments.
Differential Revision: http://reviews.llvm.org/D15134
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254653
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Thu, 3 Dec 2015 21:44:28 +0000 (21:44 +0000)]
[Hexagon] Adding shuffling resources for HVX instructions and tests for instruction encodings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254652
91177308-0d34-0410-b5e6-
96231b3b80d8
Keno Fischer [Thu, 3 Dec 2015 21:27:59 +0000 (21:27 +0000)]
[RuntimeDyld] DenseMap -> std::unordered_map
DenseMap is most applicable when both keys and values are small.
In this case, the value violates that assumption, causing quite
significant memory overhead. A std::unordered_map is more appropriate
in this case (or at least fixed the memory problems I was seeing).
Differential Revision: http://reviews.llvm.org/D14910
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254651
91177308-0d34-0410-b5e6-
96231b3b80d8
Easwaran Raman [Thu, 3 Dec 2015 20:57:37 +0000 (20:57 +0000)]
Interface to attach maximum function count from PGO to module as module flags.
This provides interface to get and set maximum function counts to Module. This
would allow things like determination of function hotness. The actual setting
of this max function count will have to be done in the frontend.
Differential Revision: http://reviews.llvm.org/D15003
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254647
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 3 Dec 2015 20:46:59 +0000 (20:46 +0000)]
[X86] Put no-op ADJCALLSTACK markers around all dynamic lowerings
Summary:
These ADJCALLSTACK markers don't generate code, but they keep dynamic
alloca code that calls chkstk out of the prologue.
This slightly pessimizes inalloca calls by preventing some register copy
coalescing, but I can live with that.
Reviewers: qcolombet
Subscribers: hans, llvm-commits
Differential Revision: http://reviews.llvm.org/D15200
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254645
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 3 Dec 2015 19:47:04 +0000 (19:47 +0000)]
[CMake] Removing an unnecessary layer of variable indirection
This prevents passthrough variables from having values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254641
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Thu, 3 Dec 2015 19:41:25 +0000 (19:41 +0000)]
Move branch folding test to a better location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254640
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Thu, 3 Dec 2015 19:30:38 +0000 (19:30 +0000)]
Fix buildbot failures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254636
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 3 Dec 2015 19:10:55 +0000 (19:10 +0000)]
Simplify test. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254631
91177308-0d34-0410-b5e6-
96231b3b80d8
Easwaran Raman [Thu, 3 Dec 2015 19:03:20 +0000 (19:03 +0000)]
Test commit.
Remove blank spaces at the end of comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254630
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Thu, 3 Dec 2015 18:55:28 +0000 (18:55 +0000)]
[WinEH] Avoid infinite loop in BranchFolding for multiple single block funclets
Differential Revision: http://reviews.llvm.org/D14996
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254629
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 3 Dec 2015 18:45:39 +0000 (18:45 +0000)]
[CMake] Add option LLVM_EXTERNALIZE_DEBUGINFO
Summary: This adds support for generating dSYM files and stripping debug info from executables and dylibs. It also supports passing -object_path_lto to the linker to generate dSYMs for LTO builds.
Reviewers: bogner, friss
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D15133
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254627
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 3 Dec 2015 18:41:59 +0000 (18:41 +0000)]
dwarfdump: Correctly indentify the indicies for DWP records
The indicies are one-based, not zero-based, per the spec.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254626
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Thu, 3 Dec 2015 18:20:05 +0000 (18:20 +0000)]
[ThinLTO] Appending linkage fixes
Summary:
Fix import from module with appending var, which cannot be imported. The
first fix is to remove an overly-aggressive error check.
The second fix is to deal with restructuring introduced to the module
linker yesterday in r254418 (actually, this fix was included already
in r254559, just added some additional cleanup).
Test by Mehdi Amini.
Reviewers: joker.eph, rafael
Subscribers: joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D15156
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254624
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 3 Dec 2015 17:53:34 +0000 (17:53 +0000)]
[Hexagon] Remove variable unused in NDEBUG build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254623
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Thu, 3 Dec 2015 17:19:58 +0000 (17:19 +0000)]
AArch64FastISel: Use cbz/cbnz to branch on i1
In the case of a conditional branch without a preceding cmp we used to emit
a "and; cmp; b.eq/b.ne" sequence, use tbz/tbnz instead.
Differential Revision: http://reviews.llvm.org/D15122
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254621
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 3 Dec 2015 17:07:12 +0000 (17:07 +0000)]
Friendly takeover of the Hexagon backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254620
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 3 Dec 2015 16:47:20 +0000 (16:47 +0000)]
[Hexagon] Implement CONCAT_VECTORS for HVX using V6_vcombine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254617
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Thu, 3 Dec 2015 16:37:21 +0000 (16:37 +0000)]
[Hexagon] NFC Using canonicalizePacket to compound/duplex/pad packets rather than doing it separately. This also ensures the integrated assembler path matches the assembly parser path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254616
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 3 Dec 2015 16:36:16 +0000 (16:36 +0000)]
Simplify ValueMap handling.
We now just return values and let ValueMap handle the map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254615
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 3 Dec 2015 15:41:33 +0000 (15:41 +0000)]
[Hexagon] Fix instruction descriptor flags for memory access size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254613
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 3 Dec 2015 14:48:20 +0000 (14:48 +0000)]
Don't pass member variables to member functions. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254610
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 3 Dec 2015 14:35:15 +0000 (14:35 +0000)]
Delete dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254609
91177308-0d34-0410-b5e6-
96231b3b80d8
Marina Yatsina [Thu, 3 Dec 2015 12:17:03 +0000 (12:17 +0000)]
[X86] MS inline asm: produce error when encountering "<type> ptr <reg name>"
Currently "<type> ptr <reg name>" treated as <reg name> in MS inline asm, ignoring the "<type> ptr" completely and possibly ignoring the intention of the user.
Fixed llvm to produce an error when encountering "<type> ptr <reg name>" operands.
For example: andpd xmm1,xmmword ptr xmm1 --> andpd xmm1, xmm1
though andpd has 2 possible matching formats - andpd xmm, xmm/m128
Patch by: ziv.izhar@intel.com
Differential Revision: http://reviews.llvm.org/D14607
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254607
91177308-0d34-0410-b5e6-
96231b3b80d8
Zlatko Buljan [Thu, 3 Dec 2015 09:56:39 +0000 (09:56 +0000)]
[mips][DSP] Add DSPr1 and DSPr2 tests for the standard encodings
Differential Revision: http://reviews.llvm.org/D15141
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254598
91177308-0d34-0410-b5e6-
96231b3b80d8
Marina Yatsina [Thu, 3 Dec 2015 08:55:33 +0000 (08:55 +0000)]
[X86] Add support for fcomip, fucomip for Intel syntax
According to x86 spec, fcomip and fucomip should be supported for Intel syntax.
Differential Revision: http://reviews.llvm.org/D15104
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254595
91177308-0d34-0410-b5e6-
96231b3b80d8
Andy Gibbs [Thu, 3 Dec 2015 08:20:20 +0000 (08:20 +0000)]
Fix class SCEVPredicate has virtual functions and accessible non-virtual destructor.
It is not enough to simply make the destructor virtual since there is a g++ 4.7
issue (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53613) that throws the
error "looser throw specifier for ... overridding ~SCEVPredicate() noexcept".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254592
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 3 Dec 2015 05:57:37 +0000 (05:57 +0000)]
[TableGen] Remove an assumption about the order of encodings in the MVT::SimpleValueType enum. Instead of assuming the types are sorted by size, scan the typeset arrays to find the smallest/largest type. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254589
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 3 Dec 2015 03:34:32 +0000 (03:34 +0000)]
AMDGPU/SI: Emit constant arrays in the .hsrodata_readonly_agent section
Summary: This is done only when targeting HSA.
Reviewers: arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D13807
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254587
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Thu, 3 Dec 2015 03:01:10 +0000 (03:01 +0000)]
Revert "ScheduleDAGInstrs: Rework schedule graph builder."
This works mostly fine but breaks some stage 1 builders when compiling
compiler-rt on i386. Revert for further investigation as I can't see an
obvious cause/fix.
This reverts commit r254577.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254586
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 3 Dec 2015 02:58:14 +0000 (02:58 +0000)]
clang-format FunctionImport after refactoring (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254585
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 3 Dec 2015 02:40:39 +0000 (02:40 +0000)]
Rename Set variable to be plural
Thanks Sean Silva for catching this.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254584
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 3 Dec 2015 02:37:33 +0000 (02:37 +0000)]
Refactor FunctionImporter::importFunctions with a helper function to process the Worklist (NFC)
This precludes some more functional changes to perform bulk imports.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254583
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 3 Dec 2015 02:37:30 +0000 (02:37 +0000)]
Adapt comment and rename variable in ModuleLinker to describe more accurately the actual use.
Thanks Sean Silva for the suggestion.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254582
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 3 Dec 2015 02:37:23 +0000 (02:37 +0000)]
Remove "ExportingModule" from ThinLTO Index (NFC)
There is no real reason the index has to have the concept of an
exporting Module. We should be able to have one single unique
instance of the Index, and it should be read-only after creation
for the whole ThinLTO processing.
The linker plugin should be able to process multiple modules (in
parallel or in sequence) with the same index.
The only reason the ExportingModule was present seems to be to
implement hasExportedFunctions() that is used by the Module linker
to decide what to do with the current Module.
For now I replaced it with a query to the map of Modules path to
see if this module was declared in the Index and consider that if
it is the case then it is probably exporting function.
On the long term the Linker interface needs to evolve and this
call should not be needed anymore.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254581
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Thu, 3 Dec 2015 02:35:24 +0000 (02:35 +0000)]
Add a TODO item that the nop handling before FP conditional branches is
not enough for SPARCv7.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254580
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Thu, 3 Dec 2015 02:05:27 +0000 (02:05 +0000)]
ScheduleDAGInstrs: Rework schedule graph builder.
The new algorithm remembers the uses encountered while walking backwards
until a matching def is found. Contrary to the previous version this:
- Works without LiveIntervals being available
- Allows to increase the precision to subregisters/lanemasks
(not used for now)
The changes in the AMDGPU tests are necessary because the R600 scheduler
is not stable with respect to the order of nodes in the ready queues.
Differential Revision: http://reviews.llvm.org/D9068
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254577
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Thu, 3 Dec 2015 01:44:45 +0000 (01:44 +0000)]
RegisterPressure: Use range based for, fix else style; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254575
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Thu, 3 Dec 2015 01:05:31 +0000 (01:05 +0000)]
[PGO] Add v2 format compatibility test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254572
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 3 Dec 2015 00:52:20 +0000 (00:52 +0000)]
MC: Make sure to clear *all* of MCMachOStreamer's state
The CreatedADWARFSection flag was added in r232842, but isn't cleared
properly when resetting the streamer's state. Fix that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254571
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Thu, 3 Dec 2015 00:50:30 +0000 (00:50 +0000)]
[WebAssembly] Add a test for wasm-store-results pass
Differential Revision: http://reviews.llvm.org/D15167
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254570
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 2 Dec 2015 23:40:03 +0000 (23:40 +0000)]
[WebAssembly] Assert that byval and nest are not used for return types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254567
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 2 Dec 2015 23:28:27 +0000 (23:28 +0000)]
Rename a header guard to be more appropriate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254566
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 2 Dec 2015 23:09:05 +0000 (23:09 +0000)]
Forgot to add this file with r254562.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254565
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 2 Dec 2015 23:08:29 +0000 (23:08 +0000)]
[Hexagon] Improve lowering of instructions to the MC layer
- Add extenders when necessary.
- Handle some basic relocations.
This should fix the failure in tools/clang/test/CodeGenCXX/crash.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254564
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 2 Dec 2015 23:06:39 +0000 (23:06 +0000)]
Move EH-specific helper functions to a more appropriate place
No functionality change is intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254562
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 2 Dec 2015 22:59:22 +0000 (22:59 +0000)]
Fixup for r254547: use format_hex() to simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254560
91177308-0d34-0410-b5e6-
96231b3b80d8