OSDN Git Service
Reid Kleckner [Wed, 13 Jan 2016 23:48:32 +0000 (23:48 +0000)]
Add file missing from r257712
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257715
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 13 Jan 2016 23:46:01 +0000 (23:46 +0000)]
[libFuzzer] make CurrentUnit a POD object instead of vector to avoid extra allocations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257713
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 13 Jan 2016 23:44:57 +0000 (23:44 +0000)]
[codeview] Share more enums across the writer and the dumper
Moves some .def files into include/DebugInfo/CodeView.
Aslo remove a 'using namespace' directive from a header in readobj and
update the uses of the endian helper types to compensate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257712
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Wed, 13 Jan 2016 23:36:00 +0000 (23:36 +0000)]
WebAssembly: fix build break introduced by ELFObjectWriter churn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257709
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 13 Jan 2016 23:29:33 +0000 (23:29 +0000)]
[Coverage] introduce class hierarchy (funcRecordReader) to support multiple versions of coverage data
[resubmit after fixing build bot failures: qualify make_unique and eliminate -Wcovered-switch-default warning.
With the planned size reduction change, the coverage format version is expected to be bumped up. This patch adds necessary support such that backward compatibility can be kept with maximal code sharing. Reading different versions of coverage data just requires instantiating the reader according to the version.
No functional change is intended.
Differiential Revision: http://reviews.llvm.org/D16133
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257708
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 13 Jan 2016 23:13:38 +0000 (23:13 +0000)]
Add a triple to the test.
Sorry for forgetting it the first time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257705
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 13 Jan 2016 23:12:53 +0000 (23:12 +0000)]
Revert r257699 -- windows buildbot failure TBI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257703
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 13 Jan 2016 23:02:30 +0000 (23:02 +0000)]
[libFuzzer] make sure we find buffer overflow in the input buffer. Previously, re-using the same vector object was hiding buffer overflows (unless we used annotated vector)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257701
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 13 Jan 2016 23:01:57 +0000 (23:01 +0000)]
move return variable declarations down to where they are actually used; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257700
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 13 Jan 2016 22:58:42 +0000 (22:58 +0000)]
[Coverage] introduce class hierarchy (funcRecordReader) to support multiple versions of coverage data
With the planned size reduction change, the coverage format version is expected to be bumped up. This patch adds necessary support such that backward compatibility can be kept with maximal code sharing. Reading different versions of coverage data just requires instantiating the reader according to the version.
No functional change is intended.
Differiential Revision: http://reviews.llvm.org/D16133
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257699
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 13 Jan 2016 22:56:57 +0000 (22:56 +0000)]
Convert a few assert failures into proper errors.
Fixes PR25944.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257697
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 13 Jan 2016 22:23:36 +0000 (22:23 +0000)]
Simplify. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257689
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 13 Jan 2016 22:17:13 +0000 (22:17 +0000)]
fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257688
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 13 Jan 2016 22:16:48 +0000 (22:16 +0000)]
hasNUses(0) == use_empty() ; NFCI
Also, improve variable name and remove unnecessary braces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257687
91177308-0d34-0410-b5e6-
96231b3b80d8
Easwaran Raman [Wed, 13 Jan 2016 21:44:36 +0000 (21:44 +0000)]
Display detailed profile summary in llvm-profdata tool.
This adds a detailed profile summary in llvm-profdata. The summary is in the
form of one or more triples of the form (P, N, M) which is interpreted as if
we look at the Top-N counts in the profile, their sum accounts for P percentage
of the sum of all counts in the program and the minimum count in the Top-N is M.
Differential Revision: http://reviews.llvm.org/D16005
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257680
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 13 Jan 2016 21:43:13 +0000 (21:43 +0000)]
[Hexagon] Fix the options controlling jump table generation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257679
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 13 Jan 2016 21:39:26 +0000 (21:39 +0000)]
rangify; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257677
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 13 Jan 2016 21:38:23 +0000 (21:38 +0000)]
don't duplicate comments that are in the header file; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257676
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 13 Jan 2016 21:36:50 +0000 (21:36 +0000)]
don't repeat function names in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257675
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Wed, 13 Jan 2016 21:09:48 +0000 (21:09 +0000)]
Relax testcase so it works on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257667
91177308-0d34-0410-b5e6-
96231b3b80d8
Changpeng Fang [Wed, 13 Jan 2016 20:39:25 +0000 (20:39 +0000)]
AMDGPU/SI: Update ISA version for FIJI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257666
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 13 Jan 2016 20:39:22 +0000 (20:39 +0000)]
Fix instance of -Wcovered-switch-default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257665
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Wed, 13 Jan 2016 20:26:00 +0000 (20:26 +0000)]
dsymutil: Only warn about missing clang modules once.
rdar://problem/
22269336
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257664
91177308-0d34-0410-b5e6-
96231b3b80d8
Dimitry Andric [Wed, 13 Jan 2016 19:48:50 +0000 (19:48 +0000)]
Remove bashism from merge.sh: POSIX sh does not have the `function`
reserved word, and it is even superfluous in bash, for this particular
instance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257663
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 13 Jan 2016 19:45:06 +0000 (19:45 +0000)]
Fix build of CodeView library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257662
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 13 Jan 2016 19:33:49 +0000 (19:33 +0000)]
Unbreak the sphinx build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257659
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 13 Jan 2016 19:32:35 +0000 (19:32 +0000)]
[readobj] Expand CodeView dumping functionality
This rewrites and expands the existing codeview dumping functionality in
llvm-readobj using techniques similar to those in lib/Object. This defines a
number of new records and enums useful for reading memory mapped codeview
sections in COFF objects.
The dumper is intended as a testing tool for LLVM as it grows more codeview
output capabilities.
Reviewers: majnemer
Differential Revision: http://reviews.llvm.org/D16104
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257658
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 13 Jan 2016 19:31:57 +0000 (19:31 +0000)]
[WebAssembly] Add an assertion to catch unexpected MCFixupKindInfo flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257657
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 13 Jan 2016 19:29:37 +0000 (19:29 +0000)]
[WebAssembly] MCFixupKindInfo's TargetSize is in bits rather than bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257655
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 13 Jan 2016 19:01:43 +0000 (19:01 +0000)]
don't repeat function names in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257649
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 13 Jan 2016 18:59:45 +0000 (18:59 +0000)]
Fix struct/class mismatch for MachineSchedContext
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257648
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 13 Jan 2016 18:37:28 +0000 (18:37 +0000)]
rangify; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257646
91177308-0d34-0410-b5e6-
96231b3b80d8
Dimitry Andric [Wed, 13 Jan 2016 18:29:46 +0000 (18:29 +0000)]
Avoid undefined behavior in LinkAllPasses.h
The LinkAllPasses.h file is included in several main programs, to force
a large number of passes to be linked in. However, the ForcePassLinking
constructor uses undefined behavior, since it calls member functions on
`nullptr`, e.g.:
((llvm::Function*)nullptr)->viewCFGOnly();
llvm::RGPassManager RGM;
((llvm::RegionPass*)nullptr)->runOnRegion((llvm::Region*)nullptr, RGM);
When the optimization level is -O2 or higher, the code below the first
nullptr dereference is optimized away, and replaced by `ud2` (on x86).
Therefore, the calls after that first dereference are never emitted. In
my case, I noticed there was no call to `llvm::sys::RunningOnValgrind()`!
Replace instances of dereferencing `nullptr` with either objects on the
stack, or regular function calls.
Differential Revision: http://reviews.llvm.org/D15996
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257645
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 13 Jan 2016 17:43:35 +0000 (17:43 +0000)]
don't repeat names in comments ; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257643
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 13 Jan 2016 17:32:32 +0000 (17:32 +0000)]
Update version to 3.9.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257627
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 13 Jan 2016 17:23:52 +0000 (17:23 +0000)]
fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257626
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Olsak [Wed, 13 Jan 2016 17:23:20 +0000 (17:23 +0000)]
AMDGPU/SI: Fix a GPU hang with POS_W_FLOAT enabled
Reviewers: tstellarAMD, arsenm
Subscribers: arsenm
Differential Revision: http://reviews.llvm.org/D16037
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257625
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Olsak [Wed, 13 Jan 2016 17:23:15 +0000 (17:23 +0000)]
AMDGPU/SI: Add tests for non-void functions and InitialPSInputAddr
Reviewers: tstellarAMD, arsenm
Differential Revision: http://reviews.llvm.org/D16036
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257624
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Olsak [Wed, 13 Jan 2016 17:23:12 +0000 (17:23 +0000)]
AMDGPU/SI: Remove ending s_endpgm from non-void functions
Reviewers: tstellarAMD, arsenm
Subscribers: arsenm
Differential Revision: http://reviews.llvm.org/D16035
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257623
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Olsak [Wed, 13 Jan 2016 17:23:09 +0000 (17:23 +0000)]
AMDGPU/SI: Add s_waitcnt at the end of non-void functions
Summary:
v2: Make ReturnsVoid private, so that I can another 8 lines of code and
look more productive.
Reviewers: tstellarAMD, arsenm
Subscribers: arsenm
Differential Revision: http://reviews.llvm.org/D16034
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257622
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Olsak [Wed, 13 Jan 2016 17:23:04 +0000 (17:23 +0000)]
AMDGPU/SI: Add support for non-void functions
Summary:
Return values can be stored in SGPRs (i32) and VGPRs (f32).
This will be used by functions which expect some bytecode or other binary to
be appended at the end. It allows defining in which registers the return
values will be stored.
v2: don't do this for compute shaders
Reviewers: tstellarAMD, arsenm
Subscribers: arsenm
Differential Revision: http://reviews.llvm.org/D16033
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257621
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Wed, 13 Jan 2016 17:10:28 +0000 (17:10 +0000)]
[WebAssemly] Invalidate liveness in CFG stackifier
WebAssemblyCFGStackify does not track liveness for EXPR_STACK, causing
verifier failure if liveness has not already been invalidated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257620
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 13 Jan 2016 16:46:41 +0000 (16:46 +0000)]
fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257617
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Wed, 13 Jan 2016 16:43:49 +0000 (16:43 +0000)]
[lit] Fix handling of per test timeout when the installed psutil version
is < ``2.0``.
Older versions of psutil (e.g. ``1.2.1`` which is the version shipped with
Ubuntu 14.04) use a different API for retrieving the child processes.
To handle this try the new API first and if that fails try the old API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257616
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 13 Jan 2016 16:34:10 +0000 (16:34 +0000)]
fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257613
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 13 Jan 2016 16:30:44 +0000 (16:30 +0000)]
fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257611
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolai Haehnle [Wed, 13 Jan 2016 16:10:10 +0000 (16:10 +0000)]
AMDGPU/SI: Add SI Machine Scheduler
Summary:
It is off by default, but can be used
with --misched=si
Patch by: Axel Davy
Reviewers: arsenm, tstellarAMD, nhaehnle
Subscribers: nhaehnle, solenskiner, arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D11885
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257609
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Wed, 13 Jan 2016 15:48:42 +0000 (15:48 +0000)]
Fixing warning by adding the X86ISD::VROTRI case.
Differential Revision: http://reviews.llvm.org/D16052
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257607
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 13 Jan 2016 15:48:18 +0000 (15:48 +0000)]
[Hexagon] Do not insert non-phis before phis in bit simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257606
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Wed, 13 Jan 2016 14:59:19 +0000 (14:59 +0000)]
[AVX512] Adding PMOVSXBD/W/Q , PMOVZSDQ and PMOVZSWD/Q Intrinsics .
Differential Revision: http://reviews.llvm.org/D16111
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257604
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Wed, 13 Jan 2016 14:25:21 +0000 (14:25 +0000)]
[AVX512] Adding PMOVZXBD/W/Q , PMOVZXDQ and PMOVZXWD/Q Intrinsics
Differential Revision:http://reviews.llvm.org/D16071
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257601
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Wed, 13 Jan 2016 13:12:23 +0000 (13:12 +0000)]
[PowerPC] Fix large code model with the ELFv2 ABI
The global entry point prologue currently assumes that the TOC
associated with a function is less than 2GB away from the function
entry point. This is always true when using the medium or small
code model, but may not be the case when using the large code model.
This patch adds a new variant of the ELFv2 global entry point prologue
that lifts the 2GB restriction when building with -mcmodel=large.
This works by emitting a quadword containing the distance from the
function entry point to its associated TOC immediately before the
entry point, and then using a prologue like:
ld r2,-8(r12)
add r2,r2,r12
Since creation of the entry point prologue is now split across two
separate routines (PPCLinuxAsmPrinter::EmitFunctionEntryLabel emits
the data word, PPCLinuxAsmPrinter::EmitFunctionBodyStart the prolog
code), I've switched to using named labels instead of just temporaries
to indicate the locations of the global and local entry points and the
new TOC offset data word.
These names are provided by new routines in PPCFunctionInfo modeled
after the existing PPCFunctionInfo::getPICOffsetSymbol.
Note that a corresponding change was committed to GCC here:
https://gcc.gnu.org/ml/gcc-patches/2015-12/msg00355.html
Reviewers: hfinkel
Differential Revision: http://reviews.llvm.org/D15500
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257597
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Wed, 13 Jan 2016 12:39:33 +0000 (12:39 +0000)]
[AVX512] adding PRORQ , PRORD , PRORLVQ and PRORLVD Intrinsics
Differential Revision: http://reviews.llvm.org/D16052
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257594
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Olsak [Wed, 13 Jan 2016 11:46:48 +0000 (11:46 +0000)]
AMDGPU/SI: Allow more shader inputs
Reviewers: tstellarAMD, arsenm
Subscribers: arsenm
Differential Revision: http://reviews.llvm.org/D16032
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257593
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Olsak [Wed, 13 Jan 2016 11:46:10 +0000 (11:46 +0000)]
AMDGPU/SI: Allow any number of PS inputs
Summary:
With the ability to concatenate shader binaries, the limit of 15 no longer
applies.
Reviewers: tstellarAMD, arsenm
Subscribers: arsenm
Differential Revision: http://reviews.llvm.org/D16031
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257592
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Olsak [Wed, 13 Jan 2016 11:45:36 +0000 (11:45 +0000)]
AMDGPU/SI: Add new target attribute InitialPSInputAddr
Summary:
This allows Mesa to pass initial SPI_PS_INPUT_ADDR to LLVM.
The register assigns VGPR locations to PS inputs, while the ENA register
determines whether or not they are loaded.
Mesa needs to set some inputs as not-movable, so that a pixel shader prolog
binary appended at the beginning can assume where some inputs are.
v2: Make PSInputAddr private, because there is never enough silly getters
and setters for people to read.
Reviewers: tstellarAMD, arsenm
Subscribers: arsenm
Differential Revision: http://reviews.llvm.org/D16030
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257591
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Olsak [Wed, 13 Jan 2016 11:44:29 +0000 (11:44 +0000)]
AMDGPU/SI: Fix a bug in SIFoldOperands
Summary: ret.ll will contain a test for this
Reviewers: tstellarAMD, arsenm
Subscribers: arsenm
Differential Revision: http://reviews.llvm.org/D16029
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257590
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrey Turetskiy [Wed, 13 Jan 2016 11:30:44 +0000 (11:30 +0000)]
LEA code size optimization pass (Part 2): Remove redundant LEA instructions.
Make x86 OptimizeLEAs pass remove LEA instruction if there is another LEA
(in the same basic block) which calculates address differing only be a
displacement. Works only for -Oz.
Differential Revision: http://reviews.llvm.org/D13295
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257589
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 13 Jan 2016 07:53:11 +0000 (07:53 +0000)]
Add test cases that will show the bug that was fixed in r256725.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257584
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 13 Jan 2016 07:20:13 +0000 (07:20 +0000)]
[TableGen] Cleanup output formatting and add llvm_unreachables to the output the AsmMatcher uses when it overflows the 64-bit tables. No in tree targets use this code, but I tested it with an temporarily reduced table width.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257583
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 13 Jan 2016 07:20:12 +0000 (07:20 +0000)]
[TableGen] Replace some hardcoded assumptions that the OpcodeInfo table is 64-bits for cleanliness. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257582
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 13 Jan 2016 07:20:10 +0000 (07:20 +0000)]
[TableGen] Use std::remove_if instead of an n^2 loop. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257581
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 13 Jan 2016 07:20:07 +0000 (07:20 +0000)]
[TableGen] Fix up some stale comments in the AsmMatcher. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257580
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 13 Jan 2016 07:20:05 +0000 (07:20 +0000)]
[TableGen] Move calls to getValueAsInt out of a loop since they aren't simple functions. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257579
91177308-0d34-0410-b5e6-
96231b3b80d8
Junmo Park [Wed, 13 Jan 2016 07:03:42 +0000 (07:03 +0000)]
Remove extra whitespace. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257578
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 13 Jan 2016 06:34:57 +0000 (06:34 +0000)]
[ORC] Add extra debugging output to OrcRemoteTargetServer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257577
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 13 Jan 2016 06:08:07 +0000 (06:08 +0000)]
[ORC] Fix typo in debugging output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257576
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 13 Jan 2016 06:02:45 +0000 (06:02 +0000)]
[Inliner] Merge the attributes of the caller and callee functions
This patch turns off the fast-math optimization attribute on the caller
if the callee's fast-math attribute is not turned on.
For example,
- before inlining
caller: "less-precise-fpmad"="true"
callee: "less-precise-fpmad"="false"
- after inlining
caller: "less-precise-fpmad"="false"
Alternatively, it's possible to block inlining if the caller's and
callee's attributes don't match. If this approach is preferable to the
one in this patch, we can discuss post-commit.
rdar://problem/
19836465
Differential Revision: http://reviews.llvm.org/D7802
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257575
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Wed, 13 Jan 2016 05:59:13 +0000 (05:59 +0000)]
Fix PointerIntPair so that it can use an enum class as its integer template argument.
Summary:
The problem here is that an enum class can not be implicitly converted to an
integer. That assumption snuck back into PointerIntPair. This commit fixes the
issue and more importantly adds some unittests to make sure that we do not break
this again.
rdar://
23594806
Reviewers: gribozavr
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16131
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257574
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Wed, 13 Jan 2016 04:52:26 +0000 (04:52 +0000)]
Doc fix: code-quote load / store doc the same way
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257573
91177308-0d34-0410-b5e6-
96231b3b80d8
James Y Knight [Wed, 13 Jan 2016 04:44:14 +0000 (04:44 +0000)]
[SPARC] Revamp AnalyzeBranch and add ReverseBranchCondition.
AnalyzeBranch on X86 (and, previously, SPARC, which implementation was
copied from X86) tries to modify the branches based on block
layout (e.g. checking isLayoutSuccessor), when AllowModify is true.
The rest of the architectures leave that up to the caller, which can
call InsertBranch, RemoveBranch, and ReverseBranchCondition as
appropriate. That appears to be the preferred way to do it nowadays.
This commit makes SPARC like the rest: replaces AnalyzeBranch with an
implementation cribbed from AArch64, and adds a ReverseBranchCondition
implementation.
Additionally, a test-case has been added (also cribbed from AArch64)
demonstrating that redundant branch sequences no longer get emitted.
E.g., it used to emit code like this:
bne .LBB1_2
nop
ba .LBB1_1
nop
.LBB1_2:
And now emits:
cmp %i0, 42
be .LBB1_1
nop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257572
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 13 Jan 2016 04:36:15 +0000 (04:36 +0000)]
[Coverage] Refactor coverage mapping reader code
(Resubmit after fixing a typo that breaks test on big endian
machines)
In this refactoring, member functions are introduced to access
CovMap header/func record members and hide layout details. This
will enable further code restructuring to support reading multiple
versions of coverage mapping data with shared/templatized code.
(When coveremap format version changes, backward compatibtility
should be preserved).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257571
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Wed, 13 Jan 2016 04:11:36 +0000 (04:11 +0000)]
[llvm-readobj] Remove dead code. Add an assertion instead.
When we arrive at the end of the function, the validation of
the object has been done already. In theory, so, we should never
arrive here with something broken as the object isn't mutated.
Practice sometimes proves theory to be wrong, so leave an assertion
instead, as suggested by David Blaikie, to catch bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257570
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 13 Jan 2016 02:46:40 +0000 (02:46 +0000)]
Rollback r257551 -- unexpected test failures TBI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257564
91177308-0d34-0410-b5e6-
96231b3b80d8
Keno Fischer [Wed, 13 Jan 2016 02:31:14 +0000 (02:31 +0000)]
Re-Revert r257105 (Verifier debug info changes)
While I investigate some new buildbot failures. This was originally reapplied
as r257550 and r257558.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257563
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Wed, 13 Jan 2016 02:03:31 +0000 (02:03 +0000)]
[llvm-objdump] Use report_error() and improve error coverage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257561
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 13 Jan 2016 01:58:27 +0000 (01:58 +0000)]
[libFuzzer] make sure to update CurrentUnit when drilling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257560
91177308-0d34-0410-b5e6-
96231b3b80d8
Keno Fischer [Wed, 13 Jan 2016 01:26:57 +0000 (01:26 +0000)]
Use utostr rather than std::to_string
Looks like std::to_string is not available for Android. Hopefully
this fixes the bot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257558
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 13 Jan 2016 01:18:13 +0000 (01:18 +0000)]
AsmPrinter: Fix wrong OS X versions being emitted for darwin triples
The version numbers of the darwin kernel are different from the version
numbers of OS X, so we need adjustments if we had "*-*-darwin" triples.
Use the existing utility functions in TargetTriple for this.
Fixes rdar://
22056966
Differential Revision: http://reviews.llvm.org/D14601
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257555
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 13 Jan 2016 01:05:23 +0000 (01:05 +0000)]
[CodeView] Mark our lines as statements, not expressions
The line tables for CodeView make a distinction between expressions and
statements. As it turns out, MSVC always emits them as statements and
we always emit them as expressions. Let's switch to statements to match
the CodeView that they emit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257553
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 13 Jan 2016 01:05:16 +0000 (01:05 +0000)]
[CodeView] Improve the line table dumper
This change has us print out fields we didn't previously understand. To
improve readability, we now group column information with it's
respective line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257552
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 13 Jan 2016 00:53:46 +0000 (00:53 +0000)]
[Coverage] Refactor coverage mapping reader code /NFC
(Resubmit after fixing build bot failures)
In this refactoring, member functions are introduced to access
CovMap header/func record members and hide layout details. This
will enable further code restructuring to support reading multiple
versions of coverage mapping data with shared/templatized code.
(When coveremap format version changes, backward compatibtility
should be preserved).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257551
91177308-0d34-0410-b5e6-
96231b3b80d8
Keno Fischer [Wed, 13 Jan 2016 00:31:44 +0000 (00:31 +0000)]
Reapply r257105 "[Verifier] Check that debug values have proper size"
The follow extra changes were made to test cases:
Manually making the variable be the actual type instead of a pointer
to avoid pointer-size differences in generic code:
LLVM :: DebugInfo/Generic/2010-03-24-MemberFn.ll
LLVM :: DebugInfo/Generic/2010-04-06-NestedFnDbgInfo.ll
LLVM :: DebugInfo/Generic/2010-05-03-DisableFramePtr.ll
LLVM :: DebugInfo/Generic/varargs.ll
Delete sizing information from debug info for the same reason
(but the presence of the pointer was important to the test case):
LLVM :: DebugInfo/Generic/restrict.ll
LLVM :: DebugInfo/Generic/tu-composite.ll
LLVM :: Linker/type-unique-type-array-a.ll
LLVM :: Linker/type-unique-simple2.ll
Fixing an incorrect DW_OP_deref
LLVM :: DebugInfo/Generic/2010-05-03-OriginDIE.ll
Fixing a missing DW_OP_deref
LLVM :: DebugInfo/Generic/incorrect-variable-debugloc.ll
Additionally, clang should no longer complain during bootstrap should no
longer happen after r257534.
The original commit message was:
```
Summary:
Teach the Verifier to make sure that the storage size given to llvm.dbg.declare
or the value size given to llvm.dbg.value agree with what is declared in
DebugInfo. This is implicitly assumed in a number of passes (e.g. in SROA).
Additionally this catches a number of common mistakes, such as passing a
pointer when a value was intended or vice versa.
One complication comes from stack coloring which modifies the original IR when
it merges allocas in order to make sure that if AA falls back to the IR it gets
the correct result. However, given this new invariant, indiscriminately
replacing one alloca by a different (differently sized one) is no longer valid.
Fix this by just undefing out any use of the alloca in a dbg.declare in this
case.
Additionally, I had to fix a number of test cases. Of particular note:
- I regenerated dbg-changes-codegen-branch-folding.ll from the given source as
it was affected by the bug fixed in r256077
- two-cus-from-same-file.ll was changed to avoid having a variable-typed debug
variable as that would depend on the target, even though this test is
supposed to be generic
- I had to manually declared size/align for reference type. See also the
discussion for D14275/r253186.
- fpstack-debuginstr-kill.ll required changing `double` to `long double`
- most others were just a question of adding OP_deref
```
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257550
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 13 Jan 2016 00:27:24 +0000 (00:27 +0000)]
Rollback r257547 -- buildbot failure TBI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257549
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Wed, 13 Jan 2016 00:25:36 +0000 (00:25 +0000)]
For llvm-objdump, add the option -private-header (without the trailing ’s’)
to only print the first private header.
Which for Mach-O files only prints the Mach header and not the subsequent load
commands. Which is used by scripts to match what the darwin otool(1) with the
-h flag does without the -l flag.
For non-Mach-O files it has the same functionality as -private-headers (with
the trailing ’s’).
rdar://
24158331
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257548
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 13 Jan 2016 00:16:43 +0000 (00:16 +0000)]
[Coverage] Refactor coverage mapping reader code /NFC
In this refactoring, member functions are introduced to access
CovMap header/func record members and hide layout details. This
will enable further code restructuring to support reading multiple
versions of coverage mapping data with shared/templatized code.
(When coveremap format version changes, backward compatibtility
should be preserved).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257547
91177308-0d34-0410-b5e6-
96231b3b80d8
Ana Pazos [Wed, 13 Jan 2016 00:03:35 +0000 (00:03 +0000)]
Guard fabs to bfc convert with V6T2 flag
Summary:
BFC instructions are available in ARMv6T2 and above.
Reviewers: t.p.northover
Subscribers: aemerson
Differential Revision: http://reviews.llvm.org/D16076
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257546
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Wed, 13 Jan 2016 00:02:40 +0000 (00:02 +0000)]
[ARM] Mark VMOV with immediate: isAsCheapAsMove.
VMOVs are not strictly speaking cheap, but they are as expensive as a vector
copy (VORR), so we should prefer rematerialization over splitting when it
applies.
rdar://problem/
23754176
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257545
91177308-0d34-0410-b5e6-
96231b3b80d8
Fiona Glaser [Tue, 12 Jan 2016 23:37:30 +0000 (23:37 +0000)]
CannotBeOrderedLessThanZero: add some missing cases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257542
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Tue, 12 Jan 2016 23:28:42 +0000 (23:28 +0000)]
COFF: Teach llvm-objdump how to dump DLL forwarder symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257539
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Tue, 12 Jan 2016 23:03:40 +0000 (23:03 +0000)]
[WebAssembly] Fix disassembler shared-libs build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257536
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 12 Jan 2016 22:57:35 +0000 (22:57 +0000)]
RegisterPressure: Expose RegisterOperands API
Previously the RegisterOperands have only been used internally in
RegisterPressure.cpp. However this datastructure can be useful for other
tasks as well and allows refactoring of PDiff initialisation out of
RPTracker::recede().
This patch:
- Exposes RegisterOperands as public API
- Splits RPTracker::recede() into a part that skips DebugValues and
maintains the region borders, and the core that changes register
pressure when given a set of RegisterOperands.
- This allows to move the PDiff initialisation out recede() into a
method of the PressureDiffs class.
- The upcoming subregister scheduling code will also use
RegisterOperands to avoid pushing more unrelated functionality into
recede()/advance().
Differential Revision: http://reviews.llvm.org/D15473
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257535
91177308-0d34-0410-b5e6-
96231b3b80d8
Keno Fischer [Tue, 12 Jan 2016 22:46:09 +0000 (22:46 +0000)]
[Utils] Insert DW_OP_bit_piece when only describing part of the variable
Summary: The dbg.declare -> dbg.value conversion looks through any zext/sext
to find a value to describe the variable (in the expectation that those
zext/sext instruction will go away later). However, those values do not
cover the entire variable and thus need a DW_OP_bit_piece.
Reviewers: aprantl
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16061
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257534
91177308-0d34-0410-b5e6-
96231b3b80d8
Nathan Slingerland [Tue, 12 Jan 2016 22:34:00 +0000 (22:34 +0000)]
[Support] Add saturating multiply-add support function
Summary: Add SaturatingMultiplyAdd convenience function template since A + (X * Y) comes up frequently when doing weighted arithmetic.
Reviewers: davidxl, silvas
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D15385
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257532
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 12 Jan 2016 21:58:20 +0000 (21:58 +0000)]
[CodeView] Initialize column-end to zero
CodeView, unlike DWARF, can associate code with a range of columns.
However, LLVM can only represent a single column position internally.
We used to claim that the end column and start column were the same
which yielded less than satisfactory results: we would stop printing at
the _beginning_ of the source expression! Instead, mark the column-end
as 'zero' to indicate that we don't have one (as per the documentation
for IDiaLineNumber::get_lineNumberEnd).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257528
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 12 Jan 2016 21:27:55 +0000 (21:27 +0000)]
[WebAsssembly] Register the MC register info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257525
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Tue, 12 Jan 2016 21:19:17 +0000 (21:19 +0000)]
[AVX512] adding PROLQ and PROLD Intrinsics
Differential Revision: http://reviews.llvm.org/D16048
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257523
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 12 Jan 2016 21:01:30 +0000 (21:01 +0000)]
[WebAssembly] Fix a test to work even when the integrated assembler is enabled.
Add -no-integrated-as to this test, since it's testing inline asm strings
that aren't actually valid assembly syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257519
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Tue, 12 Jan 2016 21:00:43 +0000 (21:00 +0000)]
Codegen: [PPC] Handle weighted comparisons when inserting selects.
Only non-weighted predicates were handled in PPCInstrInfo::insertSelect. Handle
the weighted predicates as well.
This latent bug was triggered by r255398, because it added use of the
branch-weighted predicates.
While here, switch over an enum instead of an int to get the compiler to enforce
totality in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257518
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 12 Jan 2016 20:56:01 +0000 (20:56 +0000)]
[WebAssembly] Add a EM_WEBASSEMBLY value, and several bits of code that use it.
A request has been made to the official registry, but an official value is
not yet available. This patch uses a temporary value in order to support
development. When an official value is recieved, the value of EM_WEBASSEMBLY
will be updated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257517
91177308-0d34-0410-b5e6-
96231b3b80d8