Commit Graph

125478 Commits

Author SHA1 Message Date
Xinliang David Li
af14cd0f4b Resubmit r256193 with test fix: assertion failure analyzed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256201 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 21:52:27 +00:00
Xinliang David Li
9a0b6e7b0f Revert r256193: build bot failure triggered
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256198 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 21:00:33 +00:00
Cong Hou
0d04e87535 [X86][SSE] Transform truncations between vectors of integers into X86ISD::PACKUS/PACKSS operations during DAG combine.
This patch transforms truncation between vectors of integers into
X86ISD::PACKUS/PACKSS operations during DAG combine. We don't do it in
lowering phase because after type legalization, the original truncation
will be turned into a BUILD_VECTOR with each element that is extracted
from a vector and then truncated, and from them it is difficult to do
this optimization. This greatly improves the performance of truncations
on some specific types.

Cost table is updated accordingly.


Differential revision: http://reviews.llvm.org/D14588




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256194 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 20:42:43 +00:00
Xinliang David Li
e3e5614a18 [PGO] Fix profile var comdat generation problem with COFF
When targeting COFF, it is required that a comdat section to
have a global obj with the same name as the comdat (except for
comdats with select kind to be associative). This fix makes
sure that the comdat is keyed on the data variable for COFF.

Also improved test coverage for this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256193 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 20:41:20 +00:00
Michael Zolotukhin
4c1d77039a [ValueTracking] Properly handle non-sized types in isAligned function.
Reviewers: apilipenko, reames, sanjoy, hfinkel

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256192 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 20:38:18 +00:00
Adrian Prantl
9e02fe5b4a Fix PR24563 (LiveDebugVariables unconditionally propagates all DBG_VALUEs)
LiveDebugVariables unconditionally propagates all DBG_VALUE down the
dominator tree, which happens to work fine if there already is another
DBG_VALUE or the DBG_VALUE happends to describe a single-assignment vreg
but is otherwise wrong if the DBG_VALUE is coming from only one of the
predecessors.

In r255759 we introduced a proper data flow analysis scheduled after
LiveDebugVariables that correctly propagates DBG_VALUEs across basic block
boundaries. With the new pass in place, the incorrect propagation in
LiveDebugVariables can be retired witout loosing any of the benefits
where LiveDebugVariables happened to do the right thing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256188 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 20:03:00 +00:00
Adrian Prantl
6932e6dcc1 Convert the CodeGen/ARM/sched-it-debug-nodes.ll testcase from IR -> MIR.
NFC
PR24563

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256187 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 19:44:42 +00:00
Adrian Prantl
7deb7ebf88 Teach ARMLoadStoreOptimizer to ignore DBG_VALUE instructions when merging
instructions.

As noted in PR24563.
rdar://problem/23963293

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256183 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 19:25:03 +00:00
Kostya Serebryany
9fc3869acd fix leak in a test, make the sanitizer bot green
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256179 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 19:09:01 +00:00
Tom Stellard
1536863668 AMDGPU/SI: Fix encoding for FLAT_SCRATCH registers on VI
Summary:
These register has different encodings on CI and VI, so we add pseudo
FLAT_SCRACTH registers to be used before MC, and subtarget specific
registers to be used by the MC layer.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256178 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 18:44:27 +00:00
Tom Stellard
0b69fa9484 AMDGPU/SI: Change assembly name for flat scratch registers to flat_scratch
This matches what the assembler accepts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256177 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 18:44:21 +00:00
Matthew Simpson
0ce5d69ee3 [AArch64] Add additional extract-extend patterns for smov
This patch adds to the target description two additional patterns for matching
extract-extend operations to SMOV. The patterns catch the v16i8-to-i64 and
v8i16-to-i64 cases. The existing patterns miss these cases because the
extracted elements must first be legalized to i32, resulting in any_extend
nodes.

This was originally implemented as a DAG combine (r255895), but was reverted
due to failing out-of-tree tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256176 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 18:31:25 +00:00
Teresa Johnson
8c9c853ff4 Add testcase for r256161 (PR25907)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256174 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 18:24:35 +00:00
Chad Rosier
308175c1f1 Remove extra whitespace. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256173 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 18:08:05 +00:00
Teresa Johnson
a677216788 [ThinLTO] Rename variable to reflect bulk importing change (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256171 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 17:33:24 +00:00
Dan Gohman
ce0413b05c [WebAssembly] Convert a regular for loop to a range-based for loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256169 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 17:22:02 +00:00
Dan Gohman
8080c4fd47 [WebAssembly] Clean up comments and fix a missing #include dependency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256168 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 17:19:31 +00:00
Dan Gohman
cd530e1a89 [WebAssembly] Remove an unneeded empty destructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256167 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 17:12:40 +00:00
Dan Gohman
05f8e38b90 [WebAssembly] Enclose the operand variables for load and store instructions in braces.
This allows the AsmMatcherEmitter to properly tokenize the AsmStrings for
load and store instructions. This is a step towards asm parsing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256166 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 16:58:49 +00:00
Dan Gohman
d46c80d0ec [WebAssembly] Mark the ARGUMENT pseudo-instructions as CodeGenOnly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256165 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 16:53:29 +00:00
Dan Gohman
b3061699c5 [WebAssembly] Add some comments and make some minor source cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256164 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 16:50:41 +00:00
Dan Gohman
1a81ad967f Teach MCOperand::print how to print FPImm operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256163 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 16:47:10 +00:00
Teresa Johnson
0e1a49a3ee Remove unused functions from ModuleLinker (NFC)
Remove a couple ModuleLinker methods and a related static function that
are no longer used after the linker split.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256162 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 15:49:59 +00:00
Teresa Johnson
6cfd049a12 Remove overly strict new assert in BitcodeReader.
This fixes a bug introduced by the ThinLTO metadata linking patch
r255909. The assert is overly-strict and while useful in development of
the patch, doesn't seem interesting to keep.

Fixes PR25907.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256161 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 15:38:13 +00:00
Jun Bum Lim
35733957df Revert "[AArch64] Promote loads from stores"
This reverts commit r256004 due to a failure in cortex-a53.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256160 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 15:36:49 +00:00
Chad Rosier
4994844f8b [LIR] Refactor code to enable future patch. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256159 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 14:49:32 +00:00
Chad Rosier
2835413343 [AArch64] Enable PostRAScheduler for AArch64 generic build.
Disable post-ra scheduler for perturbed tests to appease the bots and to
preserve the history of the tests.

http://reviews.llvm.org/D15652

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256158 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 14:43:45 +00:00
Igor Breger
3bb8dc4979 AVX512BW: Enable AND/OR/XOR vector byte/word paked operation by promoting to qword that natively suppored.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256157 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 14:40:36 +00:00
Davide Italiano
005b231d45 [llvm-objdump] Use appropriate helper. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256156 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 14:10:54 +00:00
Amjad Aboud
9889174ead Implemented Support of IA interrupt and exception handlers:
http://lists.llvm.org/pipermail/cfe-dev/2015-September/045171.html

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256155 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 14:07:14 +00:00
Zlatko Buljan
ba4a99ac26 [mips][microMIPS] Implement DERET and DI instructions and check size operand for EXT and DEXT* instructions
Differential Revision: http://reviews.llvm.org/D15570


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256152 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 13:08:58 +00:00
NAKAMURA Takumi
59e6e921b2 check-llvm: Tweak the feature "timestamps" for autoconf.
Note, ENABLE_TIMESTAMPS is either 1 or 0 in Makefile.config.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256138 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 08:46:12 +00:00
David Majnemer
827bc7fe53 [MC, COFF] Unbreak support for COFF timestamps
Support for COFF timestamps was unintentionally broken in r246905 when
it was conditionally available depending on whether or not LLVM was
configured with LLVM_ENABLE_TIMESTAMPS.  However, Config/config.h was
never included which essentially broke the feature.  Due to lax testing,
the breakage was never identified until we observed strange failures
during incremental links of Chromium.

This issue is resolved by simply including Config/config.h in
WinCOFFObjectWriter and teaching lit that the MC/COFF/timestamp.s test
is conditionally supported depending on LLVM_ENABLE_TIMESTAMPS.  With
this in place, we can strengthen the test to ensure that it will not
accidentally get broken in the future.

This fixes PR25891.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256137 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 08:03:07 +00:00
NAKAMURA Takumi
d644801757 [Cygwin] Enable TLS as emutls.
It resolves clang selfhosting with std::once() for Cygwin.

FIXME: It may be EmulatedTLS-generic also for X86-Android.
FIXME: Pass EmulatedTLS to LLVM CodeGen from Clang with -femulated-tls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256134 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 02:37:23 +00:00
Manuel Jacob
65021c4392 [RS4GC] Add an assert which fails if there is a (yet unsupported) addrspacecast.
The slightly strange indentation comes from clang-format.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256132 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 01:26:46 +00:00
Craig Topper
cc004e57d1 [InstCombine] Fix indentation. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256131 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-21 01:02:28 +00:00
Dylan McKay
a8c897c57c [AVR] Added AVRCallingConv.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256130 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-20 23:17:44 +00:00
Craig Topper
372aaa2e26 [X86] Use range-based for loop. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256127 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-20 18:41:57 +00:00
Craig Topper
a1d9ba7078 [X86] Prevent constant hoisting for a couple compare immediates that the selection DAG knows how to optimize into a shift.
This allows "icmp ugt %a, 4294967295" and "icmp uge %a, 4294967296" to be optimized into right shifts by 32 which can fold the immediate into the shift instruction. These patterns show up with some regularity in real code.

Unfortunately, since getImmCost can't see the icmp predicate we can't be tell if we're only catching these specific cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256126 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-20 18:41:54 +00:00
Dylan McKay
9a2a614b98 Add AVR.td and AVRRegisterInfo.td
Summary:
This adds the core AVR TableGen file, along with the register descriptions.

Lines in AVR.td which require other TableGen files which haven't been committed
yet are commented out.

This is a fairly trivial patch, and should only require a quick review.

I kept the line width smaller than 80 columns, but there are a few exceptions
because I'm not sure how to split a string over several lines.

Reviewers: stoklund

Subscribers: dylanmckay, agnat

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256120 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-20 12:16:20 +00:00
Davide Italiano
abe8418ff7 [llvm-objdump] Move COFF function to where it belongs.
Ideally much more stuff should be moved out of llvm-objdump.cpp, but that
will happen later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256118 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-20 09:54:34 +00:00
Xinliang David Li
5a75233380 Fix a bug in test case -- duplicate entries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256117 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-20 08:49:31 +00:00
Xinliang David Li
cb4197f621 Fix a latent UAF bug in profwriter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256116 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-20 08:46:18 +00:00
Weiming Zhao
116cc72ed4 Fix mapping of @llvm.arm.ssat/usat intrinsics to ssat/usat instructions for Thumb2
Summary:
r250697 fixed the mapping for ARM mode. We have to do the same for Thumb2 otherwise the same llvm.arm.ssat() will generate different saturating amount for ARM and Thumb.

r250697: http://reviews.llvm.org/rL250697

Reviewers: rmaprath

Subscribers: aemerson, llvm-commits, rengolin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256115 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-20 06:41:44 +00:00
Xinliang David Li
cfbaf11a0d [PGO] Improve Indexed Profile Reader efficiency
With the support of value profiling added, the Indexed prof
reader gets less efficient. The prof reader initialization
used to be just reading the file header, but with VP support
added, initialization needs to walk through all profile keys
of ondisk hash table resulting in very poor locality and large
memory increase (keys are stored together with the profile data
in the mapped profile buffer). Even worse, when the reader is 
used by the compiler (not llvm-profdata too), the penalty becomes
very high as compilation of each single module requires touching
profile data buffer for the whole program. 

In this patch, the icall target values (MD5hash) are no longer eargerly 
converted back to name strings when the data is read into memory. New
interface is added to to profile reader so that InstrProfSymtab can be
lazily created for Indexed profile reader on-demand. Creating of the 
symtab is intended to be used by llvm-profdata tool for symbolic dumping
of  VP data. It can be used with compiler (for legacy out of tree uses)
too but not recommended due to compile time and memory reasons 
mentioned above.

Some other cleanups are also included: Function Addr to md5 map is now
consolated into InstrProfSymtab. InstrProfStringtab is no longer used and
eliminated.







git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256114 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-20 06:22:13 +00:00
Xinliang David Li
272ce19ebd Minor clean up -- move large single use method out of header(NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256113 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-20 05:15:45 +00:00
NAKAMURA Takumi
01e490b9cf Revert r219171, "llvm/test/lit.cfg: Suppress dwarf stuff for targeting x86_64-mingw32 while investigating since r219108."
It has been fixed since r219280 by David Majnemer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256112 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-20 03:48:23 +00:00
Mehdi Amini
ec9022de4b ThreadPool unittests: do not hold mutex when calling condition_variable:notify()
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256111 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19 22:56:24 +00:00
Sanjoy Das
1d8492ee7d Nonnull elements in OperandBundleCallSites are not all Instructions
`CloneAndPruneIntoFromInst` sometimes RAUW's dead instructions with
`undef` before erasing them (to avoid deleting instructions that still
have uses).  This changes the `WeakVH` in `OperandBundleCallSites` to
hold an `undef`, and we need to guard for this situation in eventuality
in `llvm::InlineFunction`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256110 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19 22:40:28 +00:00
Sanjoy Das
269b8a6713 [Deopt bundles] Fix a test case
The `CHECK-NOT` line was incorrect, and would not have caught a
breakage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256109 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-19 22:40:22 +00:00