OSDN Git Service
Reid Kleckner [Wed, 5 Oct 2016 18:36:02 +0000 (18:36 +0000)]
Improve DEBUG_VALUE assembly comments for spilled bitpieces
Previously we would give up when we saw the bitpiece DWARF expression
and print "[complex expression]" when actually we handled bitpiece
expressions outside the loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283355
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthew Simpson [Wed, 5 Oct 2016 18:30:36 +0000 (18:30 +0000)]
[LV] Add helper function for predicated block probability (NFC)
The cost model has to estimate the probability of executing predicated blocks.
However, we currently always assume predicated blocks have a 50% chance of
executing (this value is hardcoded in several places throughout the code).
Since we always use the same value, this patch adds a helper function for
getting this uniform probability. The function simplifies some comments and
makes our assumptions more clear. In the future, we may want to extend this
with actual block probability information if it's available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283354
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Wed, 5 Oct 2016 18:26:19 +0000 (18:26 +0000)]
[mips][ias] fix li macro when values are negated with ~
The integrated assembler evaluates the expressions such as ~0x80000000 to
0xffffffff7fffffff early in the parsing process. This patch adds compatibility
with gas so that li loads the expected value (0x7fffffff) in those cases. This
only occurs iff all the upper 32bits are set and maintains existing checks by
not truncating the result down to 32 bits if any of the the upper bits are not
set.
Reviewers: dsanders, zoran.jovanovic
Differential Review: https://reviews.llvm.org/D23399
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283353
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthew Simpson [Wed, 5 Oct 2016 17:52:34 +0000 (17:52 +0000)]
[LV] Add isScalarWithPredication helper function (NFC)
This patch adds a single helper function for checking if an instruction will be
scalarized with predication. Such instructions include conditional stores and
instructions that may divide by zero. Existing checks have been updated to use
the new function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283350
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Wed, 5 Oct 2016 17:42:02 +0000 (17:42 +0000)]
Revert "[asan] LLVM: Switch to using dynamic shadow offset on iOS"
This reverts commit
abe77a118615cd90b0d7f127e4797096afa2b394.
Revert as these changes broke a Chromium buildbot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283348
91177308-0d34-0410-b5e6-
96231b3b80d8
Bjorn Pettersson [Wed, 5 Oct 2016 17:40:27 +0000 (17:40 +0000)]
[DAG] Teach computeKnownBits and ComputeNumSignBits in SelectionDAG to look through EXTRACT_VECTOR_ELT.
Summary: Both computeKnownBits and ComputeNumSignBits can now do a simple
look-through of EXTRACT_VECTOR_ELT. It will compute the result based
on the known bits (or known sign bits) for the vector that the element
is extracted from.
Reviewers: bogner, tstellarAMD, mkuper
Subscribers: wdng, RKSimon, jyknight, llvm-commits, nhaehnle
Differential Revision: https://reviews.llvm.org/D25007
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283347
91177308-0d34-0410-b5e6-
96231b3b80d8
Bjorn Pettersson [Wed, 5 Oct 2016 17:22:11 +0000 (17:22 +0000)]
Test commit permission. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283346
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 5 Oct 2016 17:04:36 +0000 (17:04 +0000)]
Fix build due to comparison of std::pairs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283342
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 5 Oct 2016 16:54:09 +0000 (16:54 +0000)]
Add llvm::enumerate() range adapter.
This allows you to enumerate over a range using a range-based
for while the return type contains the index of the enumeration.
Differential revision: https://reviews.llvm.org/D25124
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283337
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 5 Oct 2016 16:33:03 +0000 (16:33 +0000)]
Don't pass null to memcpy. Should fix the asan bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283336
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Wed, 5 Oct 2016 16:11:01 +0000 (16:11 +0000)]
Recommit: "[mips] Add rsqrt, recip for MIPS"
Add rsqrt.[ds], recip.[ds] for MIPS. Correct the microMIPS definitions for
architecture support and register usage.
Reviewers: vkalintiris, zoran.jovanoic
Differential Review: https://reviews.llvm.org/D24499
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283334
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 5 Oct 2016 15:39:27 +0000 (15:39 +0000)]
Revert r282920 "X86: Allow conditional tail calls in Win64 "leaf" functions (PR26302)"
This is suspected to cause a miscompile in Chromium. Reverting while
investigating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283329
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Wed, 5 Oct 2016 15:28:33 +0000 (15:28 +0000)]
Revert "[mips] Add rsqrt, recip for MIPS"
This reverts commit r282485 which contain two patches instead of
one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283327
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Katzman [Wed, 5 Oct 2016 15:23:35 +0000 (15:23 +0000)]
[X86] Don't randomly encode %rip where illegal
Differential Revision: https://reviews.llvm.org/D25112
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283326
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Wed, 5 Oct 2016 14:52:13 +0000 (14:52 +0000)]
[Thumb] Don't try and emit LDRH/LDRB from the constant pool
This is not a valid encoding - these instructions cannot do PC-relative addressing.
The underlying problem here is of whitelist in ARMISelDAGToDAG that unwraps ARMISD::Wrappers during addressing-mode selection. This didn't realise TargetConstantPool was actually possible, so didn't handle it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283323
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Katzman [Wed, 5 Oct 2016 14:46:14 +0000 (14:46 +0000)]
[X86] Fix some tests that didn't assert anything
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283322
91177308-0d34-0410-b5e6-
96231b3b80d8
Oren Ben Simhon [Wed, 5 Oct 2016 14:12:41 +0000 (14:12 +0000)]
Test commit permission
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283319
91177308-0d34-0410-b5e6-
96231b3b80d8
Oren Ben Simhon [Wed, 5 Oct 2016 13:48:33 +0000 (13:48 +0000)]
Test commit permission
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283318
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Wed, 5 Oct 2016 13:38:29 +0000 (13:38 +0000)]
[AVR] Don't select 'MOVW' instructions when they are not supported
We have a subtarget feature which we were ignoring, which was causing us
to generate unsupported instructions for some older chips.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283317
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Wed, 5 Oct 2016 13:27:30 +0000 (13:27 +0000)]
[AVR] Add AVRRegisterInfo::splitReg function
No tests are included just yet - this is used from the pseudo
instruction expander pass, which hasn't been pulled in-tree yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283316
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 5 Oct 2016 13:15:06 +0000 (13:15 +0000)]
Fix machine operand traversal in ScheduleDAGInstrs::fixupKills
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283315
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Wed, 5 Oct 2016 12:32:24 +0000 (12:32 +0000)]
[AVR] Update return type of dynamic alloca pass
It was recently changed from 'const char*' to StringRef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283312
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Wed, 5 Oct 2016 11:48:56 +0000 (11:48 +0000)]
[AVR] Add the AVR frame lowering code
Summary: This allows AVR to lower frames into assembly code.
Reviewers: arsenm, kparzysz
Subscribers: japaric, wdng, beanz, mgorny
Differential Revision: https://reviews.llvm.org/D25032
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283311
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Wed, 5 Oct 2016 10:28:45 +0000 (10:28 +0000)]
[AVR] Split all of the AVR device definitions into a separate file
We have ~500 lines of subtarget feature definitions, they don't belong
in our main TableGen file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283310
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Wed, 5 Oct 2016 10:23:38 +0000 (10:23 +0000)]
[AVR] Enable the instruction printer in the target definition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283309
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Wed, 5 Oct 2016 10:20:33 +0000 (10:20 +0000)]
[AVR] Add definitions for the ATTiny102 and ATtiny104 chips
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283308
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 5 Oct 2016 05:59:29 +0000 (05:59 +0000)]
Re-commit "Use StringRef in Support/Darf APIs (NFC)"
This reverts commit r283285 and re-commit r283275 with
a fix for format("%s", Str); where Str is a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283298
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Wed, 5 Oct 2016 05:30:19 +0000 (05:30 +0000)]
[AVR] Add the machine code backend
Summary:
This adds the AVR machine code backend (`AVRAsmBackend.cpp`). This will
allow us to generate machine code from assembled AVR instructions.
Reviewers: arsenm, kparzysz
Subscribers: modocache, japaric, wdng, beanz, mgorny
Differential Revision: https://reviews.llvm.org/D25029
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283297
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Wed, 5 Oct 2016 05:20:08 +0000 (05:20 +0000)]
[Support][CommandLine] Add cl::getRegisteredSubcommands()
This should allow users of the library to get a range to iterate through
all the subcommands that are registered to the global parser. This
allows users to define subcommands in libraries that self-register to
have dispatch done at a different stage (like main). It allows for
writing code like the following:
for (auto *S : cl::getRegisteredSubcommands()) {
if (*S) {
// Dispatch on S->getName().
}
}
This change also contains tests that show this usage pattern.
Reviewers: zturner, dblaikie, echristo
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D24489
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283296
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 5 Oct 2016 01:41:11 +0000 (01:41 +0000)]
Blind attempt to fix windows build after r283290 - Use StringRef in StringSaver API (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283294
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 5 Oct 2016 01:41:06 +0000 (01:41 +0000)]
Use StringRef in ARMConstantPool APIs (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283293
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Wed, 5 Oct 2016 01:39:29 +0000 (01:39 +0000)]
Revert "Codegen: Tail-duplicate during placement."
This reverts commit
062ace9764953e9769142c1099281a345f9b6bdc.
Issue with loop info and block removal revealed by polly.
I have a fix for this issue already in another patch, I'll re-roll this
together with that fix, and a test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283292
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 5 Oct 2016 01:37:29 +0000 (01:37 +0000)]
Use StringRef in FastISel API (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283291
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 5 Oct 2016 01:32:41 +0000 (01:32 +0000)]
Use StringRef in StringSaver API (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283290
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 5 Oct 2016 01:15:04 +0000 (01:15 +0000)]
Use StringRef in ARCRuntimeEntryPoints APIs (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283288
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 5 Oct 2016 01:09:40 +0000 (01:09 +0000)]
[libFuzzer] add ShrinkValueProfileTest, move code around, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283286
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 5 Oct 2016 01:04:02 +0000 (01:04 +0000)]
Revert "Re-commit "Use StringRef in Support/Darf APIs (NFC)""
One test seems randomly broken: DebugInfo/X86/gnu-public-names.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283285
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 5 Oct 2016 01:02:34 +0000 (01:02 +0000)]
Use StringRef in MCSectionMachO (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283284
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 5 Oct 2016 01:02:22 +0000 (01:02 +0000)]
Use StringRef in DarwinAsmParser (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283283
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Wed, 5 Oct 2016 00:44:52 +0000 (00:44 +0000)]
[LoopDistribute] Fix a typo in the pass name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283282
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 5 Oct 2016 00:37:18 +0000 (00:37 +0000)]
Re-commit "Use StringRef in Support/Darf APIs (NFC)"
This reverts commit r283278 and re-commit r283275 with
the update to fix the build on the LLDB side.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283281
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 5 Oct 2016 00:25:17 +0000 (00:25 +0000)]
[libFuzzer] clear the corpus elements if they are evicted (i.e. smaller elements with proper coverage are found). Make sure we never try to mutate empty element. Print the corpus size in bytes in the status lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283279
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 5 Oct 2016 00:21:14 +0000 (00:21 +0000)]
Revert "Use StringRef in Support/Darf APIs (NFC)"
This reverts commit r283275, it broke LLDB Android debug server.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283278
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 5 Oct 2016 00:15:18 +0000 (00:15 +0000)]
Use StringRef instead of raw pointers in ARMBuildAttrs (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283277
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Tue, 4 Oct 2016 23:55:40 +0000 (23:55 +0000)]
Use StringRef in Support/Darf APIs (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283275
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Tue, 4 Oct 2016 23:54:18 +0000 (23:54 +0000)]
Codegen: Tail-duplicate during placement.
The tail duplication pass uses an assumed layout when making duplication
decisions. This is fine, but passes up duplication opportunities that
may arise when blocks are outlined. Because we want the updated CFG to
affect subsequent placement decisions, this change must occur during
placement.
In order to achieve this goal, TailDuplicationPass is split into a
utility class, TailDuplicator, and the pass itself. The pass delegates
nearly everything to the TailDuplicator object, except for looping over
the blocks in a function. This allows the same code to be used for tail
duplication in both places.
This change, in concert with outlining optional branches, allows
triangle shaped code to perform much better, esepecially when the
taken/untaken branches are correlated, as it creates a second spine when
the tests are small enough.
Issue from previous rollback fixed, and a new test was added for that
case as well.
Differential revision: https://reviews.llvm.org/D18226
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283274
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Tue, 4 Oct 2016 23:47:33 +0000 (23:47 +0000)]
Use StringRef in TableGen (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283273
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Jacob [Tue, 4 Oct 2016 23:32:42 +0000 (23:32 +0000)]
[C API] Add LLVMConstExactUDiv and LLVMBuildExactUDiv functions.
Summary:
These are analog to the existing LLVMConstExactSDiv and LLVMBuildExactSDiv
functions.
Reviewers: deadalnix, majnemer
Subscribers: majnemer, llvm-commits
Differential Revision: https://reviews.llvm.org/D25259
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283269
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Tue, 4 Oct 2016 23:31:39 +0000 (23:31 +0000)]
Use StringRef in TableGen emitted API for attribute (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283268
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 4 Oct 2016 22:43:25 +0000 (22:43 +0000)]
Misc improvements to StringTableBuilder.
This patch adds write methods to StringTableBuilder so that it is
easier to change the underlying implementation.
Using the write methods, avoid creating a temporary buffer when using
mmaped output.
It also uses a more compact key in the DenseMap. Overall this produces
a slightly faster lld:
firefox
master 6.
853419709
patch 6.
841968912 1.00167361138x faster
chromium
master 4.
297280174
patch 4.
298712163 1.00033323147x slower
chromium fast
master 1.
802335952
patch 1.
806872459 1.00251701521x slower
the gold plugin
master 0.
3247149
patch 0.
321971644 1.00852017888x faster
clang
master 0.
551279945
patch 0.
543733194 1.01387951128x faster
llvm-as
master 0.
032743458
patch 0.
032143478 1.01866568391x faster
the gold plugin fsds
master 0.
350814247
patch 0.
348571741 1.00643341309x faster
clang fsds
master 0.
6281672
patch 0.
621130222 1.01132931187x faster
llvm-as fsds
master 0.
030168899
patch 0.
029797155 1.01247582194x faster
scylla
master 3.
104222518
patch 3.
059590248 1.01458766252x faster
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283266
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Tue, 4 Oct 2016 22:39:53 +0000 (22:39 +0000)]
[cpu-detection] Copy simplified version of get_cpuid_max to remove dependency to clang's implementation
Summary:
Attempting to fix PR30384.
Take the same approach as in compiler_rt and add a simplified version of __get_cpuid_max.
Including cpuid.h is no longer needed.
Reviewers: echristo, joerg
Subscribers: mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D24597
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283265
91177308-0d34-0410-b5e6-
96231b3b80d8
David L Kreitzer [Tue, 4 Oct 2016 20:57:19 +0000 (20:57 +0000)]
Revert r283248. It caused failures in the hexagon buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283254
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 4 Oct 2016 20:46:43 +0000 (20:46 +0000)]
[Target] move reciprocal estimate settings from TargetOptions to TargetLowering
The motivation for the change is that we can't have pseudo-global settings for
codegen living in TargetOptions because that doesn't work with LTO.
Ideally, these reciprocal attributes will be moved to the instruction-level via
FMF, metadata, or something else. But making them function attributes is at least
an improvement over the current state.
The ingredients of this patch are:
Remove the reciprocal estimate command-line debug option.
Add TargetRecip to TargetLowering.
Remove TargetRecip from TargetOptions.
Clean up the TargetRecip implementation to work with this new scheme.
Set the default reciprocal settings in TargetLoweringBase (everything is off).
Update the PowerPC defaults, users, and tests.
Update the x86 defaults, users, and tests.
Note that if this patch needs to be reverted, the related clang patch checked in
at r283251 should be reverted too.
Differential Revision: https://reviews.llvm.org/D24816
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283252
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 4 Oct 2016 20:37:43 +0000 (20:37 +0000)]
Next set of additional error checks for invalid Mach-O files for the
load commands that uses the MachO::encryption_info_command and
MachO::encryption_info_command types but not used in llvm libObject
code but used in llvm tool code.
This includes just LC_ENCRYPTION_INFO and
LC_ENCRYPTION_INFO_64 load commands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283250
91177308-0d34-0410-b5e6-
96231b3b80d8
David L Kreitzer [Tue, 4 Oct 2016 20:31:32 +0000 (20:31 +0000)]
[safestack] Requires a valid TargetMachine to be passed to the SafeStack pass.
Patch by Michael LeMay
Differential revision: http://reviews.llvm.org/D24896
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283248
91177308-0d34-0410-b5e6-
96231b3b80d8
Michal Gorny [Tue, 4 Oct 2016 20:25:37 +0000 (20:25 +0000)]
[cmake] Make LIT_COMMAND configurable and improve fallback support
Make LIT_COMMAND configurable, use source tree only when actually
available and extend the default search to other common executable names
'lit.py' and 'lit', in order to increase uniformity between all LLVM
projects and support using installed lit.
Changing the conditional used to determine whether in-tree or external
lit is being used covers the case when LLVM_MAIN_SRC_DIR is defined but
does not exist (anymore). In this case, the functions falls back to
looking for installed lit rather than attempting to use a non-existing
path. The same conditional is used in clang already.
Making LIT_COMMAND a cache variable in case the source tree variant is
used serves two purposes. Firstly, it increases uniformity between
the two branches since find_program() implicitly makes LIT_COMMAND
a cache variable. Secondly, it allows overriding the lit executable used
to run the tests when the LLVM source tree is provided. Gentoo is
planning to use this to use installed (and byte-compiled) lit instead of
re-compiling it in every LLVM project.
Extending default search is meant to increase uniformity between
different LLVM projects. The 'lit.py' name is already used by a few of
them, and 'lit' is the name used by utils/lit/setup.py when installing.
Differential Revision: https://reviews.llvm.org/D25076
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283247
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 4 Oct 2016 19:33:13 +0000 (19:33 +0000)]
[Support] Add case-insensitive versions of StringSwitch members.
This adds support for CaseLower, CasesLower, StartsWithLower, and
EndsWithLower.
Differential revision: https://reviews.llvm.org/D24686
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283244
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 4 Oct 2016 19:28:21 +0000 (19:28 +0000)]
AArch64: Macrofusion: Split features, add missing combinations.
AArch64InstrInfo::shouldScheduleAdjacent() determines whether two
instruction can benefit from macroop fusion on apple CPUs. The list
turned out to be incomplete:
- the "rr" variants of the instructions were missing
- even the "rs" variants can have shift value == 0 and behave like the
"rr" variants
This also splits the MacropFusion target feature into
ArithmeticBccFusion and ArithmeticCbzFusion.
Differential Revision: https://reviews.llvm.org/D25142
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283243
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Aizatsky [Tue, 4 Oct 2016 19:18:23 +0000 (19:18 +0000)]
[sancov] renamed symcov-report-server to coverage-report-server
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283241
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 4 Oct 2016 19:02:29 +0000 (19:02 +0000)]
[asan] LLVM: Switch to using dynamic shadow offset on iOS
The VM layout is not stable between iOS version releases, so switch to dynamic shadow offset.
This is the LLVM counterpart of https://reviews.llvm.org/D25218
Differential Revision: https://reviews.llvm.org/D25219
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283239
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 4 Oct 2016 18:13:45 +0000 (18:13 +0000)]
Don't filter diagnostics written as YAML to the output file
The purpose of the YAML diagnostic output file is to collect information on
optimizations performed, or not performed, for later processing by tools that
help users (and compiler developers) understand how code was optimized. As
such, the diagnostics that appear in the file should not be coupled to what a
user might want to see summarized for them as the compiler runs, and in fact,
because the user likely does not know what optimization diagnostics their tools
might want to use, the user cannot provide a useful filter regardless. As such,
we shouldn't filter the diagnostics going to the output file.
Differential Revision: https://reviews.llvm.org/D25224
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283236
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Tue, 4 Oct 2016 17:44:28 +0000 (17:44 +0000)]
[CMake] Exclude intrinsics_gen from LLVM_COMMON_DEPENDS in LLVMConfig.cmake
CMake requires that all targets expressed as dependencies exist, so we can't have intrinsics_gen in LLVM_COMMON_DEPENDS when it is written out, otherwise projects building out of tree will have CMake errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283234
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Tue, 4 Oct 2016 17:05:04 +0000 (17:05 +0000)]
Serialize remark argument as a mapping to get proper quotation for the value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283231
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Tue, 4 Oct 2016 17:05:01 +0000 (17:05 +0000)]
Allow derived classes of OptimizationRemarkAnalysis in YAML
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283230
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Tue, 4 Oct 2016 15:07:23 +0000 (15:07 +0000)]
[SLPVectorizer] Add a test with non-vectorizable IR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283225
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Tue, 4 Oct 2016 13:48:37 +0000 (13:48 +0000)]
[RS4GC] Handle ShuffleVector instruction in findBasePointer
Summary:
This patch modifies the findBasePointer to handle the shufflevector instruction.
Tests run: RS4GC tests, local downstream tests.
Reviewers: reames, sanjoy
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D25197
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283219
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 4 Oct 2016 13:09:59 +0000 (13:09 +0000)]
Remove duplicated typedef. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283216
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrey Bokhanko [Tue, 4 Oct 2016 12:43:46 +0000 (12:43 +0000)]
Fix IntegerType::MAX_INT_BITS value
IntegerType::MAX_INT_BITS is apparently not in sync with Type::SubclassData
size. This patch fixes this.
Differential Revision: https://reviews.llvm.org/D24814
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283215
91177308-0d34-0410-b5e6-
96231b3b80d8
Nemanja Ivanovic [Tue, 4 Oct 2016 11:25:52 +0000 (11:25 +0000)]
[Power9] Exploit D-Form VSX Scalar memory ops that target full VSX register set
This patch corresponds to review:
The newly added VSX D-Form (register + offset) memory ops target the upper half
of the VSX register set. The existing ones target the lower half. In order to
unify these and have the ability to target all the VSX registers using D-Form
operations, this patch defines Pseudo-ops for the loads/stores which are
expanded post-RA. The expansion then choses the correct opcode based on the
register that was allocated for the operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283212
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Tue, 4 Oct 2016 10:35:07 +0000 (10:35 +0000)]
[mips][fastisel] Consider soft-float an unsupported floating point mode
Treat soft-float as unsupported for fast-isel. Additionally, ensure we check
that lowering f32 arguments also considers the case of soft-float mode.
Reviewers: ehostunreach, vkalintiris, zoran.jovanovic
Differential Review: https://reviews.llvm.org/D24505
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283209
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Tue, 4 Oct 2016 09:25:39 +0000 (09:25 +0000)]
[Object/ELF] - Do not crash on invalid sh_offset value of REL[A] section.
Previously code would access invalid memory and may crash,
patch fixes the issue.
Differential revision: https://reviews.llvm.org/D25187
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283204
91177308-0d34-0410-b5e6-
96231b3b80d8
whitequark [Tue, 4 Oct 2016 09:07:49 +0000 (09:07 +0000)]
[SelectionDAG] Fix calling convention in expansion of ?MULO.
The SMULO/UMULO DAG nodes, when not directly supported by the target,
expand to a multiplication twice as wide. In case that the resulting
type is not legal, an __mul?i3 intrinsic is used. Since the type is
not legal, the legalizer cannot directly call the intrinsic with
the wide arguments; instead, it "pre-lowers" them by splitting them
in halves.
The "pre-lowering" code in essence made assumptions about
the calling convention, specifically that i(N*2) values will be
split into two iN values and passed in consecutive registers in
little-endian order. This, naturally, breaks on a big-endian system,
such as our OR1K out-of-tree backend.
Thanks to James Miller <james@aatch.net> for help in debugging.
Differential Revision: https://reviews.llvm.org/D25223
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283203
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Tue, 4 Oct 2016 08:44:03 +0000 (08:44 +0000)]
[Object/ELF] - Avoid possible crash in getExtendedSymbolTableIndex().
When using broken input object found using AFL,
getExtendedSymbolTableIndex() crashed because ShndxTable
was empty as object does not contain SHT_SYMTAB_SHNDX section.
Differential revision: https://reviews.llvm.org/D25189
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283196
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Tue, 4 Oct 2016 08:03:36 +0000 (08:03 +0000)]
Consistent fp denormal mode names. NFC.
This fixes the inconsistency of the fp denormal option names: in LLVM this was
DenormalType, but in Clang this is DenormalMode which seems better.
Differential Revision: https://reviews.llvm.org/D24906
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283192
91177308-0d34-0410-b5e6-
96231b3b80d8
Nemanja Ivanovic [Tue, 4 Oct 2016 07:37:38 +0000 (07:37 +0000)]
Fix a test case failure on Apple PPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283191
91177308-0d34-0410-b5e6-
96231b3b80d8
Nemanja Ivanovic [Tue, 4 Oct 2016 06:59:23 +0000 (06:59 +0000)]
[Power9] Part-word VSX integer scalar loads/stores and sign extend instructions
This patch corresponds to review:
https://reviews.llvm.org/D23155
This patch removes the VSHRC register class (based on D20310) and adds
exploitation of the Power9 sub-word integer loads into VSX registers as well
as vector sign extensions.
The new instructions are useful for a few purposes:
Int to Fp conversions of 1 or 2-byte values loaded from memory
Building vectors of 1 or 2-byte integers with values loaded from memory
Storing individual 1 or 2-byte elements from integer vectors
This patch implements all of those uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283190
91177308-0d34-0410-b5e6-
96231b3b80d8
Michal Gorny [Tue, 4 Oct 2016 06:09:18 +0000 (06:09 +0000)]
[cmake] Reintroduce (ldconfig-compatible) SOVERSIONs on shared libraries
Reintroduce versioning of shared libraries via SOVERSION, addressing
the issues with the previous design, since Gentoo is relying
on shared-split install of LLVM. The SOVERSIONs were originally
introduced in r229720 for all libraries, and removed in r252093 in favor
of custom SONAME. As far as I understand, the major concern with the old
versioning was that the used versions were incompatible with ldconfig.
Having considered that, this commit introduce SOVERSIONS with the
following considerations:
1. SOVERSIONs are formed of major & minor version concatenated -- i.e.
for 4.0 its .so.40. This matches the common practice where the first
version number indicates ABI breakage, and therefore fixes the issues
with ldconfig. Additionally, VERSION with the remaining verion
components appended is used, however this is not strictly necessary.
2. The versioning is only applied to libraries with no explicit SONAME
specified -- i.e. it won't apply to libLLVM but only to the split
libraries. It will also apply to libraries installed by the subprojects.
3. The versioning is only done on *nix systems, Darwin excluded. This
matches the current use of SONAME.
Differential Revision: https://reviews.llvm.org/D24757
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283189
91177308-0d34-0410-b5e6-
96231b3b80d8
Michal Gorny [Tue, 4 Oct 2016 06:09:14 +0000 (06:09 +0000)]
[cmake] Use separate doctrees to prevent races between Sphinx instances
Use separate doctrees between different Sphinx builders in order to
prevent race condition issues due to multiple Sphinx instances accessing
the same doctree cache in parallel.
Bug: https://llvm.org/bugs/show_bug.cgi?id=23781
Differential Revision: https://reviews.llvm.org/D23755
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283188
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 4 Oct 2016 06:08:46 +0000 (06:08 +0000)]
[libFuzzer] remove dfsan support and some related stale code. This is not being used and as is is pretty weak anyway
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283187
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 4 Oct 2016 03:11:44 +0000 (03:11 +0000)]
[X86] Add MOV8rm_NOREX to switch in isReallyTriviallyReMaterializable to match MOV8rm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283184
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 4 Oct 2016 01:51:44 +0000 (01:51 +0000)]
[libFuzzer] change the probabilities so that we choose only the inputs that are known to be minimal inputs for at least one coverage feature (works only with -shrink=1 for now)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283178
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 4 Oct 2016 01:41:05 +0000 (01:41 +0000)]
AMDGPU: Refactor indirect vector lowering
Allow inserting multiple instructions in the
expanded loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283177
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 4 Oct 2016 01:14:56 +0000 (01:14 +0000)]
AMDGPU: Factor SGPR spilling into separate functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283175
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Tue, 4 Oct 2016 00:38:23 +0000 (00:38 +0000)]
Revert "Codegen: Tail-duplicate during placement."
This reverts commit
ff234efbe23528e4f4c80c78057b920a51f434b2.
Causing crashes on aarch64 build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283172
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gesiak [Tue, 4 Oct 2016 00:15:37 +0000 (00:15 +0000)]
[lit] Remove workaround for Python 2.5
Summary:
The minimum version of Python necessary to run the LLVM test suite is
2.7. Code to work around Python 2.5 and lower isn't necessary.
Reviewers: ddunbar, echristo, delcypher, beanz
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D25209
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283169
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 4 Oct 2016 00:03:55 +0000 (00:03 +0000)]
Make GlobalsAA ignore dead constant expressions.
Slightly improves the precision of GlobalsAA in certain situations, and
makes the behavior of optimization passes more predictable.
Differential Revision: https://reviews.llvm.org/D24104
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283165
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Tue, 4 Oct 2016 00:00:09 +0000 (00:00 +0000)]
Codegen: Tail-duplicate during placement.
The tail duplication pass uses an assumed layout when making duplication
decisions. This is fine, but passes up duplication opportunities that
may arise when blocks are outlined. Because we want the updated CFG to
affect subsequent placement decisions, this change must occur during
placement.
In order to achieve this goal, TailDuplicationPass is split into a
utility class, TailDuplicator, and the pass itself. The pass delegates
nearly everything to the TailDuplicator object, except for looping over
the blocks in a function. This allows the same code to be used for tail
duplication in both places.
This change, in concert with outlining optional branches, allows
triangle shaped code to perform much better, esepecially when the
taken/untaken branches are correlated, as it creates a second spine when
the tests are small enough.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283164
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Mon, 3 Oct 2016 23:12:35 +0000 (23:12 +0000)]
[MSSA] Allow unittests to use BasicAA when building.
We now build MemorySSA in its ctor, instead of waiting until the user
calls MemorySSA::getWalker. This silently changed our unittests, since
we add BasicAA to AAResults *after* constructing MemorySSA (...but
before calling MemorySSA::getWalker).
None of them broke because we do most of our "did this get optimized
correctly?" tests in .ll files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283158
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 3 Oct 2016 22:43:53 +0000 (22:43 +0000)]
[WebAssembly] Update to more stack-machine-oriented terminology.
WebAssembly has officially switched from being an AST to being a stack
machine. Update various bits of terminology and README.md entries
accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283154
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 3 Oct 2016 22:32:21 +0000 (22:32 +0000)]
[WebAssemby] Clean up an obsolete comment.
The comment is present inside the body of GetVRegDef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283153
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Mon, 3 Oct 2016 22:12:42 +0000 (22:12 +0000)]
[lit] Use argparse instead of optparse
Summary:
optparse is deprecated in Python 2.7, which is the minimum version of
Python required to run the LLVM test suite. Replace its usage in lit
with argparse, optparse's 2.7 replacement module.
argparse has several benefits over optparse, but this commit does not
make use of those benefits yet. Instead, it simply uses the new API,
and attempts to keep the number of changes to a minimum.
Confirmed that lit's test suite, as well as LLVM's regression test suite,
still pass with these changes.
Patch By Brian Gesiak!
Reviewers: ddunbar, echristo, beanz, delcypher
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D25173
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283152
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 3 Oct 2016 22:12:37 +0000 (22:12 +0000)]
TargetMachine: Make the win32-macho workaround more specific.
This is to avoid problems with win32 + ELF which surprisingly happens a
lot in practice: If a user just specifies -march on the commandline the
object format changes along with the architecture to ELF in many
instances while the OS stays with the default/host OS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283151
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 3 Oct 2016 22:06:28 +0000 (22:06 +0000)]
[WebAssembly] Delete an unused function. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283150
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 3 Oct 2016 21:58:20 +0000 (21:58 +0000)]
Set some tests to an unknown vendor and OS
This avoids llc using the hosts OS/vendor as defaults and triggering
unwanted behaviour in the tests. This should deal with the buildbot
breakages on windows after r283140.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283149
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Mon, 3 Oct 2016 21:40:50 +0000 (21:40 +0000)]
[LTO] Fix test to not depend on the exact address of symbols, just their linkage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283148
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 3 Oct 2016 21:33:09 +0000 (21:33 +0000)]
[WebAssembly] Fix indentation. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283147
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 3 Oct 2016 21:31:31 +0000 (21:31 +0000)]
[WebAssembly] Rename OPERAND_FP32IMM to OPERAND_F32IMM.
WebAssembly documentation consistently says "f32" rather than "fp32" to
describe 32-bit floating-point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283146
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Mon, 3 Oct 2016 20:20:13 +0000 (20:20 +0000)]
[AArch64][RegisterBankInfo] Add getSameKindofOperandsMapping.
Refactor the code so that the same function can be used for all
instructions with all the same operands for up to 3 operands.
This is going to be useful for cast instructions.
NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283144
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Mon, 3 Oct 2016 20:17:20 +0000 (20:17 +0000)]
[RDF] Fix liveness propagation through shadows
Each shadow only represents data flow that is restricted to its reaching
def. Propagating more than that could lead to spurious register liveness,
resulting in extra (incorrectly) block live-ins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283143
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 3 Oct 2016 20:17:02 +0000 (20:17 +0000)]
AArch64Subtarget: Remove unused CPUString field
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283142
91177308-0d34-0410-b5e6-
96231b3b80d8