Commit Graph

5758 Commits

Author SHA1 Message Date
Simon Dardis
111ec25a8e Revert "Revert "[misched] Extend scheduler to handle unsupported features""
This reverts commit r273565.

This was an over-eager revert.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273658 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24 08:43:27 +00:00
Ahmed Bougacha
bcf03bbf99 [TableGen] Use StringRef::compare instead of != and <. NFC.
The previous code would always do 1 or 2 prefix compares;
explicitly only do one.

This speeds up debug -gen-asm-matcher by ~10% (e.g. X86: 40s -> 35s).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273583 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23 17:09:49 +00:00
Simon Dardis
f84be7849c Revert "[misched] Extend scheduler to handle unsupported features"
This reverts commit r273551.

Patch contained a wrong check for isUnsupported.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273565 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23 14:54:47 +00:00
Aaron Ballman
00fb6abc74 Explicitly specify the ANSI version of these Win32 APIs. While these are seemingly unrelated changes, they are all NFC because we currently default to the ANSI versions of the APIs when building for Windows. This simply makes the ANSI usage explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273564 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23 14:45:54 +00:00
Simon Dardis
53391f414b [misched] Extend scheduler to handle unsupported features
Currently isComplete = 1 requires that every instruction must
be described, declared unsupported or marked as having no
scheduling information for a processor.

For some backends such as MIPS, this requirement entails
long regex lists of instructions that are unsupported.

This patch teaches Tablegen to skip over instructions that
are associated with unsupported feature when checking if the
scheduling model is complete.

Patch by: Daniel Sanders

Contributions by: Simon Dardis

Reviewers: MatzeB

Differential Reviewer: http://reviews.llvm.org/D20522


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273551 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23 09:22:11 +00:00
Matthias Braun
4492b0efb2 TableGen/CodeGenSchedule: Move some getAllDerivedDefinitions() calls out of inner loops
This cuts the runtime of the two slowest tblgen invocations in aarch64
in half for me...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273235 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-21 03:24:03 +00:00
Thomas Jablin
920d0ae595 test commit: remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273197 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-20 20:43:26 +00:00
Joerg Sonnenberger
4c59f0ca01 If the revision number starts with r, drop it. It will get added back
later and we don't want to use it twice.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273099 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-18 23:23:38 +00:00
David Majnemer
0c4f69f653 Remove the ScalarReplAggregates pass
Nearly all the changes to this pass have been done while maintaining and
updating other parts of LLVM.  LLVM has had another pass, SROA, which
has superseded ScalarReplAggregates for quite some time.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272737 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 00:19:09 +00:00
Daniel Sanders
ded4398380 [FileCheck] Add --check-prefixes as a shorthand for multiple --check-prefix options.
Summary:
This new alias takes a comma separated list of prefixes which allows
'--check-prefix=A --check-prefix=B --check-prefix=C' to be written as
'--check-prefixes=A,B,C'.

Reviewers: probinson

Subscribers: probinson, llvm-commits, dsanders

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272670 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 14:28:04 +00:00
Vedant Kumar
d1714dc208 Add support for collating profiles for use with code coverage
Differential Revision: http://reviews.llvm.org/D20993

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272599 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-13 23:33:48 +00:00
Mike Spertus
2a6b57b9f7 Improved Visual Studio 2015 visualization of SmallVectorImpl
When visualizing small vectors in VS2015, show the first few elements in the DisplayString instead of the size. For example, a SmallVector of DeclAccessPair will visualize like

  {public typename ...Ts, public typename U}

The visualization in VS2013 remains the same because we continue to include the old visualizer with a lower-than-default priority of MediumLow, and the same SmallVector would continue to be visualized as

  {size = 2}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272525 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-13 01:43:14 +00:00
Benjamin Kramer
13c42d2b20 Run clang-tidy's performance-unnecessary-copy-initialization over LLVM.
No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272516 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-12 17:30:47 +00:00
Simon Pilgrim
58140e4f69 [X86] Updated test checks script to generalise LCPI symbol refs
The script now replace '.LCPI888_8' style asm symbols with the {{\.LCPI.*}} re pattern - this helps stop hardcoded symbols in 32-bit x86 tests changing with every edit of the file

Refreshed some tests to demonstrate the new check

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272488 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-11 20:39:21 +00:00
Daniel Dunbar
434c834954 [lit] Only gather redirected files for command failures.
- The intended use of this was just in diagnostics, so we shouldn't pay the
   cost of reading these all the time.

 - This will avoid including the full output of each command in tests which
   fail, but the most important use case for this was to gather the output of
   the specific command which failed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272365 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 04:17:30 +00:00
Vedant Kumar
4342472183 Revert "[lit] Use os.devnull instead of named temp files"
This reverts commit r272290. It breaks a test that depends on being able
to seek the /dev/null equivalent on Windows:

http://bb.pgr.jp/builders/ninja-clang-x64-mingw64-RA/builds/11360

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272293 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 19:36:48 +00:00
Vedant Kumar
20c54a3a30 [lit] Use os.devnull instead of named temp files
Use os.devnull instead of tempfiles when substituting '/dev/null' on
Windows machines. This should make the bots just a bit speedier.

Thanks to Yunzhong Gao for testing this patch on Windows!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272290 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 18:38:41 +00:00
Richard Smith
0eeb3d4004 Search for llvm-symbolizer binary in the same directory as argv[0], before
looking for it along $PATH. This allows installs of LLVM tools outside of
$PATH to find the symbolizer and produce pretty backtraces if they crash.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272232 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 00:53:21 +00:00
Benjamin Kramer
36538ffe93 Apply most suggestions of clang-tidy's performance-unnecessary-value-param
Avoids unnecessary copies. All changes audited & pass tests with asan.
No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272190 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-08 19:09:22 +00:00
Daniel Dunbar
3a7c4849b7 [lit] Ensure we get bytes when reading redirected output files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272147 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-08 14:41:44 +00:00
Daniel Dunbar
8a560fc113 [lit] Ignore errors when decoding redirected output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272066 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-07 22:06:57 +00:00
Daniel Dunbar
311dd52c44 [lit] Fix an uninitialized var on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272052 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-07 20:14:17 +00:00
Daniel Dunbar
dc6c68ee03 [utils/lit] Show available_features with --show-suites.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272022 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-07 16:22:24 +00:00
Daniel Dunbar
89f76ce51d [lit] Improve logging with file redirection.
- This will cause lit to automatically include the first 1K of data in
   redirected output files when a command fails (previously if the command
   failed, but the main point of the test was, say, a `FileCheck` later on, then
   the log wasn't helpful in showing why the command failed).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272021 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-07 16:13:40 +00:00
Mike Spertus
0b28fbb3a5 Add Visual Studio Visualizer for ArrayRef
Modeled after visualization of llvm::SmallVec


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271847 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-05 18:34:02 +00:00
Sjoerd Meijer
d02bd6484d AsmWriterEmitter.cpp assumes that all operands of a printed alias
will appear after a blank. This assumption does not hold in the ARM
target.

Patch by: Roger Ferrer Ibanez

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271666 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-03 13:17:37 +00:00
Sjoerd Meijer
6762cdb53a Currently AsmWriterEmiter.cpp (used by tblgen -gen-asm-writer) does not
consider the Predicates attached to InstAlias when generating printAliasInstr.
This forces users of printAliasInstr to check those predicates beforehand.

This commit adds them in the condition set of the IAPrinter object.

Patch by: Roger Ferrer Ibanez

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271665 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-03 13:14:19 +00:00
Daniel Dunbar
bf67aefcd0 [lit] Improve readability of failing scripts.
- This only applies to scripts executed by the _internal_ shell script
   interpreter.

 - This patch reworks the log to look more like a shell transcript, and be less
   verbose (but in the interest of calling attention to the important parts).

Here is an example of the new format, for commands with/without failures and
with/without output:
```
$ true
$ echo hi
hi

$ false
note: command had no output on stdout or stderr
error: command failed with exit status 1

```

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271610 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-02 23:49:42 +00:00
Daniel Dunbar
25aa67311c [lit] Factor out a helper for shell command results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271608 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-02 23:32:35 +00:00
Eric Fiselier
960b5867c5 Add "REQUIRES-ANY" feature test
Summary:
This patch adds a "REQUIRES-ANY" feature test that is disjunctive. This marks a test as `UNSUPPORTED` if none of the specified features are available.

Libc++ has the need to write feature test such as `// REQUIRES-ANY: c++98, c++03`  when testing of behavior that is specific to older dialects but has since changed.


Reviewers: rnk, ddunbar

Subscribers: ddunbar, probinson, llvm-commits, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271468 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-02 01:59:57 +00:00
Joerg Sonnenberger
645eab26ad Update usage(), make sure srcdir is really empty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271396 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-01 14:16:00 +00:00
David Blaikie
ed2188ea17 Reference gdb python type printer scripts from SmallString, SmallVector, ArrayRef, and StringRef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271357 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-01 01:02:32 +00:00
Joerg Sonnenberger
d703145852 Make it easier to process merges in a normal buildable directory tree by
allowing the user to specify the base directory of the checkout.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271192 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-29 22:09:54 +00:00
Xinliang David Li
a5135a874c FileCheck: dump command line context with empty input
Differential Revision: http://reviews.llvm.org/D20716



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271047 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-27 21:23:25 +00:00
Benjamin Kramer
14aae01bc3 Apply clang-tidy's misc-move-constructor-init throughout LLVM.
No functionality change intended, maybe a tiny performance improvement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270997 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-27 14:27:24 +00:00
Benjamin Kramer
b397ac432d Avoid some copies by using const references.
clang-tidy's performance-unnecessary-copy-initialization with some manual
fixes. No functional changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270988 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-27 12:30:51 +00:00
John Brawn
f653fb8714 Add auto-exporting of symbols from tools so that plugins work on Windows
The problem with plugins on Windows is that when building a plugin DLL it needs
to explicitly link against something (an exe or DLL) if it uses symbols from
that thing, and that thing must explicitly export those symbols. Also there's a
limit of 65535 symbols that can be exported. This means that currently plugins
only work on Windows when using BUILD_SHARED_LIBS, and that doesn't work with
MSVC.

This patch adds an LLVM_EXPORT_SYMBOLS_FOR_PLUGINS option, which when enabled
automatically exports from all LLVM tools the symbols that a plugin could want
to use so that a plugin can link against a tool directly. Plugins can specify
what tool they link against by using PLUGIN_TOOL argument to llvm_add_library.
The option can also be enabled on Linux, though there all it should do is
restrict the set of symbols that are exported as by default all symbols are
exported.

This option is currently OFF by default, as while I've verified that it works
with MSVC, linux gcc, and cygwin gcc, I haven't tried mingw gcc and I have no
idea what will happen on OSX. Also unfortunately we can't turn on
LLVM_ENABLE_PLUGINS when the option is ON as bugpoint-passes needs to be
loaded by both bugpoint.exe and opt.exe which is incompatible with this
approach. Also currently clang plugins don't work with this approach, which
will be fixed in future patches.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270839 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-26 11:16:43 +00:00
Matt Arsenault
2b7ac01da2 TableGen: Use StringRef instead of std::string
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270741 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-25 18:07:40 +00:00
Eugene Zelenko
d307f96d68 Fix Clang-tidy modernize-use-bool-literals in generated Target code; other minor fixes; other minor fixes.
Make generated code more readable.

Fix some Include What You Use warnings.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269783 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 17:04:23 +00:00
Justin Bogner
182dac04e5 SDAG: Make SelectCodeCommon return void
This means SelectCode unconditionally returns nullptr now. I'll follow
up with a change to make that return void as well, but it seems best
to keep that one very mechanical.

This is part of the work to have Select return void instead of an
SDNode *, which is in turn part of llvm.org/pr26808.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269136 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 22:58:26 +00:00
Sam Kolton
f117ec1a64 [TableGen] AsmMatcher: support for default values for optional operands
Summary:
This change allows to specify "DefaultMethod" for optional operand (IsOptional = 1) in AsmOperandClass that return default value for operand. This is used in convertToMCInst to set default values in MCInst.
Previously if you wanted to set default value for operand you had to create custom converter method. With this change it is possible to use standard converters even when optional operands presented.

Reviewers: tstellarAMD, ab, craig.topper

Subscribers: jyknight, dsanders, arsenm, nhaustov, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268726 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-06 11:31:17 +00:00
Craig Topper
886b4ecfe7 [TableGen] Fix a memory leak when creating SwitchOpcodeMatchers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268712 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-06 06:56:14 +00:00
Craig Topper
00b2aa2818 [TableGen] Remove isSafeToReorderWithPatternPredicate from DAGISelMatchers as its not used anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268711 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-06 06:21:27 +00:00
Craig Topper
4714294593 [TableGen] Remove getHash support from DAGISelMatcher. It hasn't been used for some time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268706 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-06 02:37:59 +00:00
Craig Topper
489f3e9ac6 [TableGen] Remove SinkPatternPredicates from the DAG isel matcher optimizer.
Pattern predicates already appear to be emitted as far down as they can be. The optimization was making no changes on any in-tree target.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268705 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-06 02:37:56 +00:00
Justin Bogner
5f2e6ee2b7 SDAG: Remove OPC_MarkGlueResults and associated logic. NFC
This opcode never happens in practice, and yet the logic we have in
place to handle it would be undefined behaviour if we ever executed
it. Remove it rather than trying to refactor code that's never
reached.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268692 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 22:37:45 +00:00
Chris Bieneman
6a6b44f90f Remove LLVM_ENABLE_TIMESTAMPS
Summary:
As per the discussion on LLVM-dev this patch proposes removing LLVM_ENABLE_TIMESTAMPS.

The only complicated bit of this patch is the Windows support. On windows we used to log an error if /INCREMENTAL was passed to the linker when timestamps were disabled.

With this change since timestamps in code are always disabled we will always compile on windows with /Brepro unless /INCREMENTAL is specified, and we will log a warning when /INCREMENTAL is specified to notify the user that the build will be non-deterministic.

See: http://lists.llvm.org/pipermail/llvm-dev/2016-May/098990.html

Reviewers: bogner, silvas, rnk

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268670 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 19:57:03 +00:00
James Y Knight
257fabb186 Remove bit-rotten CppBackend.
This backend was supposed to generate C++ code which will re-construct
the LLVM IR passed as input. This seems to me to have very marginal
usefulness in the first place.

However, the code has never been updated to use IRBuilder, which makes
its current value negative -- people who look at the output may be
steered to use the *wrong* C++ APIs to construct IR.

Furthermore, it's generated code that doesn't compile since at least
2013.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268631 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 14:35:40 +00:00
Craig Topper
408b811d1e [TableGen] Make sure to recursively factor any ScopeMatchers created while forming a SwitchType node. Remove a couple hundred bytes from the X86 matcher table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268611 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 06:19:27 +00:00
Craig Topper
14b553012a [TableGen] Remove stale comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268610 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05 06:19:25 +00:00