Craig Topper [Thu, 11 Feb 2016 07:39:22 +0000 (07:39 +0000)]
[TableGen] Simplify code slightly. NFC
llvm-svn: 260499
Simon Atanasyan [Thu, 11 Feb 2016 06:45:54 +0000 (06:45 +0000)]
[MC][ELF] Handle MIPS specific .sdata and .sbss directives
MIPS specific .sdata and .sbss directives create corresponding sections
with proper initialized ELF flags including ELF::SHF_MIPS_GPREL.
Differential Revision: http://reviews.llvm.org/D17001
llvm-svn: 260498
Daniel Jasper [Thu, 11 Feb 2016 06:43:01 +0000 (06:43 +0000)]
clang-format: Make it more expensive to break template parameters.
In particular, make it more expensive than breaking after the return
type of a function definition/declaration.
Before:
template <typename T>
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaa<
T>::
aaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaa);
After:
template <typename T>
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaa<T>::
aaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaa);
llvm-svn: 260497
Akira Hatanaka [Thu, 11 Feb 2016 06:36:35 +0000 (06:36 +0000)]
[Objective-c] Stop attaching section "datacoal_nt" to global variables.
The current macho linker just copies symbols in section datacoal_nt to
section data, so it doesn't really matter whether or not section
"datacoal_nt" is attached to the global variable.
This is a follow-up to r250370, which made changes in llvm to stop
putting functions and data in the *coal* sections.
rdar://problem/
24528611
llvm-svn: 260496
Matt Arsenault [Thu, 11 Feb 2016 06:15:39 +0000 (06:15 +0000)]
AMDGPU: Fix constant bus use check with subregisters
If the two operands to an instruction were both
subregisters of the same super register, it would incorrectly
think this counted as the same constant bus use.
This fixes the verifier error in fmin_legacy.ll which
was missing -verify-machineinstrs.
llvm-svn: 260495
Matt Arsenault [Thu, 11 Feb 2016 06:15:34 +0000 (06:15 +0000)]
AMDGPU: Fix passes depending on dominator tree for no reason
llvm-svn: 260494
Matt Arsenault [Thu, 11 Feb 2016 06:02:01 +0000 (06:02 +0000)]
AMDGPU: Remove some old intrinsic uses from tests
llvm-svn: 260493
Alexey Bataev [Thu, 11 Feb 2016 05:35:55 +0000 (05:35 +0000)]
[OPENMP] Rename OMPCapturedFieldDecl to OMPCapturedExprDecl, NFC.
OMPCapturedExprDecl allows caopturing not only of fielddecls, but also
other expressions. It also allows to simplify codegen for several
clauses.
llvm-svn: 260492
Matt Arsenault [Thu, 11 Feb 2016 05:32:51 +0000 (05:32 +0000)]
AMDGPU: Fix not handling new workitem intrinsics in DivergenceAnalysis
llvm-svn: 260491
Matt Arsenault [Thu, 11 Feb 2016 05:32:46 +0000 (05:32 +0000)]
AMDGPU: Split R600 and SI store lowering
These were only sharing some somewhat incorrect
logic for when to scalarize or split vectors.
llvm-svn: 260490
Michael J. Spencer [Thu, 11 Feb 2016 04:59:53 +0000 (04:59 +0000)]
[readobj] Dump DT_JMPREL relocations when outputting dynamic relocations.
llvm-svn: 260489
Michael J. Spencer [Thu, 11 Feb 2016 04:59:45 +0000 (04:59 +0000)]
[readobj] Handle ELF files with no section table or with no program headers.
This adds support for finding the dynamic table and dynamic symbol table via
the section table or the program header table. If there's no section table an
attempt is made to figure out the length of the dynamic symbol table.
llvm-svn: 260488
Michael J. Spencer [Thu, 11 Feb 2016 04:59:37 +0000 (04:59 +0000)]
[readobj] Move dynamic table parsing to a new function. NFC.
llvm-svn: 260487
Michael J. Spencer [Thu, 11 Feb 2016 04:59:32 +0000 (04:59 +0000)]
[readobj] Sort switch by enum value.
Sort by enum value, but keep related entries adjacent. This makes it
easier to compare against documentation.
llvm-svn: 260486
Michael J. Spencer [Thu, 11 Feb 2016 04:59:26 +0000 (04:59 +0000)]
[readobj] Parse sections before dynamic table.
NFC. This code will be expanded to handle dynamic tables that don't have a
PT_DYNAMIC.
llvm-svn: 260485
Hemant Kulkarni [Thu, 11 Feb 2016 03:41:34 +0000 (03:41 +0000)]
Fix const confusion while lambda function usage
llvm-svn: 260484
Tom Stellard [Thu, 11 Feb 2016 03:28:15 +0000 (03:28 +0000)]
[AMDGPU] Assembler: Fix VOP3 only instructions
Separate methods to convert parsed instructions to MCInst:
- VOP3 only instructions (always create modifiers as operands in MCInst)
- VOP2 instrunctions with modifiers (create modifiers as operands
in MCInst when e64 encoding is forced or modifiers are parsed)
- VOP2 instructions without modifiers (do not create modifiers
as operands in MCInst)
- Add VOP3Only flag. Pass HasMods flag to VOP3Common.
- Simplify code that deals with modifiers (-1 is now same as
0). This is no longer needed.
- Add few tests (more will be added separately).
Update error message now correct.
Patch By: Nikolay Haustov
Differential Revision: http://reviews.llvm.org/D16778
llvm-svn: 260483
Davide Italiano [Thu, 11 Feb 2016 02:56:02 +0000 (02:56 +0000)]
[llvm-nm] Simplify code logic. Rewrite a single function an inline.
llvm-svn: 260482
Reid Kleckner [Thu, 11 Feb 2016 02:02:56 +0000 (02:02 +0000)]
Un-XFAIL a passing test on Windows
llvm-svn: 260481
Reid Kleckner [Thu, 11 Feb 2016 02:02:52 +0000 (02:02 +0000)]
Move mmap_limit_mp test to Posix
This test isn't posix specific, but it doesn't pass on Windows and is
XFAILed. I suspect that this test, which is expected to fail, is causing
the hangs I'm seeing on our WinASan builder. Moving it to Posix seems
to be the cleanest way to avoid running it on Windows.
llvm-svn: 260480
Justin Lebar [Thu, 11 Feb 2016 02:00:52 +0000 (02:00 +0000)]
[CUDA] Don't crash when trying to printf a non-scalar object.
Summary:
We can't do the right thing, since there's no right thing to do, but at
least we can not crash the compiler.
Reviewers: majnemer, rnk
Subscribers: cfe-commits, jhen, tra
Differential Revision: http://reviews.llvm.org/D17103
llvm-svn: 260479
Justin Lebar [Thu, 11 Feb 2016 02:00:50 +0000 (02:00 +0000)]
Remove unused ToolChain arg from Driver::ConstructPhaseAction and BuildAction.
Summary:
Actions don't depend on the toolchain; they get bound to a particular
toolchain via BindArch.
No functional changes.
Reviewers: echristo
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D17100
llvm-svn: 260478
Rui Ueyama [Thu, 11 Feb 2016 01:07:19 +0000 (01:07 +0000)]
ELF: Sort .[cd]tors by priority as we do for .{init,fini}_array.
llvm-svn: 260477
Rui Ueyama [Thu, 11 Feb 2016 01:07:18 +0000 (01:07 +0000)]
Reduce code repetition. NFC.
llvm-svn: 260476
Reid Kleckner [Thu, 11 Feb 2016 00:22:43 +0000 (00:22 +0000)]
Silence MSVC warning about non-void prototypes
It thinks that these functions don't match the function pointer type
that they are passed with:
GCDAProfiling.c(578) : warning C4113: 'void (__cdecl *)()' differs in parameter lists from 'void (__cdecl *)(void)'
GCDAProfiling.c(579) : warning C4113: 'void (__cdecl *)()' differs in parameter lists from 'void (__cdecl *)(void)'
GCDAProfiling.c(580) : warning C4113: 'void (__cdecl *)()' differs in parameter lists from 'void (__cdecl *)(void)'
llvm-svn: 260475
Quentin Colombet [Thu, 11 Feb 2016 00:19:17 +0000 (00:19 +0000)]
[GlobalISel][MachineRegisterInfo] Add a method to create generic vregs.
For now, generic virtual registers will not have a register class. We may want
to change that. For instance, if we want to use all the methods from
TargetRegisterInfo with generic virtual registers, we need to either have some
sort of generic register classes that do what we want, or teach those methods
how to deal with nullptr register class.
Although the latter seems easy enough to do, we may still want to differenciate
generic register classes from nullptr to catch cases where nullptr gets
introduced by a bug of some sort.
Anyway, I will file a PR to keep track of that.
llvm-svn: 260474
Evgeniy Stepanov [Thu, 11 Feb 2016 00:16:28 +0000 (00:16 +0000)]
[asan] Dump adb output on failure.
This is an asan/android test harness change aiming to catch
"adb pull" failures on the buildbot.
llvm-svn: 260473
Reid Kleckner [Thu, 11 Feb 2016 00:14:04 +0000 (00:14 +0000)]
Fix two tests relying on LLVM -O1 behavior
Something changed the inference of nonnull.
llvm-svn: 260472
Hemant Kulkarni [Thu, 11 Feb 2016 00:01:47 +0000 (00:01 +0000)]
Fix build failure caused in r260430
llvm-svn: 260471
Davide Italiano [Wed, 10 Feb 2016 23:56:18 +0000 (23:56 +0000)]
[llvm-nm] Minor style change. Prefer EXIT_SUCCESS over 0.
llvm-svn: 260470
Teresa Johnson [Wed, 10 Feb 2016 23:47:38 +0000 (23:47 +0000)]
Fix Windows bot failure in Transforms/FunctionImport/funcimport.ll
Make sure we split ":" from the end of the global function id (which
is <path>:<function> for local functions) instead of the beginning to
avoid splitting at the wrong place for Windows file paths that contain
a ":".
llvm-svn: 260469
Quentin Colombet [Wed, 10 Feb 2016 23:43:48 +0000 (23:43 +0000)]
[GlobalISel] Remember the size of generic virtual registers
llvm-svn: 260468
Rui Ueyama [Wed, 10 Feb 2016 23:43:16 +0000 (23:43 +0000)]
Reorder code to improve readability. NFC.
llvm-svn: 260467
Mehdi Amini [Wed, 10 Feb 2016 23:31:45 +0000 (23:31 +0000)]
FunctionImport: add a progressive heuristic to limit importing too deep in the callgraph
The current function importer will walk the callgraph, importing
transitively any callee that is below the threshold. This can
lead to import very deep which is costly in compile time and not
necessarily beneficial as most of the inline would happen in
imported function and not necessarilly in user code.
The actual factor has been carefully chosen by flipping a coin ;)
Some tuning need to be done (just at the existing limiting threshold).
Reviewers: tejohnson
Differential Revision: http://reviews.llvm.org/D17082
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 260466
Rafael Espindola [Wed, 10 Feb 2016 23:29:38 +0000 (23:29 +0000)]
Don't include NOBITS TLS in PT_LOAD.
They don't count for the memory or file size, so this is mostly just a
simplification.
The only noticeable difference should be fewer empty program headers.
llvm-svn: 260465
Hemant Kulkarni [Wed, 10 Feb 2016 23:28:43 +0000 (23:28 +0000)]
Make llvm-nm test consistent with other tests
llvm-svn: 260464
Rui Ueyama [Wed, 10 Feb 2016 23:26:27 +0000 (23:26 +0000)]
ELF: Use stable sort to sort .{init,fini}_array sections.
Global constructors and destructors are guaranteed to be called
in the order as they appear in a translation unit. So we don't want
to mess up the order if they have the same priority.
llvm-svn: 260463
Mehdi Amini [Wed, 10 Feb 2016 23:24:31 +0000 (23:24 +0000)]
Use a StringSet in Internalize, and allow to create the pass from an existing one (NFC)
There is not reason to pass an array of "char *" to rebuild a set if
the client already has one.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 260462
Mehdi Amini [Wed, 10 Feb 2016 23:24:21 +0000 (23:24 +0000)]
Add the ability to initialize a StringSet from a pair of iterators (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 260461
Rui Ueyama [Wed, 10 Feb 2016 23:20:42 +0000 (23:20 +0000)]
ELF: Implement __attribute__((init_priority(N)) support.
llvm-svn: 260460
Davide Italiano [Wed, 10 Feb 2016 23:16:17 +0000 (23:16 +0000)]
[llvm-nm] Prefer range-based loop over explicit iterator.
llvm-svn: 260459
Mehdi Amini [Wed, 10 Feb 2016 23:07:29 +0000 (23:07 +0000)]
Add a new insert_as() method to DenseMap and use it for ConstantUniqueMap
Summary:
Just like the existing find_as() method, the new insert_as() accepts
an extra parameter which is used as a key to find the bucket in the
map.
When creating a Constant, we want to check the map before actually
creating the object. In this case we have to perform two queries to
the map, and this extra parameter can save recomputing the hash value
for the second query.
Reviewers: dexonsmith, chandlerc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16268
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 260458
Quentin Colombet [Wed, 10 Feb 2016 23:00:57 +0000 (23:00 +0000)]
[CMake] Add a macro definition to detect if we are building GlobalISel:
LLVM_BUILD_GLOBAL_ISEL
llvm-svn: 260457
Quentin Colombet [Wed, 10 Feb 2016 22:59:27 +0000 (22:59 +0000)]
[GlobalISel] More detailed skeleton for the IRTranslator.
llvm-svn: 260456
Mehdi Amini [Wed, 10 Feb 2016 22:47:48 +0000 (22:47 +0000)]
Bitcode reader: replace DecodeChar6() with a lookup table (NFC)
Summary: Measured to be more performant when reading bitcode.
Reviewers: rafael, dexonsmith
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16285
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 260455
Mehdi Amini [Wed, 10 Feb 2016 22:47:15 +0000 (22:47 +0000)]
Simplify handleOperandChangeImpl() removing last argument (NFC)
The Use argument was used to compute the operand number for a fast
path when replacing only one operand. However we always have to go
through all the operands. So the argument number can be recomputed
locally anyway.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 260454
Rafael Espindola [Wed, 10 Feb 2016 22:43:13 +0000 (22:43 +0000)]
Split the creation of program headers in a few steps.
IMHO this makes the code easier to read and should help with linker
scripts.
This is strongly based on D16575. The main differences are:
We record a range of sections, not every section in a program header.
scanHeaders takes case of deciding what goes in every program header,
including PT_GNU_RELRO
We create dummy sections for the start of the file
With this, program header creation has 3 isolated stages:
Map sections to program headers.
Assign addresses to *sections*
Looking at sections find the address and size of each program header.
Thanks to George Rimar for the initial version.
llvm-svn: 260453
Jim Ingham [Wed, 10 Feb 2016 22:30:20 +0000 (22:30 +0000)]
Revert 260436. I pretty consistently upper-case the letter I use for the
short option as an aid to memory. Like it's w because of the W in throW.
That helps me remember. If we are going to take these out we should take them
all out. But I kind of like them.
llvm-svn: 260452
Philip Reames [Wed, 10 Feb 2016 22:22:41 +0000 (22:22 +0000)]
Follow up to 260439, Speculative fix to clang builders
It looks like clang has a couple of test cases which caught the fact LVI was not slightly more precise after 260439. When looking at the failures, it struck me as wasteful to be querying nullness of a constant via LVI, so instead of tweaking the clang tests, let's just stop querying constants from this source.
llvm-svn: 260451
Rong Xu [Wed, 10 Feb 2016 22:19:43 +0000 (22:19 +0000)]
[PGO] Make the number of records for each value site metada adjustable
The patch adds a parameter in annotateValueSite() to control the max number
of records written to the value profile meta data for each value site. The
default is kept as the current value of 3.
Differential Revision: http://reviews.llvm.org/D17084
llvm-svn: 260450
Hans Wennborg [Wed, 10 Feb 2016 22:18:37 +0000 (22:18 +0000)]
Revert r260388 "[MS ABI] Never reference dllimport'd vtables"
This caused the compiler to fail with "invalid linkage type
for global declaration" (PR26569).
llvm-svn: 260449
Justin Lebar [Wed, 10 Feb 2016 22:17:00 +0000 (22:17 +0000)]
Bail on compilation as soon as a job fails.
Previously we attempted to be smart; if one job failed, we'd run all
jobs that didn't depend on the failing job.
Problem is, this doesn't work well for e.g. CUDA compilation without
-save-temps. In this case, the device-side and host-side Assemble
actions (which actually are responsible for preprocess, compile,
backend, and assemble, since we're not saving temps) are necessarily
distinct. So our clever heuristic doesn't help us, and we repeat every
error message once for host and once for each device arch.
The main effect of this change, other than fixing CUDA, is that if you
pass multiple cc files to one instance of clang and you get a compile
error, we'll stop when the first cc1 job fails.
Reviewers: tra, echristo
Subscribers: jhen, cfe-commits
Differential Revision: http://reviews.llvm.org/D16514
llvm-svn: 260448
Matthias Braun [Wed, 10 Feb 2016 22:13:10 +0000 (22:13 +0000)]
APInt: Simplify EqualSlowCase
Previously the code used getActiveBits() to determine the highest set
bit of each APInt first. However doing so requires the same amount of
memory accesses as simply comparing both numbers right away.
Removing all the active bit checks leads to simpler code and is faster
in my benchmark.
Differential Revision: http://reviews.llvm.org/D16620
llvm-svn: 260447
Xinliang David Li [Wed, 10 Feb 2016 22:05:41 +0000 (22:05 +0000)]
Fix buildbot failure (hosts without zlib)
llvm-svn: 260446
Sean Callanan [Wed, 10 Feb 2016 22:00:32 +0000 (22:00 +0000)]
When importing Objective-C protocols, mark them as having external decls.
We already do this for Objective-C interfaces, but we never handled protocols
because the DWARF didn't represent them. Nowadays, though, we can import them
from modules, and we have to mark them properly.
<rdar://problem/
24193009>
llvm-svn: 260445
Rui Ueyama [Wed, 10 Feb 2016 22:00:21 +0000 (22:00 +0000)]
ELF: Combine cases that has the same code.
llvm-svn: 260444
Eric Fiselier [Wed, 10 Feb 2016 21:58:36 +0000 (21:58 +0000)]
Remove changes that snuck in within r260431
llvm-svn: 260443
Teresa Johnson [Wed, 10 Feb 2016 21:55:02 +0000 (21:55 +0000)]
Restore "[ThinLTO] Use MD5 hash in function index." with fix
This restores commit r260408, along with a fix for a bot failure.
The bot failure was caused by dereferencing a unique_ptr in the same
call instruction parameter list where it was passed via std::move.
Apparently due to luck this was not exposed when I built the compiler
with clang, only with gcc.
llvm-svn: 260442
Evgeniy Stepanov [Wed, 10 Feb 2016 21:53:28 +0000 (21:53 +0000)]
Fix invalid casts in <functional>.
static_cast of a pointer to object before the start of the object's
lifetime has undefined behavior.
This code triggers CFI warnings.
This change replaces C-style casts with reinterpret_cast, which is
fine per the standard, add applies an attribute to silence CFI (which
barks on reinterpret_cast, too).
llvm-svn: 260441
Zachary Turner [Wed, 10 Feb 2016 21:47:36 +0000 (21:47 +0000)]
Fix copy/paste error in TestCModules.
llvm-svn: 260440
Philip Reames [Wed, 10 Feb 2016 21:46:32 +0000 (21:46 +0000)]
[LVI] Handle constants defensively
There's nothing preventing callers of LVI from asking for lattice values representing a Constant. In fact, given that several callers are walking back through PHI nodes and trying to simplify predicates, such queries are actually quite common. This is mostly harmless today, but we start volatiling assertions if we add new calls to getBlockValue in otherwise reasonable places.
Note that this change is not NFC. Specifically:
1) The result returned through getValueAt will now be more precise. In principle, this could trigger any latent infinite optimization loops in callers, but in practice, we're unlikely to see this.
2) The result returned through getBlockValueAt is potentially weakened for non-constants that were previously queried. With the old code, you had the possibility that a later query might bypass the cache and discover some information the original query did not. I can't find a scenario which actually causes this to happen, but it was in principle possible. On the other hand, this may end up reducing compile time when the same value is queried repeatedly.
llvm-svn: 260439
Derek Schuff [Wed, 10 Feb 2016 21:43:16 +0000 (21:43 +0000)]
[WebAssembly] Re-triage list of compilation failures for torture tests
llvm-svn: 260438
Pete Cooper [Wed, 10 Feb 2016 21:32:24 +0000 (21:32 +0000)]
Use ArrayRef instead of deep copies of CompactUnwindEntries. NFC.
We have a vector of all of the compact unwind entries anyway, and
its live as long as we need it to be. So instead of copying from that
vector to another, just take references to the range of the original vector
we need for each compact unwind page.
llvm-svn: 260437
Enrico Granata [Wed, 10 Feb 2016 21:30:20 +0000 (21:30 +0000)]
No reason for these two letters to be uppercase
llvm-svn: 260436
Reid Kleckner [Wed, 10 Feb 2016 21:28:38 +0000 (21:28 +0000)]
[clang-cl] /Z7 now generates normal debug info, not just line info
Previously LLVM could not process any debug info we produced, so it
didn't make sense to spend time generating it. Now that it has primitive
support for local variable info, it does make sense to generate normal
debug info.
llvm-svn: 260435
Greg Clayton [Wed, 10 Feb 2016 21:28:13 +0000 (21:28 +0000)]
Now that SymbolFileDWARF supports having types in completely separate .pcm file with "-fmodules -gmodules", each SymbolFileDWARF can reference module DWARF info by looking in other DWARF files. Then if you have 1000 .o files that each reference one or more .pcm files in their debug info, a simple Module::FindTypes(...) call can end up searching the same .pcm file over and over and over. Now all internal FindTypes methods in classes (ModuleList, Module, SymbolFile) now take an extra argument:
llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files
Each time a SymbolFile::FindTypes() is called, it needs to check the searched_symbol_files list to make sure it hasn't already been asked to find the type and return immediately if it has been checked. This will stop circular dependencies from also crashing LLDB during type queries.
This has proven to be an issue when debugging large applications on MacOSX that use DWARF in .o files.
<rdar://problem/
24581488>
llvm-svn: 260434
Mandeep Singh Grang [Wed, 10 Feb 2016 21:06:10 +0000 (21:06 +0000)]
Test commit, fixed "clang" to "Clang" in docs
Reviewers: weimingz
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D17085
llvm-svn: 260433
Reid Kleckner [Wed, 10 Feb 2016 20:55:49 +0000 (20:55 +0000)]
[codeview] Describe int local variables using .cv_def_range
Summary:
Refactor common value, scope, and label tracking logic out of DwarfDebug
into a common base class called DebugHandlerBase.
Update an old LLVM IR test case to avoid an assertion in LexicalScopes.
Reviewers: dblaikie, majnemer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16931
llvm-svn: 260432
Eric Fiselier [Wed, 10 Feb 2016 20:46:23 +0000 (20:46 +0000)]
Recommit r260012 - Cleanup node-type handling in the unordered containers.
This time I kept <ext/hash_map> working!
This patch is the first in a series of patches that's meant to better
support unordered_map. unordered_map has a special "value_type" that
differs from pair<const Key, Value>. In order to meet the EmplaceConstructible
and CopyInsertable requirements we need to teach __hash_table about this
special value_type.
This patch creates a "__hash_node_types" traits class that contains
all of the typedefs needed by the unordered containers and it's iterators.
These typedefs include ones for each node type and node pointer type,
as well as special typedefs for "unordered_map"'s value type.
As a result of this change all of the unordered containers now all support
incomplete types.
As a drive-by fix I changed the difference_type in __hash_table to always
be ptrdiff_t. There is a corresponding change to size_type but it cannot
take affect until an ABI break.
This patch will be followed up shortly with fixes for various unordered_map
bugs and problems.
llvm-svn: 260431
Hemant Kulkarni [Wed, 10 Feb 2016 20:40:55 +0000 (20:40 +0000)]
[llvm-readobj] Option to emit readelf like output
New option --elf-output-style=LLVM or GNU
Enables -file-headers in readelf style when elf-output-style=GNU
Differential revision: http://reviews.llvm.org/D14128
llvm-svn: 260430
Derek Schuff [Wed, 10 Feb 2016 20:14:15 +0000 (20:14 +0000)]
[WebAssembly] Address comments left over from r260421
llvm-svn: 260429
Xinliang David Li [Wed, 10 Feb 2016 20:14:04 +0000 (20:14 +0000)]
[Coverage] add covmap v2 binary format regression test
llvm-svn: 260428
Nicolai Haehnle [Wed, 10 Feb 2016 20:13:58 +0000 (20:13 +0000)]
AMDGPU: Release the scavenged offset register during VGPR spill
Summary:
This fixes a crash where subsequent spills would be unable to scavenge
a register. In particular, it fixes a crash in piglit's
spec@glsl-1.50@execution@geometry@max-input-components (the test still
has a shader that fails to compile because of too many SGPR spills, but
at least it doesn't crash any more).
This is a candidate for the release branch.
Reviewers: arsenm, tstellarAMD
Subscribers: qcolombet, arsenm
Differential Revision: http://reviews.llvm.org/D16558
llvm-svn: 260427
Sanjay Patel [Wed, 10 Feb 2016 20:02:45 +0000 (20:02 +0000)]
[x86] refactor masked load/store combine logic ; NFCI
llvm-svn: 260426
Richard Smith [Wed, 10 Feb 2016 20:02:04 +0000 (20:02 +0000)]
Don't assume that there is only one strchr overload in the global namespace;
that's not true in general. Instead, use a preference order to pick the
standard C++ signature 'char*(char*, int)' where possible and fall back to the
C signature 'char*(const char*, int)' only when it's unavailable.
llvm-svn: 260425
Simon Atanasyan [Wed, 10 Feb 2016 19:57:19 +0000 (19:57 +0000)]
[ELF][MIPS] Add lazy relocation support for MIPS
The patch adds lazy relocation support for MIPS and R_MIPS_26 relocation
handing.
R_MIPS_26 relocation might require PLT entry creation. In that case it
is fully supported by the patch. But if the relocation target is a local
symbol we need to use a different expression to calculate the relocation
result. This case is not implemented yet because there is no method to
get know the kind of relocation target in the `relocateOne` routine.
Differential Revision: http://reviews.llvm.org/D16982
llvm-svn: 260424
Zachary Turner [Wed, 10 Feb 2016 19:53:45 +0000 (19:53 +0000)]
Remove skipUnlessListedRemote.
This was supposed to have been removed but made it back in
accidentally.
llvm-svn: 260423
Zachary Turner [Wed, 10 Feb 2016 19:53:36 +0000 (19:53 +0000)]
Remove expectedFailureLinux decorator.
llvm-svn: 260422
Derek Schuff [Wed, 10 Feb 2016 19:51:04 +0000 (19:51 +0000)]
[WebAssembly] Switch varags calling convention to use a register
Instead of passing varargs directly on the user stack, allocate a buffer in
the caller's stack frame and pass a pointer to it. This simplifies the C
ABI (e.g. non-C callers of C functions do not need to use C's user stack if
they have their own mechanism) and allows further optimizations in the future
(e.g. fewer functions may need to use the stack).
Differential Revision: http://reviews.llvm.org/D17048
llvm-svn: 260421
Anton Yartsev [Wed, 10 Feb 2016 19:46:41 +0000 (19:46 +0000)]
[analyzer] Windows: launch scan-build from an arbitrary location.
The following batch files allow to launch scan-build from an arbitrary location if path to clang\tools\scan-build-py\bin is added to %PATH%.
llvm-svn: 260420
Chad Rosier [Wed, 10 Feb 2016 19:45:48 +0000 (19:45 +0000)]
[AArch64] Refactor is logic into a helper function. NFC.
llvm-svn: 260419
Reid Kleckner [Wed, 10 Feb 2016 19:29:01 +0000 (19:29 +0000)]
Fix a -Wsign-compare in Support Path unittests
llvm-svn: 260418
Reid Kleckner [Wed, 10 Feb 2016 19:28:13 +0000 (19:28 +0000)]
Silence MSVC warning about falling off the end of a function after a fully covered switch
llvm-svn: 260417
Reid Kleckner [Wed, 10 Feb 2016 19:25:51 +0000 (19:25 +0000)]
Disable MSVC 2015's warning about zero extending after ~ and others
Very often in LLVM we have APIs that take a bitwidth and a uint64_t that
we pass immediates such as ~0U to. Consider APInt, Constant, and
MachineInstrBuilder::addImm. Fixing all uses of these APIs to manually
extend their arguments to uint64_t doesn't seem worth it.
llvm-svn: 260416
Eugene Zelenko [Wed, 10 Feb 2016 19:11:58 +0000 (19:11 +0000)]
Fix some Clang-tidy readability-redundant-control-flow warnings; other minor fixes.
Differential revision: http://reviews.llvm.org/D17060
llvm-svn: 260414
Reid Kleckner [Wed, 10 Feb 2016 19:11:15 +0000 (19:11 +0000)]
Silence some MSVC warnings about zero extending unsigned to void*
llvm-svn: 260413
Teresa Johnson [Wed, 10 Feb 2016 19:11:15 +0000 (19:11 +0000)]
Revert "[ThinLTO] Use MD5 hash in function index." due to bot failure
This reverts commit r260408. Bot failure that I need to investigate.
llvm-svn: 260412
Reid Kleckner [Wed, 10 Feb 2016 19:09:15 +0000 (19:09 +0000)]
Silence some MSVC false positive warnings about integer zexts and falling off the end of a covered switch
llvm-svn: 260411
Reid Kleckner [Wed, 10 Feb 2016 19:07:47 +0000 (19:07 +0000)]
Enable constexpr on Visual Studio 2015, add support for two equivalent attributes
Patch by Alexander Riccio
This patch enables `constexpr` on Visual Studio 2015 by adding `||
LLVM_MSC_PREREQ(1900)` to the preprocessor `#if` statement. Since VS2013
doesn't support `constexpr`, that's purposely excluded. The
`LLVM_CONSTEXPR` macro is used in ~25 places.
I also added the MSVC/SAL equivalent of:
- `__attribute__((__warn_unused_result__))` as an
`LLVM_ATTRIBUTE_UNUSED_RESULT` definition
- `__attribute__((returns_nonnull))` as an
`LLVM_ATTRIBUTE_RETURNS_NONNULL` definition
...in case anybody ever decides to run `/analyze` on LLVM (probably
myself, if anybody)
Reviewers: rnk, aaron.ballman
Differential Revision: http://reviews.llvm.org/D16751
llvm-svn: 260410
Matt Arsenault [Wed, 10 Feb 2016 19:04:12 +0000 (19:04 +0000)]
Fix return type of bool function
llvm-svn: 260409
Teresa Johnson [Wed, 10 Feb 2016 18:57:54 +0000 (18:57 +0000)]
[ThinLTO] Use MD5 hash in function index.
Summary:
This patch uses the lower 64-bits of the MD5 hash of a function name as
a GUID in the function index, instead of storing function names. Any
local functions are first given a global name by prepending the original
source file name. This is the same naming scheme and GUID used by PGO in
the indexed profile format.
This change has a couple of benefits. The primary benefit is size
reduction in the combined index file, for example 483.xalancbmk's
combined index file was reduced by around 70%. It should also result in
memory savings for the index file in memory, as the in-memory map is
also indexed by the hash instead of the string.
Second, this enables integration with indirect call promotion, since the
indirect call profile targets are recorded using the same global naming
convention and hash. This will enable the function importer to easily
locate function summaries for indirect call profile targets to enable
their import and subsequent promotion.
The original source file name is recorded in the bitcode in a new
module-level record for use in the ThinLTO backend pipeline.
Reviewers: davidxl, joker.eph
Subscribers: llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D17028
llvm-svn: 260408
Jordan Rose [Wed, 10 Feb 2016 18:54:41 +0000 (18:54 +0000)]
[ADT] Add "return *this;" to PointerEmbeddedInt::operator=.
llvm-svn: 260407
Chad Rosier [Wed, 10 Feb 2016 18:49:28 +0000 (18:49 +0000)]
[AArch64] Update comment to match reality. NFC.
llvm-svn: 260406
Reid Kleckner [Wed, 10 Feb 2016 18:46:42 +0000 (18:46 +0000)]
Disable the new Orc lazy JIT tests on Windows, they do not pass
llvm-svn: 260405
Matt Arsenault [Wed, 10 Feb 2016 18:40:04 +0000 (18:40 +0000)]
SelectionDAG: Make Properties a field of SDPatternOperator
Currently you can't specify node properties like commutativity on
a PatFrag. If you want to create a PatFrag on a commutative node
with a hasOneUse predicate, this enables you to specify that the
PatFrag is also commutable.
llvm-svn: 260404
Matt Arsenault [Wed, 10 Feb 2016 18:39:57 +0000 (18:39 +0000)]
SelectionDAG: Make min/max commutative and associative
llvm-svn: 260403
Xinliang David Li [Wed, 10 Feb 2016 18:38:27 +0000 (18:38 +0000)]
Rollback 260394 -- 32bit test needs more config support
llvm-svn: 260402
Colin LeMahieu [Wed, 10 Feb 2016 18:32:01 +0000 (18:32 +0000)]
[MC] Merge VK_PPC_TPREL in to generic VK_TPREL.
Differential Revision: http://reviews.llvm.org/D17038
llvm-svn: 260401
Rong Xu [Wed, 10 Feb 2016 18:24:45 +0000 (18:24 +0000)]
[PGO] Indirect-call profile annotation in IR level profiling
This patch reads the indirect-call value records in the profile and makes the
annotation in the indirect-call instruction. This is for IR level profile
instrumentation.
Differential Revision: http://reviews.llvm.org/D16935
llvm-svn: 260400
Matt Arsenault [Wed, 10 Feb 2016 18:21:45 +0000 (18:21 +0000)]
AMDGPU: Fix indentation and variable names
llvm-svn: 260399