OSDN Git Service
Kostya Serebryany [Thu, 1 Dec 2016 18:02:07 +0000 (18:02 +0000)]
[libFuzzer] add a test for r288389 (-rss_limit_mb=0 means no limit).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288392
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Thu, 1 Dec 2016 18:00:50 +0000 (18:00 +0000)]
[SystemZ] Fix fallout from r288374
Avoid undefined behavior due to too-large shift count.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288391
91177308-0d34-0410-b5e6-
96231b3b80d8
Weiming Zhao [Thu, 1 Dec 2016 18:00:36 +0000 (18:00 +0000)]
[AsmParser] Diagnose empty symbol for .set directive
Summary: Diagnose empty symbol to avoid hitting assertion in MCContext::getOrCreateSymbol
Reviewers: eli.friedman, rengolin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26728
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288390
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 1 Dec 2016 17:56:15 +0000 (17:56 +0000)]
[libFuzzer] treat -rss_limit_mb=0 as no limit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288389
91177308-0d34-0410-b5e6-
96231b3b80d8
Kuba Mracek [Thu, 1 Dec 2016 17:45:22 +0000 (17:45 +0000)]
Recommit r287403 (reverted in r287804): [lit] When setting SDKROOT on Darwin, use '--sdk macosx' to find the right SDK path.
This shouls now be safe and not break any more bots. It's strictly better to use '--sdk macosx', otherwise xcrun can return weird things for example when you have Command Line Tools or the SDK installed into '/'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288385
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Thu, 1 Dec 2016 17:34:50 +0000 (17:34 +0000)]
[GVN, OptDiag] Print the interesting instructions involved in missed load-elimination
[recommitting after the fix in r288307]
This includes the intervening store and the load/store that we're trying
to forward from in the optimization remark for the missed load
elimination.
This is hooked up under a new mode in ORE that allows for compile-time
budget for a bit more analysis to print more insightful messages. This
mode is currently enabled for -fsave-optimization-record (-Rpass is
trickier since it is controlled in the front-end).
With this we can now print the red remark in http://lab.llvm.org:8080/artifacts/opt-view_test-suite/build/SingleSource/Benchmarks/Dhrystone/CMakeFiles/dry.dir/html/_org_test-suite_SingleSource_Benchmarks_Dhrystone_dry.c.html#L446
Differential Revision: https://reviews.llvm.org/D26490
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288381
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Thu, 1 Dec 2016 17:34:44 +0000 (17:34 +0000)]
[GVN, OptDiag] Include the value that is forwarded in load elimination
[recommitting after the fix in r288307]
This requires some changes to the opt-diag API. Hal and I have
discussed this at the Dev Meeting and came up with a streaming delimiter
(setExtraArgs) to solve this.
Arguments after this delimiter are only included in the optimization
records and not in the remarks printed in the compiler output. (Note,
how in the test the content of the YAML file changes but the remarks on
the compiler output don't.)
This implements the green GVN message with a bug fix at line
http://lab.llvm.org:8080/artifacts/opt-view_test-suite/build/SingleSource/Benchmarks/Dhrystone/CMakeFiles/dry.dir/html/_org_test-suite_SingleSource_Benchmarks_Dhrystone_dry.c.html#L446
The fix is that now we properly include the constant value in the
message: "load of type i32 eliminated in favor of 7"
Differential Revision: https://reviews.llvm.org/D26489
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288380
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Thu, 1 Dec 2016 17:26:54 +0000 (17:26 +0000)]
[SLP] Additional tests with the cost of vector operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288377
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Thu, 1 Dec 2016 17:10:27 +0000 (17:10 +0000)]
[SystemZ] Fix applyFixup for 12-bit fixups
Now that we have fixups that only fill parts of a byte, it turns
out we have to mask off the bits outside the fixup area when
applying them. Failing to do so caused invalid object code to
be emitted for bprp with a negative 12-bit displacement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288374
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Thu, 1 Dec 2016 16:45:04 +0000 (16:45 +0000)]
Revert "[SLP] Additional tests with the cost of vector operations."
This reverts commit
a61718435fc4118c82f8aa6133fd81f803789c1e.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288371
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Thu, 1 Dec 2016 16:40:32 +0000 (16:40 +0000)]
[GVN] Basic optimization remark support
[recommitting after the fix in r288307]
Follow-on patches will add more interesting cases.
The goal of this patch-set is to get the GVN messages printed in
opt-viewer from Dhrystone as was presented in my Dev Meeting talk. This
is the optimization view for the function (the last remark in the
function has a bug which is fixed in this series):
http://lab.llvm.org:8080/artifacts/opt-view_test-suite/build/SingleSource/Benchmarks/Dhrystone/CMakeFiles/dry.dir/html/_org_test-suite_SingleSource_Benchmarks_Dhrystone_dry.c.html#L430
Differential Revision: https://reviews.llvm.org/D26488
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288370
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Thu, 1 Dec 2016 16:11:48 +0000 (16:11 +0000)]
[SLP] Additional tests with the cost of vector operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288369
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 1 Dec 2016 16:00:14 +0000 (16:00 +0000)]
[X86][SSE] Classify AND bitmasks as variable shuffle masks
They are loading the bitmasks from the constant pool so the cost is similar to loading a shuffle mask.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288367
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 1 Dec 2016 15:41:40 +0000 (15:41 +0000)]
[X86][SSE] Add support for combining AND bitmasks to shuffles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288365
91177308-0d34-0410-b5e6-
96231b3b80d8
Pavel Labath [Thu, 1 Dec 2016 15:20:34 +0000 (15:20 +0000)]
Remove iostream include from WasmObjectFile
The file does not seems to use c++ iostreams (and is is llvm policy to avoid
that). Committing as obvious.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288364
91177308-0d34-0410-b5e6-
96231b3b80d8
Asaf Badouh [Thu, 1 Dec 2016 15:19:10 +0000 (15:19 +0000)]
[LMT] Restrict nop length to one
not all lakemont MCU support long nop.
we can't assume we can generate long nop by default for MCU.
Differential Revision: https://reviews.llvm.org/D26895
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288363
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 1 Dec 2016 14:56:48 +0000 (14:56 +0000)]
[X86][SSE] Tidied up filecheck prefixes for uitofp fast-math tests.
They should be in 'narrowing' order from common to more specific test prefixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288338
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Thu, 1 Dec 2016 14:33:50 +0000 (14:33 +0000)]
Silence GCC's -Wenum-compare after r288335 in the same way it is done
in X86FastISel.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288337
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolai Haehnle [Thu, 1 Dec 2016 14:04:13 +0000 (14:04 +0000)]
[SelectionDAG] Rename and clarify visitFMULForFMADCombine (NFC)
Summary: Suggested by @spatel in D26602.
Reviewers: spatel, hfinkel
Subscribers: spatel, llvm-commits
Differential Revision: https://reviews.llvm.org/D27260
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288336
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 1 Dec 2016 13:47:02 +0000 (13:47 +0000)]
[X86][SSE] Add support for combining target shuffles to AND bitmasks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288335
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 1 Dec 2016 11:52:37 +0000 (11:52 +0000)]
[X86][SSE] Add support for combining ISD::AND with shuffles.
Attempts to convert an AND with a vector of 255 or 0 values into a shuffle (blend) mask.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288333
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 1 Dec 2016 11:26:07 +0000 (11:26 +0000)]
[X86][SSE] Added tests showing missed combines of shuffles with ANDs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288330
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 1 Dec 2016 08:48:14 +0000 (08:48 +0000)]
[SCCP] Switch over to DEBUG() and drop an #ifdef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288325
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 1 Dec 2016 08:36:12 +0000 (08:36 +0000)]
[SCCP] Prefer `auto` when the type is obvious. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288324
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 1 Dec 2016 07:50:12 +0000 (07:50 +0000)]
Temporarily Revert "Move most EH from MachineModuleInfo to MachineFunction"
This apprears to have broken the global isel bot:
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-globalisel_build/5174/console
This reverts commit r288293.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288322
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 1 Dec 2016 07:00:35 +0000 (07:00 +0000)]
Object: Set SF_Indirect in ModuleSymbolTable.
This lets us remove the last use of IRObjectFile::getSymbolGV() in llvm-nm.
Differential Revision: https://reviews.llvm.org/D27076
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288321
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 1 Dec 2016 06:53:47 +0000 (06:53 +0000)]
Object: Add SF_Executable symbol flag.
This allows us to remove a few uses of IRObjectFile::getSymbolGV() in
llvm-nm.
While here change host-dependent logic in llvm-nm to target-dependent
logic.
Differential Revision: https://reviews.llvm.org/D27075
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288320
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 1 Dec 2016 06:51:47 +0000 (06:51 +0000)]
Object: Extract a ModuleSymbolTable class from IRObjectFile.
This class represents a symbol table built from in-memory IR. It provides
access to GlobalValues and should only be used if such access is required
(e.g. in the LTO implementation). We will eventually change IRObjectFile
to read from a bitcode symbol table rather than using ModuleSymbolTable,
so it would not be able to expose the module.
Differential Revision: https://reviews.llvm.org/D27073
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288319
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 1 Dec 2016 06:21:08 +0000 (06:21 +0000)]
Bitcode: The index used by ModuleSummaryIndexBitcodeReader is now required, so make it a reference. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288318
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 1 Dec 2016 06:00:53 +0000 (06:00 +0000)]
Bitcode: Introduce BitcodeModule::{has,get}Summary().
These are equivalent to hasGlobalValueSummary() and getModuleSummaryIndex().
Differential Revision: https://reviews.llvm.org/D27242
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288317
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 1 Dec 2016 05:52:32 +0000 (05:52 +0000)]
LTO: Remove ModuleLoader, make loadModuleFromBuffer static and move into its only client, ThinLTOCodeGenerator.
This is no longer the recommended way to load modules for importing, so it should not be public API.
Differential Revision: https://reviews.llvm.org/D27292
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288316
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 1 Dec 2016 05:47:58 +0000 (05:47 +0000)]
Bitcode: Correctly handle Fixed and VBR arrays in BitstreamCursor::skipRecord().
The assertions were wrong; we need to call getEncodingData() on the element,
not the array. While here, simplify the skipRecord() implementation for Fixed
and Char6 arrays. This is tested by the code I added to llvm-bcanalyzer
which makes sure that we can skip any record.
Differential Revision: https://reviews.llvm.org/D27241
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288315
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 1 Dec 2016 04:37:35 +0000 (04:37 +0000)]
Revert previous whitespace change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288312
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 1 Dec 2016 04:37:09 +0000 (04:37 +0000)]
Test commit of whitespace to check permissions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288311
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Thu, 1 Dec 2016 03:56:43 +0000 (03:56 +0000)]
[GVN] When merging blocks update LoopInfo if it's available
If LoopInfo is available during GVN, BasicAA will use it. However
MergeBlockIntoPredecessor does not update LI as it merges blocks.
This didn't use to cause problems because LI was freed before
GVN/BasicAA. Now with OptimizationRemarkEmitter, the lifetime of LI is
extended so LI needs to be kept up-to-date during GVN.
Differential Revision: https://reviews.llvm.org/D27288
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288307
91177308-0d34-0410-b5e6-
96231b3b80d8
Ivan Krasin [Thu, 1 Dec 2016 02:54:54 +0000 (02:54 +0000)]
Use trigrams to speed up SpecialCaseList.
Summary:
it's often the case when the rules in the SpecialCaseList
are of the form hel.o*bar. That gives us a chance to build
trigram index to quickly discard 99% of inputs without
running a full regex. A similar idea was used in Google Code Search
as described in the blog post:
https://swtch.com/~rsc/regexp/regexp4.html
The check is defeated, if there's at least one regex
more complicated than that. In this case, all inputs
will go through the regex. That said, the real-world
rules are often simple or can be simplied. That considerably
speeds up compiling Chromium with CFI and UBSan.
As measured on Chromium's content_message_generator.cc:
before, CFI: 44 s
after, CFI: 23 s
after, CFI, no blacklist: 23 s (~1% slower, but 3 runs were unable to show the difference)
after, regular compilation to bitcode: 23 s
Reviewers: pcc
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D27188
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288303
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 1 Dec 2016 02:51:12 +0000 (02:51 +0000)]
LTO: Remove Symbol::getIRName().
Its only use was in the LTO implementation. Also document
Symbol::getName().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288302
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 1 Dec 2016 02:06:56 +0000 (02:06 +0000)]
revert r288283 as it causes debug info (line numbers) to be lost in instrumented code. also revert r288299 which was a workaround for the problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288300
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 1 Dec 2016 01:33:44 +0000 (01:33 +0000)]
[libFuzzer] temporary disable a part of the test broken by r288283
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288299
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Thu, 1 Dec 2016 00:11:15 +0000 (00:11 +0000)]
[WebAssembly] Emit .import_global assembler directives
Support a new assembler directive, .import_global, to declare imported
global variables (i.e. those with external linkage and no
initializer). The linker turns these into wasm imports.
Patch by Jacob Gravelle
Differential Revision: https://reviews.llvm.org/D26875
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288296
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 30 Nov 2016 23:49:01 +0000 (23:49 +0000)]
Move most EH from MachineModuleInfo to MachineFunction
Most of the exception handling members in MachineModuleInfo is actually
per function data (talks about the "current function") so it is better
to keep it at the function instead of the module.
This is a necessary step to have machine module passes work properly.
Also:
- Rename TidyLandingPads() to tidyLandingPads()
- Use doxygen member groups instead of "//===- EH ---"... so it is clear
where a group ends.
- I had to add an ugly const_cast at two places in the AsmPrinter
because the available MachineFunction pointers are const, but the code
wants to call tidyLandingPads() in between
(markFunctionEnd()/endFunction()).
Differential Revision: https://reviews.llvm.org/D27227
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288293
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 30 Nov 2016 23:48:50 +0000 (23:48 +0000)]
Move VariableDbgInfo from MachineModuleInfo to MachineFunction
VariableDbgInfo is per function data, so it makes sense to have it with
the function instead of the module.
This is a necessary step to have machine module passes work properly.
Differential Revision: https://reviews.llvm.org/D27186
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288292
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 30 Nov 2016 23:48:42 +0000 (23:48 +0000)]
Move FrameInstructions from MachineModuleInfo to MachineFunction
This is per function data so it is better kept at the function instead
of the module.
This is a necessary step to have machine module passes work properly.
Differential Revision: https://reviews.llvm.org/D27185
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288291
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 30 Nov 2016 23:48:26 +0000 (23:48 +0000)]
MCStreamer: Use "cfi" for CFI related temp labels.
Choosing a "cfi" name makes the intend a bit clearer in an assembly dump
and more importantly the assembly dumps are slightly more stable as the
numbers don't move around anymore when unrelated code calls
createTempSymbol() more or less often.
As they are temp labels the name doesn't influence the generated object
code.
Differential Revision: https://reviews.llvm.org/D27244
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288290
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 30 Nov 2016 23:19:05 +0000 (23:19 +0000)]
llvm-lto2: Simpler workaround for PR30396.
Maintain the command line resolutions as a map to a list of resolutions
rather than a single resolution, and apply the resolutions in the order
observed. This is not only simpler but allows us to test the scenario where
the two symbols have different resolutions.
Differential Revision: https://reviews.llvm.org/D27285
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288288
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Wed, 30 Nov 2016 23:14:27 +0000 (23:14 +0000)]
[PS4] Tighten up a triple check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288286
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Wed, 30 Nov 2016 23:10:42 +0000 (23:10 +0000)]
Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288285
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Wed, 30 Nov 2016 22:49:55 +0000 (22:49 +0000)]
Recommit r288212: Emit 'no line' information for interesting 'orphan' instructions.
The LLDB tests are now ready for this patch.
DWARF specifies that "line 0" really means "no appropriate source
location" in the line table. Use this for branch targets and some
other cases that have no specified source location, to prevent
inheriting unfortunate line numbers from physically preceding
instructions (which might be from completely unrelated source).
Differential Revision: http://reviews.llvm.org/D24180
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288283
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 30 Nov 2016 22:39:35 +0000 (22:39 +0000)]
[libFuzzer] extend -rss_limit_mb to crash instantly on a single malloc that exceeds the limit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288281
91177308-0d34-0410-b5e6-
96231b3b80d8
David Callahan [Wed, 30 Nov 2016 22:32:58 +0000 (22:32 +0000)]
Only computeRelativePath() on new members
Summary:
When using thin archives, and processing the same archive multiple times, we were mangling existing entries. The root cause is that we were calling computeRelativePath() more than once. Here, we only call it when adding new members to an archive.
Note that D27218 changes the way thin archives are printed, and will break the new unit test included here. Depending on which one lands first, the other will need to be slightly modified.
Reviewers: rafael, davide
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D27217
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288280
91177308-0d34-0410-b5e6-
96231b3b80d8
Joel Jones [Wed, 30 Nov 2016 22:25:24 +0000 (22:25 +0000)]
[AArch64] Refactor LSE support as feature separate from V8.1a support.
Summary:
This is preparation for ThunderX processors that have Large
System Extension (LSE) atomic instructions, but not the
other instructions introduced by V8.1a.
This will mimic changes to GCC as described here:
https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00388.html
LSE instructions are: LD/ST<op>, CAS*, SWP
Reviewers: t.p.northover, echristo, jmolloy, rengolin
Subscribers: aemerson, mehdi_amini
Differential Revision: https://reviews.llvm.org/D26621
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288279
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeny Stupachenko [Wed, 30 Nov 2016 22:23:51 +0000 (22:23 +0000)]
Fix LSR best register search algorithm.
Summary:
Fix a case when first register in a search has maximum
RegUses.getUsedByIndices(Reg).count()
Reviewers: qcolombet
Differential Revision: http://reviews.llvm.org/D26877
From: Evgeny Stupachenko <evstupac@gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288278
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 30 Nov 2016 22:17:10 +0000 (22:17 +0000)]
Clarify rules for reserved regs, fix aarch64 ones.
No test case necessary as the problematic condition is checked with the
newly introduced assertAllSuperRegsMarked() function.
Differential Revision: https://reviews.llvm.org/D26648
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288277
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 30 Nov 2016 21:53:32 +0000 (21:53 +0000)]
[libFuzzer] extend -print_coverage to print the comma-separated list of covered dirs. Note: the Windows stub for DirName is left unimplemented
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288276
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 30 Nov 2016 21:44:26 +0000 (21:44 +0000)]
[LibFuzzer] Add Windows implementations of some IO functions.
This patch moves some posix specific file i/o code into a new
file, FuzzerIOPosix.cpp, and provides implementations for these
functions on Windows in FuzzerIOWindows.cpp. This is another
incremental step towards getting libfuzzer working on Windows,
although it still should not be expected to be fully working.
Patch by Marcos Pividori
Differential Revision: https://reviews.llvm.org/D27233
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288275
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Wed, 30 Nov 2016 21:13:57 +0000 (21:13 +0000)]
[LoopUnroll] Implement profile-based loop peeling
This implements PGO-driven loop peeling.
The basic idea is that when the average dynamic trip-count of a loop is known,
based on PGO, to be low, we can expect a performance win by peeling off the
first several iterations of that loop.
Unlike unrolling based on a known trip count, or a trip count multiple, this
doesn't save us the conditional check and branch on each iteration. However,
it does allow us to simplify the straight-line code we get (constant-folding,
etc.). This is important given that we know that we will usually only hit this
code, and not the actual loop.
This is currently disabled by default.
Differential Revision: https://reviews.llvm.org/D25963
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288274
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 30 Nov 2016 20:48:54 +0000 (20:48 +0000)]
[InstCombine] allow more narrowing transforms for logic ops
We had a limited version of this for scalar 'and'; this expands
the transform to 'or' and 'xor' and allows vectors types too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288273
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 30 Nov 2016 20:20:49 +0000 (20:20 +0000)]
[InstCombine] add tests to show potentially missed logic+trunc transforms; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288270
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Wed, 30 Nov 2016 19:55:49 +0000 (19:55 +0000)]
CODE_OWNERS: Take ownership of Loop Strenght Reduce.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288268
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 30 Nov 2016 19:12:53 +0000 (19:12 +0000)]
[git-llvm] Use --force-interactive when commiting to enable SVN to prompt password
When svn does not know the password and it has to prompt, it needs to query.
However it won't when invoked from the Python script and instead fails with:
svn:
E215004: Authentication failed and interactive prompting is disabled; see the --force-interactive option
Differential Revision: https://reviews.llvm.org/D27274
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288266
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Wed, 30 Nov 2016 19:08:41 +0000 (19:08 +0000)]
Fix macro check for ABI breacking check: should use #if instead of #ifndef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288265
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 30 Nov 2016 19:06:14 +0000 (19:06 +0000)]
[LibFuzzer] Split up some functions among different headers.
In an effort to get libfuzzer working on Windows, we need to make
a distinction between what functions require platform specific
code (e.g. different code on Windows vs Linux) and what code
doesn't. IO functions, for example, tend to be platform
specific.
This patch separates out some of the functions which will need
to have platform specific implementations into different headers,
so that we can then provide different implementations for each
platform.
Aside from that, this patch contains no functional change. It
is purely a re-organization.
Patch by Marcos Pividori
Differential Revision: https://reviews.llvm.org/D27230
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288264
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 30 Nov 2016 18:50:26 +0000 (18:50 +0000)]
AMDGPU: Move mir tests into mir test directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288262
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 30 Nov 2016 18:49:56 +0000 (18:49 +0000)]
[InstCombine] update test to use FileCheck and auto-generate checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288261
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 30 Nov 2016 18:15:10 +0000 (18:15 +0000)]
[X86][SSE] Added tests showing missed combines of ANDs with shuffles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288259
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Wed, 30 Nov 2016 17:48:10 +0000 (17:48 +0000)]
Fix some Clang-tidy and Include What You Use warnings; other minor fixes (NFC).
This preparation to remove SetVector.h dependency on SmallSet.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288256
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 30 Nov 2016 17:07:21 +0000 (17:07 +0000)]
[InstCombine] auto-generate checks for select+bitwise logic tests; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288254
91177308-0d34-0410-b5e6-
96231b3b80d8
Silviu Baranga [Wed, 30 Nov 2016 17:04:22 +0000 (17:04 +0000)]
[AArch64] Fix useful bits detection for BFM instructions
Summary:
When computing useful bits for a BFM instruction, we need
to take into consideration the case where both operands
of the BFM are equal and provide data that we need to track.
Not doing this can cause us to miss useful bits.
Fixes PR31138 (https://llvm.org/bugs/show_bug.cgi?id=31138)
Reviewers: t.p.northover, jmolloy
Subscribers: evandro, gberry, srhines, pirama, mcrosier, aemerson, llvm-commits, rengolin
Differential Revision: https://reviews.llvm.org/D27130
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288253
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Wed, 30 Nov 2016 16:49:11 +0000 (16:49 +0000)]
[WebAssembly] Add llvm-objdump support for wasm file format
This is the first part of an effort to add wasm binary
support across all llvm tools.
Patch by Sam Clegg
Differential Revision: https://reviews.llvm.org/D26172
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288251
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 30 Nov 2016 16:33:46 +0000 (16:33 +0000)]
[X86][SSE] Add support for target shuffle constant folding
Initial support for target shuffle constant folding in cases where all shuffle inputs are constant. We may be able to relax this and merge shuffles with only some constant inputs in the future.
I've added the helper function getTargetConstantBitsFromNode (based off a similar function in X86ShuffleDecodeConstantPool.cpp) that could be reused for other cases requiring constant vector extraction.
Differential Revision: https://reviews.llvm.org/D27220
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288250
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 30 Nov 2016 16:32:54 +0000 (16:32 +0000)]
[LibFuzzer] Add macro flags for Posix and Windows.
This is the beginning of an effort to get libfuzzer working on
Windows. This is a NFC to just add some macros for platform
detection on Windows.
Patch by Marcos Pividori
Differential Revision: https://reviews.llvm.org/D27229
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288249
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolai Haehnle [Wed, 30 Nov 2016 16:26:33 +0000 (16:26 +0000)]
[SelectionDAG] Refactor TargetLowering::expandMUL (NFC)
Summary: Further preparation for the expansion of MUL_LOHI added in D24956.
Reviewers: efriedma, RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D27064
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288248
91177308-0d34-0410-b5e6-
96231b3b80d8
Pavel Labath [Wed, 30 Nov 2016 15:34:29 +0000 (15:34 +0000)]
[Support] Use HAVE_DLOPEN to guard dlopen(3) usage
Summary:
The usage was previously guarded by HAVE_DLFCN. This breaks on Android with
LLVM_BUILD_STATIC as the platform does not provide a static version of libdl.
Using HAVE_DLOPEN fixes it as the code will only get used if we are actually able
to link an executable using dlopen.
Reviewers: rafael, beanz
Subscribers: tberghammer, danalbert, llvm-commits
Differential Revision: https://reviews.llvm.org/D26504
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288246
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 30 Nov 2016 15:00:43 +0000 (15:00 +0000)]
[AArch64] use exact checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288245
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 30 Nov 2016 13:31:09 +0000 (13:31 +0000)]
[PowerPC] Preserve machine dominator tree in PPCVSXFMAMutate
It is needed by LiveIntervalAnalysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288243
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 30 Nov 2016 13:21:12 +0000 (13:21 +0000)]
Updated test with -verify-machineinstrs to check for PR21931
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288242
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 30 Nov 2016 11:30:33 +0000 (11:30 +0000)]
[X86][SSE] Add tests demonstrating missed opportunities to combine 64-bit element unpacks with horizontal pair ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288240
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 30 Nov 2016 10:01:11 +0000 (10:01 +0000)]
Apply clang-tidy's 'performance-faster-string-find' check to LLVM.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288235
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Wed, 30 Nov 2016 08:24:43 +0000 (08:24 +0000)]
Revert 'Test commit as per developer policy'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288233
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Wed, 30 Nov 2016 08:06:23 +0000 (08:06 +0000)]
Test commit as per developer policy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288232
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 30 Nov 2016 01:14:35 +0000 (01:14 +0000)]
Revert "[GVN] Basic optimization remark support"
This reverts commit r288210.
The failure on the stage2 LTO build is back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288226
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 30 Nov 2016 01:12:07 +0000 (01:12 +0000)]
[RuntimeDyld] Skip undefined symbols when building the symbol table.
Storing these in the symbol table (with zero values) is just wasted space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288225
91177308-0d34-0410-b5e6-
96231b3b80d8
Nemanja Ivanovic [Tue, 29 Nov 2016 23:57:54 +0000 (23:57 +0000)]
[PowerPC] Improvements for BUILD_VECTOR Vol. 2
This patch corresponds to review:
https://reviews.llvm.org/D26023
This patch adds support for converting a vector of loads into a single load if
the loads are consecutive (in either direction).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288219
91177308-0d34-0410-b5e6-
96231b3b80d8
Nemanja Ivanovic [Tue, 29 Nov 2016 23:36:03 +0000 (23:36 +0000)]
[PowerPC] Improvements for BUILD_VECTOR Vol. 2
This patch corresponds to review:
https://reviews.llvm.org/D25980
This is the 2nd patch in a series of 4 that improve the lowering and combining
for BUILD_VECTOR nodes on PowerPC. This particular patch combines a build vector
of fp-to-int conversions into an fp-to-int conversion of a build vector of fp
values. For example:
Converts (build_vector (fp_to_[su]i $A), (fp_to_[su]i $B), ...)
Into (fp_to_[su]i (build_vector $A, $B, ...))).
Which is a natural match for much cleaner code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288218
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Tue, 29 Nov 2016 23:22:55 +0000 (23:22 +0000)]
Add another missing dependency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288217
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Tue, 29 Nov 2016 23:20:35 +0000 (23:20 +0000)]
Revert r288212 due to lldb failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288216
91177308-0d34-0410-b5e6-
96231b3b80d8
Jacques Pienaar [Tue, 29 Nov 2016 23:01:09 +0000 (23:01 +0000)]
[lanai] Manually match 0/-1 with R0/R1.
Summary: Previously 0 and -1 was matched via tablegen rules. But this could cause problems where a physical register was being used where a virtual register was expected (seen in optimizeSelect and TwoAddressInstructionPass). Instead follow AArch64 and match in DAGToDAGISel.
Reviewers: eliben, majnemer
Subscribers: llvm-commits, aemerson
Differential Revision: https://reviews.llvm.org/D27171
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288215
91177308-0d34-0410-b5e6-
96231b3b80d8
Nemanja Ivanovic [Tue, 29 Nov 2016 23:00:33 +0000 (23:00 +0000)]
Revert https://reviews.llvm.org/rL287679
This commit caused some miscompiles that did not show up on any of the bots.
Reverting until we can investigate the cause of those failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288214
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Tue, 29 Nov 2016 22:41:16 +0000 (22:41 +0000)]
Emit 'no line' information for interesting 'orphan' instructions.
DWARF specifies that "line 0" really means "no appropriate source
location" in the line table. Use this for branch targets and some
other cases that have no specified source location, to prevent
inheriting unfortunate line numbers from physically preceding
instructions (which might be from completely unrelated source).
Differential Revision: http://reviews.llvm.org/D24180
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288212
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 29 Nov 2016 22:38:30 +0000 (22:38 +0000)]
[X86][AVX512VL] Improved testing of vcvtpd2ps, vcvtpd2dq/vcvtpd2udq and vcvttpd2dq/vcvttpd2udq implicit zeroing of upper 64-bits of xmm result
Ensure that masked instruction doesn't assume implicit zeroing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288211
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Tue, 29 Nov 2016 22:37:01 +0000 (22:37 +0000)]
[GVN] Basic optimization remark support
[recommiting patches one-by-one to see which breaks the stage2 LTO bot]
Follow-on patches will add more interesting cases.
The goal of this patch-set is to get the GVN messages printed in
opt-viewer from Dhrystone as was presented in my Dev Meeting talk. This
is the optimization view for the function (the last remark in the
function has a bug which is fixed in this series):
http://lab.llvm.org:8080/artifacts/opt-view_test-suite/build/SingleSource/Benchmarks/Dhrystone/CMakeFiles/dry.dir/html/_org_test-suite_SingleSource_Benchmarks_Dhrystone_dry.c.html#L430
Differential Revision: https://reviews.llvm.org/D26488
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288210
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 29 Nov 2016 22:36:28 +0000 (22:36 +0000)]
[X86][AVX512DQVL] Improved testing of vcvtqq2ps/vcvtuqq2ps implicit zeroing of upper 64-bits of xmm result
Ensure that masked instruction doesn't assume implicit zeroing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288209
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 29 Nov 2016 22:28:58 +0000 (22:28 +0000)]
[AArch64] allow and-not-compare transform to form 'bics'
This target hook was added with D19087:
https://reviews.llvm.org/D19087
Differential Revision: https://reviews.llvm.org/D27221
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288206
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 29 Nov 2016 22:14:56 +0000 (22:14 +0000)]
Add documentation for the PDB Module Info stream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288205
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Tue, 29 Nov 2016 21:55:09 +0000 (21:55 +0000)]
Bitcode: Add a more comprehensive multi-module test now that we have both llvm-cat and llvm-modextract.
Differential Revision: https://reviews.llvm.org/D27189
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288202
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Tue, 29 Nov 2016 21:54:33 +0000 (21:54 +0000)]
Add llvm-modextract tool.
This program is for testing features that rely on multi-module bitcode files.
It takes a multi-module bitcode file, extracts one of the modules and writes
it to the output file.
Differential Revision: https://reviews.llvm.org/D26778
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288201
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Tue, 29 Nov 2016 21:49:02 +0000 (21:49 +0000)]
[StructurizeCFG] Fix infinite loop in rebuildSSA.
Michel Dänzer reported that r288051, "[StructurizeCFG] Use range-based
for loops", introduced a bug into rebuildSSA, wherein we were iterating
over an instruction's use list while modifying it, without taking care
to do this correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288200
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 29 Nov 2016 21:43:40 +0000 (21:43 +0000)]
Add to llvm-objdump the -no-leading-headers option with the use of the -macho option.
In some cases the leading headers of the file name, archive member and
architecture slice name in the output of lvm-objdump is not wanted so the
tool’s output can be directly used by scripts. This matches the -X option
of the Apple otool(1) program.
rdar://
28491674
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288199
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Tue, 29 Nov 2016 21:02:19 +0000 (21:02 +0000)]
Add missing dependency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288198
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Tue, 29 Nov 2016 20:45:48 +0000 (20:45 +0000)]
Change Error unittest to use the LLVM_ENABLE_ABI_BREAKING_CHECKS instead of NDEBUG
This is consistent with the header (after r288087) and fixes the
test for the configuration:
-DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288196
91177308-0d34-0410-b5e6-
96231b3b80d8