Chris Bieneman [Tue, 15 Mar 2016 18:08:20 +0000 (18:08 +0000)]
[Driver] [Darwin] Fix linking libclang_rt.profile_*sim.a
Summary: isTarget*() calls are order-dependent. This is because iOS Sim *is* iOS. This means checks for the simulator version of the platform must always be ahead of checks for the embedded platform.
Reviewers: zaks.anna, bogner
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D17947
llvm-svn: 263567
Chris Bieneman [Tue, 15 Mar 2016 18:07:46 +0000 (18:07 +0000)]
[CMake] Add PACKAGE_VENDOR for customizing version output
Summary: This change adds a PACKAGE_VENDOR variable. When set it makes the version output more closely resemble the clang version output.
Reviewers: aprantl, bogner
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D18159
llvm-svn: 263566
Adam Nemet [Tue, 15 Mar 2016 18:06:20 +0000 (18:06 +0000)]
[LV] Preserve LoopInfo when store predication is used
This was a latent bug that got exposed by the change to add LoopSimplify
as a dependence to LoopLoadElimination. Since LoopInfo was corrupted
after LV, LoopSimplify mis-compiled nbench in the test-suite (more
details in the PR).
The problem was that when we create the blocks for predicated stores we
didn't add those to any loops.
The original testcase for store predication provides coverage for this
assuming we verify LI on the way out of LV.
Fixes PR26952.
llvm-svn: 263565
Davide Italiano [Tue, 15 Mar 2016 17:29:52 +0000 (17:29 +0000)]
[MC] Rename TLSDESC as it's not ARM specific.
Similarly to what was done for TLSCALL in r263515.
llvm-svn: 263564
Changpeng Fang [Tue, 15 Mar 2016 17:28:44 +0000 (17:28 +0000)]
AMDGPU/SI: Implement GroupStaticSize Intrinsic for Dynamic LDS
Summary:
Static LDS size is saved in MachineFunctionInfo::LDSSize,
We define a pseudo instruction with usesCustomInserter bit set. Then, in EmitInstrWithCustomInserter,
we replace this pseudo instruction with a mov of MachineFunctionInfo::LDSSize.
Reviewers:
arsenm
tstellarAMD
Subscribers
llvm-commits, arsenm
Differential Revision:
http://reviews.llvm.org/D18064
llvm-svn: 263563
Hemant Kulkarni [Tue, 15 Mar 2016 17:25:31 +0000 (17:25 +0000)]
[llvm-readobj] Impl GNU style printing of sections and relocations
Differential Revision: http://reviews.llvm.org/D17523
llvm-svn: 263561
David Majnemer [Tue, 15 Mar 2016 16:47:28 +0000 (16:47 +0000)]
[COFF] Don't trust a symbol's section number
This fixes a test which exposed an ASan issue.
We assumed that a symbol's section number had a corresponding section
without performing validation.
llvm-svn: 263558
Douglas Katzman [Tue, 15 Mar 2016 16:41:47 +0000 (16:41 +0000)]
Myriad: Add new sparc CPU kinds.
llvm-svn: 263557
Douglas Katzman [Tue, 15 Mar 2016 16:41:31 +0000 (16:41 +0000)]
Myriad: Pass -mcpu to movi{Compile,Asm}
Differential Revision: http://reviews.llvm.org/D18186
llvm-svn: 263556
Arpith Chacko Jacob [Tue, 15 Mar 2016 16:19:13 +0000 (16:19 +0000)]
Reverted reviews.llvm.org/D17877 to fix tests.
llvm-svn: 263555
Jonas Hahnfeld [Tue, 15 Mar 2016 15:55:58 +0000 (15:55 +0000)]
[libcxx] Remove localization tests for Russian month names
Commit
f49839299a085505eb673544744b61d2d9cdd1db in glibc-2.14 changed the
locales to the currently required format. However, they were again changed in
commit
55bdd2866f23b28422d969060b3518909a12b100 which has been released in 2.17.
That leads to the current situation where Debian and e.g. CentOS 6 have the
pre-2.14 locales, for example Ubuntu 14.04 has pre-2.17 and CentOS 7 on the
other hand has the newest locales in glibc-2.17.
Differential Revision: http://reviews.llvm.org/D18187
llvm-svn: 263554
Kuba Brecka [Tue, 15 Mar 2016 15:53:39 +0000 (15:53 +0000)]
Revert r263551 due to a test failure.
llvm-svn: 263553
Arpith Chacko Jacob [Tue, 15 Mar 2016 15:24:52 +0000 (15:24 +0000)]
[OpenMP] Base support for target directive codegen on NVPTX device.
Summary:
This patch adds base support for codegen of the target directive on the NVPTX device.
Reviewers: ABataev
Differential Revision: http://reviews.llvm.org/D17877
llvm-svn: 263552
Kuba Brecka [Tue, 15 Mar 2016 14:30:28 +0000 (14:30 +0000)]
[sanitizer] On OS X, verify that interceptors work and abort if not
On OS X 10.11+, we have "automatic interceptors", so we don't need to use DYLD_INSERT_LIBRARIES when launching instrumented programs. However, non-instrumented programs that load TSan late (e.g. via dlopen) are currently broken, as TSan will still try to initialize, but the program will crash/hang at random places (because the interceptors don't work). This patch adds an explicit check that interceptors are working, and if not, it aborts and prints out an error message suggesting to explicitly use DYLD_INSERT_LIBRARIES.
Differential Revision: http://reviews.llvm.org/D18121
llvm-svn: 263551
Benjamin Kramer [Tue, 15 Mar 2016 14:18:26 +0000 (14:18 +0000)]
[GlobalOpt] Don't look through aliases when sorting names of globals.
If both are different aliases to the same value the sorting becomes
non-deterministic as array_pod_sort is not stable.
llvm-svn: 263550
George Rimar [Tue, 15 Mar 2016 14:00:22 +0000 (14:00 +0000)]
Error/warning/log messages should start with lowercase letters.
llvm-svn: 263549
Chad Rosier [Tue, 15 Mar 2016 13:27:58 +0000 (13:27 +0000)]
[SLP] Update comment to reflect reality. NFC.
llvm-svn: 263548
Ewan Crawford [Tue, 15 Mar 2016 13:02:11 +0000 (13:02 +0000)]
Add regression test for expressions calling functions taking anonymous struct typedef arguments
This CL adds a regression test for the bug listed at https://llvm.org/bugs/show_bug.cgi?id=26790
Functionality was implemented in commit r263544
Author: Luke Drummond <luke.drummond@codeplay.com>
Differential Revision: http://reviews.llvm.org/D17777
llvm-svn: 263547
John Brawn [Tue, 15 Mar 2016 12:51:40 +0000 (12:51 +0000)]
Make it possible for AST plugins to enable themselves by default
Currently when an AST plugin is loaded it must then be enabled by passing
-plugin pluginname or -add-plugin pluginname to the -cc1 command line. This
patch adds a method to PluginASTAction which allows it to declare that the
action happens before, instead of, or after the main AST action, plus the
relevant changes to make the plugin action happen at that time automatically.
Differential Revision: http://reviews.llvm.org/D17959
llvm-svn: 263546
Ewan Crawford [Tue, 15 Mar 2016 09:50:16 +0000 (09:50 +0000)]
Fix expression evaluation for resolving anonymous aggregrate types with a typedefed name
This fixes a recently reported a bug(https://llvm.org/bugs/show_bug.cgi?id=26790) relating to the clang expression evaluator no longer being able to resolve calls to
functions with arguments to typedefed anonymous structs, unions, or enums after a cleanup to the expression parsing code in r260768
This fixes the issue by attaching the tagged name to the original clang::TagDecl object when generating the typedef in lldb::ClangAstContext::CreateTypeDef.
This also fixes the issue for anonymous typedefs for non-struct types (unions and enums) where we have a tag name.
Author: Luke Drummond <luke.drummond@codeplay.com>
Differential Revision: http://reviews.llvm.org/D18099
llvm-svn: 263544
David Majnemer [Tue, 15 Mar 2016 09:48:27 +0000 (09:48 +0000)]
[COFF] Don't hard-code the load configuration size
The load configuration directory is a structure whose size varies as the
OS gains additional functionality. To account for this, the structure's
layout begins with a size field; this allows loaders to know which
fields are available.
However, LLD hard-coded the sizes (112 bytes for 64-bit and 64 for
32-bit). This means that we might not inform the loader of all the
pertinent fields or we might claim that there are more fields than are
actually present.
To correctly account for this, the size field must be loaded from the
_load_config_used symbol.
N.B. The COFF spec is either wrong or out of date, the load
configuration directory is not correctly documented in the
specification: it omits the size field.
llvm-svn: 263543
David Majnemer [Tue, 15 Mar 2016 09:48:18 +0000 (09:48 +0000)]
[COFF] Remove an unused function, getFileOff
The function was not used and was not functional: all paths would lead
to report_fatal_error or endless stack recursion.
llvm-svn: 263542
Benjamin Kramer [Tue, 15 Mar 2016 09:41:39 +0000 (09:41 +0000)]
Restrict the hack from r263429 to asan and msan.
The other sanitizers don't have backend passes that rely on value names.
Avoid paying the compile time cost of names there.
llvm-svn: 263541
Nikolay Haustov [Tue, 15 Mar 2016 07:44:57 +0000 (07:44 +0000)]
[AMDGPU] Assembler: Update SOP* tests
Add VI encodings.
Reformat sopp.s to match style of other files.
Differential Revision: http://reviews.llvm.org/D18084
llvm-svn: 263540
David Majnemer [Tue, 15 Mar 2016 06:41:02 +0000 (06:41 +0000)]
[COFF] Use the correct size of the TLS directory
The TLS directory has a different layout depending on the bitness of the
machine the image will run on. LLD would always use the 64-bit TLS
directory for the data directory entry instead of an appropriately sized
TLS directory.
llvm-svn: 263539
Tobias Grosser [Tue, 15 Mar 2016 06:35:08 +0000 (06:35 +0000)]
MemAccInt: Do not strip pointer casts
This mirrors:
commit https://llvm.org/svn/llvm-project/llvm/trunk@263462
Author: Michael Kuperstein <michael.kuperstein@gmail.com>
Date: Mon Mar 14 18:34:29 2016 +0000
[AliasSetTracker] Do not strip pointer casts when processing MemSetInst
and fixes the failure the above commit triggered in Polly.
llvm-svn: 263538
David Majnemer [Tue, 15 Mar 2016 06:14:01 +0000 (06:14 +0000)]
[llvm-objdump] Add support for dumping the PE TLS directory
The PE TLS directory contains information about where the TLS data
resides in the image, what functions should be executed when threads are
created, etc.
llvm-svn: 263537
Andrew Wilkins [Tue, 15 Mar 2016 05:36:43 +0000 (05:36 +0000)]
[llgo] Roll gofrontend forward
Switch gofrontend to using go.googlesource.com, and
update to
81eb6a3f425b2158c67ee32c0cc973a72ce9d6be.
There are various changes required to update to the
go 1.5 runtime:
typemap.go is changed to accommodate the change in representation for equal/hash algorithms, and the removal of the zero value/type.
CMakeLists.txt is updated to add the build tree to the package search path, so internal packages, which are not installed, are found.
various files changes due to removal of __go_new_nopointers; the same change as in D11863, but with NoUnwindAttribute added to the added runtime functions which are called with "callOnly".
minor cleanups in ssa.go while investigating issues with unwinding/panic handling.
Differential Revisision: http://reviews.llvm.org/D15188
llvm-svn: 263536
Andrew Wilkins [Tue, 15 Mar 2016 05:04:06 +0000 (05:04 +0000)]
bindings/go: reinstate TargetMachine.TargetData
Summary:
LLVMGetTargetDataLayout was removed from the C API,
and then TargetMachine.TargetData was removed. Later,
LLVMCreateTargetMachineData was added to the C API,
and we now expose this via the Go API.
Reviewers: deadalnix, pcc
Subscribers: cierniak, llvm-commits, axw
Differential Revision: http://reviews.llvm.org/D18173
llvm-svn: 263530
Jason Molenda [Tue, 15 Mar 2016 04:36:11 +0000 (04:36 +0000)]
Bump the lldb version # in the xcode project files from
350.99.0 to 360.99.0.
llvm-svn: 263529
Lang Hames [Tue, 15 Mar 2016 04:20:49 +0000 (04:20 +0000)]
[MachO] Extend the alt_entry support for aliases added in r263521 to
expressions of the form 'a = .' and 'a = Ltmp'.
llvm-svn: 263528
Eric Christopher [Tue, 15 Mar 2016 03:01:31 +0000 (03:01 +0000)]
Use some braces to format this a little better.
llvm-svn: 263527
Teresa Johnson [Tue, 15 Mar 2016 02:41:29 +0000 (02:41 +0000)]
BitcodeWriter dyn_cast cleanup for r263275 (NFC)
Address review suggestions from dblaikie: change a few dyn_cast to cast
and fold a cast into if condition.
llvm-svn: 263526
Eric Christopher [Tue, 15 Mar 2016 02:19:06 +0000 (02:19 +0000)]
Fix llvm/llvm/lib/Transforms/Utils/LoopUnroll.cpp:285:53: error: suggest
parentheses around '&&' within '||' [-Werror=parentheses].
llvm-svn: 263525
Teresa Johnson [Tue, 15 Mar 2016 02:13:19 +0000 (02:13 +0000)]
Move global ID computation from Function to GlobalValue (NFC)
Since the static getGlobalIdentifier and getGUID methods are now called
for global values other than functions, reflect that by moving these
methods to the GlobalValue class.
llvm-svn: 263524
Enrico Granata [Tue, 15 Mar 2016 01:57:10 +0000 (01:57 +0000)]
Workaround the fact that "b" is now a separate command object from "_regexp-break", and thus "help b" doesn't show the possible syntaxes
It would be nice to have a longer-term plan for how to handle help for regular expression commands, since their syntax is highly irregular. I can see a few options (*), but for now this is a reasonable stop-gag measure for the most blatant regression.
(*) the simplest is, of course, to detect a regex command and inherit the syntax for any aliases thereof; it would be nice if this also didn't show the underlying regex command name when the alias is used
llvm-svn: 263523
Fiona Glaser [Tue, 15 Mar 2016 01:50:46 +0000 (01:50 +0000)]
DenseMap: make .resize() do the intuitive thing
In some places, like InstCombine, we resize a DenseMap to fit the elements
we intend to put in it, then insert those elements (to avoid continual
reallocations as it grows). But .resize(foo) doesn't actually do what
people think; it resizes to foo buckets (which is really an
implementation detail the user of DenseMap probably shouldn't care about),
not the space required to fit foo elements. DenseMap grows if 3/4 of its
buckets are full, so this actually causes one forced reallocation every
time instead of avoiding a reallocation.
This patch makes .resize(foo) do the intuitive thing: it grows to the size
necessary to fit foo elements without new allocations.
Also include a test to verify that .resize() actually does what we think it
does.
llvm-svn: 263522
Lang Hames [Tue, 15 Mar 2016 01:43:05 +0000 (01:43 +0000)]
[MachO] Add MachO alt-entry directive support.
This patch adds support for the MachO .alt_entry assembly directive, and uses
it for global aliases with non-zero GEP offsets. The alt_entry flag indicates
that a symbol should be layed out immediately after the preceding symbol.
Conceptually it introduces an alternate entry point for a function or data
structure. E.g.:
safe_foo:
// check preconditions for foo
.alt_entry fast_foo
fast_foo:
// body of foo, can assume preconditions.
The .alt_entry flag is also implicitly set on assembly aliases of the form:
a = b + C
where C is a non-zero constant, since these have the same effect as an
alt_entry symbol: they introduce a label that cannot be moved relative to the
preceding one. Setting the alt_entry flag on aliases of this form fixes
http://llvm.org/PR25381.
llvm-svn: 263521
Enrico Granata [Tue, 15 Mar 2016 01:43:00 +0000 (01:43 +0000)]
Add some test coverage for the changes in alias help
llvm-svn: 263520
Enrico Granata [Tue, 15 Mar 2016 01:42:34 +0000 (01:42 +0000)]
Improve the way we decide whether an alias is a dashdash alias
llvm-svn: 263519
Kostya Serebryany [Tue, 15 Mar 2016 01:28:00 +0000 (01:28 +0000)]
[libFuzzer] use max_len exactly equal to the max size of input. Fix 32-bit build
llvm-svn: 263518
Enrico Granata [Tue, 15 Mar 2016 01:17:32 +0000 (01:17 +0000)]
This was printing arguments twice in dash-dash aliases; don't do that
llvm-svn: 263517
Sanjoy Das [Tue, 15 Mar 2016 01:16:31 +0000 (01:16 +0000)]
[StatepointLowering] Move an assertion; NFCI
Instead of running an explicit loop over `gc.relocate` calls hanging off
of a `gc.statepoint`, assert the validity of the type of the value being
relocated in `visitRelocate`.
llvm-svn: 263516
Davide Italiano [Tue, 15 Mar 2016 00:25:22 +0000 (00:25 +0000)]
[MC] Rename TLSCALL as it's not ARM specific.
`MCSymbolRefExpr` variant kind for TLSCALL is prefixed with
_ARM_ since this is how it was originally implemented.
The X86_64 version is exactly the same so there's no reason
to create a new variant, we can just rename the existing
one to be machine-independent.
This generalization is the first step to implement support
for GNU2 TLS dialect in MC.
Differential Revision: http://reviews.llvm.org/D18160
llvm-svn: 263515
Teresa Johnson [Tue, 15 Mar 2016 00:04:44 +0000 (00:04 +0000)]
[ThinLTO] Clang side of renaming of function index (NFC)
This is the companion to an LLVM patch that renamed the function index
data structures and files to use the more general module summary index.
(Recommit after fixing LLVM side to add back missed file)
llvm-svn: 263514
Teresa Johnson [Tue, 15 Mar 2016 00:04:37 +0000 (00:04 +0000)]
[ThinLTO] Renaming of function index to module summary index (NFC)
(Resubmitting after fixing missing file issue)
With the changes in r263275, there are now more than just functions in
the summary. Completed the renaming of data structures (started in
r263275) to reflect the wider scope. In particular, changed the
FunctionIndex* data structures to ModuleIndex*, and renamed related
variables and comments. Also renamed the files to reflect the changes.
A companion clang patch will immediately succeed this patch to reflect
this renaming.
llvm-svn: 263513
Eric Christopher [Mon, 14 Mar 2016 23:59:57 +0000 (23:59 +0000)]
Temporarily Revert "[X86][SSE] Simplify vector LOAD + EXTEND on
pre-SSE41 hardware" as it seems to be causing crashes during code
generation in halide. PR forthcoming.
This reverts commit r263303.
llvm-svn: 263512
Rui Ueyama [Mon, 14 Mar 2016 23:16:13 +0000 (23:16 +0000)]
Add dependency to llvm-dis.
test/ELF/lto/save-temps.ll uses the tool.
llvm-svn: 263511
Rui Ueyama [Mon, 14 Mar 2016 23:16:09 +0000 (23:16 +0000)]
Use ELFT instead of ELFFile<ELFT>.
llvm-svn: 263510
Justin Lebar [Mon, 14 Mar 2016 23:15:34 +0000 (23:15 +0000)]
[LoopUnroll] Respect the convergent attribute.
Summary:
Specifically, when we perform runtime loop unrolling of a loop that
contains a convergent op, we can only unroll k times, where k divides
the loop trip multiple.
Without this change, we'll happily unroll e.g. the following loop
for (int i = 0; i < N; ++i) {
if (i == 0) convergent_op();
foo();
}
into
int i = 0;
if (N % 2 == 1) {
convergent_op();
foo();
++i;
}
for (; i < N - 1; i += 2) {
if (i == 0) convergent_op();
foo();
foo();
}.
This is unsafe, because we've just added a control-flow dependency to
the convergent op in the prelude.
In general, runtime unrolling loops that contain convergent ops is safe
only if we don't have emit a prelude, which occurs when the unroll count
divides the trip multiple.
Reviewers: resistor
Subscribers: llvm-commits, mzolotukhin
Differential Revision: http://reviews.llvm.org/D17526
llvm-svn: 263509
NAKAMURA Takumi [Mon, 14 Mar 2016 23:11:28 +0000 (23:11 +0000)]
MathExtrasTest.cpp: Use EXPECT_DOUBLE_EQ here, instead of EXPECT_FLOAT_EQ.
llvm-svn: 263508
Marshall Clow [Mon, 14 Mar 2016 23:07:58 +0000 (23:07 +0000)]
Missed this file in previous checkin
llvm-svn: 263507
Marshall Clow [Mon, 14 Mar 2016 23:07:32 +0000 (23:07 +0000)]
Implement LWG2577: {shared,unique}_lock</tt> should use std::addressof
llvm-svn: 263506
NAKAMURA Takumi [Mon, 14 Mar 2016 23:00:44 +0000 (23:00 +0000)]
clang/test/CodeGenCXX/virtual-function-attrs.cpp: Appease i686-mingw32 to expect x86_thiscallcc.
llvm-svn: 263505
Rui Ueyama [Mon, 14 Mar 2016 22:58:21 +0000 (22:58 +0000)]
Object: Add ELF types to ELFType.
These types are defined in ELFFile, so in order to use them, you have
to write ELFFile<ELFT>::SomeType. But there seems to be no reason to have
ELFFile have these types. This patch allows you to write ELFT::SomeType
instead.
This simplifies libObject users.
This is an example: http://reviews.llvm.org/D18129
http://reviews.llvm.org/D18130
llvm-svn: 263504
Amaury Sechet [Mon, 14 Mar 2016 22:52:27 +0000 (22:52 +0000)]
Imporove load to store => memcpy
Summary: This now try to reorder instructions in order to help create the optimizable pattern.
Reviewers: craig.topper, spatel, dexonsmith, Prazek, chandlerc, joker.eph, majnemer
Differential Revision: http://reviews.llvm.org/D16523
llvm-svn: 263503
Rui Ueyama [Mon, 14 Mar 2016 22:41:08 +0000 (22:41 +0000)]
Make getAlignment a non-member function. NFC.
This function did not rely on Writer class.
llvm-svn: 263502
Manuel Jacob [Mon, 14 Mar 2016 22:34:17 +0000 (22:34 +0000)]
Re-add ConstantFoldInstOperands form taking opcode and return type.
Summary:
This form was replaced by a form taking an instruction instead of opcode and
return type in r258391. After committing this change (and some depending,
follow-up changes) it turned out in the review thread to be controversial. The
discussion didn't come to a conclusion yet. I'm re-adding the old form to fix
the API regression and to provide a better base for discussion, possibly on
llvm-dev.
A difference to the original function is that it can't be called with GEPs
(similarly to how it was already the case for compares). In order to support
opaque pointers in the future, folding GEPs needs to be passed the source
element type, which is not possible with the current API.
Reviewers: dberlin, reames
Subscribers: dblaikie, eddyb
Differential Revision: http://reviews.llvm.org/D17901
llvm-svn: 263501
Easwaran Raman [Mon, 14 Mar 2016 22:23:28 +0000 (22:23 +0000)]
Remove code added for debugging purposes. NFC.
llvm-svn: 263500
Enrico Granata [Mon, 14 Mar 2016 22:17:04 +0000 (22:17 +0000)]
Lots of progress on the CommandAlias refactoring
This cleans things up such CommandAlias essentially can work as its own object; the aliases still live in a separate map, but are now just full-fledged CommandObjectSPs
This patch also cleans up help generation for aliases, allows aliases to vend their own help, and adds a tweak such that "dash-dash aliases", such as po, don't show the list of options for their underlying command, since those can't be provided anyway
I plan to fix up a few more things here, and then add a test case and proclaim victory
llvm-svn: 263499
Justin Bogner [Mon, 14 Mar 2016 21:54:45 +0000 (21:54 +0000)]
llvm-shlib: Remove the option to override __cxa_atexit
If anybody is actually using this, it probably doesn't do what they
think it does. This actually causes the dylib to *export* a
__cxa_atexit symbol, so anything that links it probably loses their
exit time destructors as well as disabling LLVM's.
This just removes the option entirely. If somebody does need this
behaviour we should figure out a more principled way to do it.
This is effectively a revert of r223805.
llvm-svn: 263498
Reid Kleckner [Mon, 14 Mar 2016 21:39:58 +0000 (21:39 +0000)]
llvm-config: fix --libs on Linux
Summary:
llvm-config --libs does not produce correct output since commit r260263
(llvm-config: Add preliminary Windows support) changed naming format of
the libraries. This patch updates llvm-config to recognize new naming
format and output correct linker flags.
Ref: https://llvm.org/bugs/show_bug.cgi?id=26581
Patch by Vedran Miletić
Reviewers: ehsan, rnk, pxli168
Subscribers: pxli168
Differential Revision: http://reviews.llvm.org/D17300
llvm-svn: 263497
Rui Ueyama [Mon, 14 Mar 2016 21:31:07 +0000 (21:31 +0000)]
Error messages should start with lowercase letters.
llvm-svn: 263496
Amaury Sechet [Mon, 14 Mar 2016 21:24:11 +0000 (21:24 +0000)]
Factor out MachineBlockPlacement::fillWorkLists. NFC
Summary: There are places in MachineBlockPlacement where a worklist is filled in pretty much identical way. The code is duplicated. This refactor it so that the same code is used in both scenarii.
Reviewers: chandlerc, majnemer, rafael, MatzeB, escha, silvas
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D18077
llvm-svn: 263495
Teresa Johnson [Mon, 14 Mar 2016 21:18:17 +0000 (21:18 +0000)]
Revert "[ThinLTO] Clang side of renaming of function index (NFC)"
This reverts commit r263491. Missed a file on the LLVM side.
llvm-svn: 263494
Teresa Johnson [Mon, 14 Mar 2016 21:18:10 +0000 (21:18 +0000)]
Revert "[ThinLTO] Renaming of function index to module summary index (NFC)"
This reverts commit r263490. Missed a file.
llvm-svn: 263493
Teresa Johnson [Mon, 14 Mar 2016 21:06:06 +0000 (21:06 +0000)]
[ThinLTO] Clang side of renaming of function index (NFC)
This is the companion to an LLVM patch that renamed the function index
data structures and files to use the more general module summary index.
llvm-svn: 263491
Teresa Johnson [Mon, 14 Mar 2016 21:05:56 +0000 (21:05 +0000)]
[ThinLTO] Renaming of function index to module summary index (NFC)
With the changes in r263275, there are now more than just functions in
the summary. Completed the renaming of data structures (started in
r263275) to reflect the wider scope. In particular, changed the
FunctionIndex* data structures to ModuleIndex*, and renamed related
variables and comments. Also renamed the files to reflect the changes.
A companion clang patch will immediately succeed this patch to reflect
this renaming.
llvm-svn: 263490
Keno Fischer [Mon, 14 Mar 2016 20:49:06 +0000 (20:49 +0000)]
[JITEventListener] Fix some -Wundef warnings
Summary:
This check was added in rL152620, and has started causing downstream warnings in Julia:
```
In file included from /home/tkelman/Julia/julia-0.5/src/codegen.cpp:22:0:
/home/tkelman/Julia/julia-0.5/usr/include/llvm/ExecutionEngine/JITEventListener.h:84:5: warning: "LLVM_USE_INTEL_JITEVENTS" is not defined [-Wundef]
#if LLVM_USE_INTEL_JITEVENTS
^
/home/tkelman/Julia/julia-0.5/usr/include/llvm/ExecutionEngine/JITEventListener.h:100:5: warning: "LLVM_USE_OPROFILE" is not defined [-Wundef]
#if LLVM_USE_OPROFILE
^
```
Patch by Tony Kelman.
Reviewers: loladiro
Differential Revision: http://reviews.llvm.org/D17254
llvm-svn: 263487
Ed Maste [Mon, 14 Mar 2016 20:39:08 +0000 (20:39 +0000)]
Shuffle an #undef to avoid a warning on FreeBSD
On FreeBSD _LIBCPP_EXTERN_TEMPLATE is being defined from something
included by lldb/lldb-private.h. Undefine it after the #include to avoid
the redefinition warning.
Differential Revision: http://reviews.llvm.org/D17402
llvm-svn: 263486
Adam Nemet [Mon, 14 Mar 2016 20:38:55 +0000 (20:38 +0000)]
Revert "Turn LoopLoadElimination on again"
This reverts commit r263472.
There is an LNT failure on clang-ppc64be-linux-lnt. Turn this off,
while I am investigating.
llvm-svn: 263485
Chris Bieneman [Mon, 14 Mar 2016 20:23:21 +0000 (20:23 +0000)]
[CMake] Updating Apple Clang CMake caches
This is a big update that gets the public configurations more in line with the ones we're actually using internally to ship Clang in Xcode.
From here forward I expect most of the changes in these files to be incremental as the changes get made internally.
llvm-svn: 263483
Sanjay Patel [Mon, 14 Mar 2016 20:18:59 +0000 (20:18 +0000)]
allow branch weight metadata on select instructions (PR26636)
As noted in:
https://llvm.org/bugs/show_bug.cgi?id=26636
This doesn't accomplish anything on its own. It's the first step towards preserving
and using branch weights with selects.
The next step would be to make sure we're propagating the info in all of the other
places where we create selects (SimplifyCFG, InstCombine, etc). I don't think there's
an easy fix to make this happen; we have to look at each transform individually to
determine how to correctly propagate the weights.
Along with that step, we need to then use the weights when making subsequent transform
decisions such as discussed in http://reviews.llvm.org/D16836.
The inliner test is independent but closely related. It verifies that metadata is
preserved when both branches and selects are cloned.
Differential Revision: http://reviews.llvm.org/D18133
llvm-svn: 263482
Justin Lebar [Mon, 14 Mar 2016 20:18:54 +0000 (20:18 +0000)]
[attrs] Handle convergent CallSites.
Summary:
Previously we had a notion of convergent functions but not of convergent
calls. This is insufficient to correctly analyze calls where the target
is unknown, e.g. indirect calls.
Now a call is convergent if it targets a known-convergent function, or
if it's explicitly marked as convergent. As usual, we can remove
convergent where we can prove that no convergent operations are
performed in the call.
Originally landed as r261544, then reverted in r261544 for (incidental)
build breakage. Re-landed here with no changes.
Reviewers: chandlerc, jingyue
Subscribers: llvm-commits, tra, jhen, hfinkel
Differential Revision: http://reviews.llvm.org/D17739
llvm-svn: 263481
Justin Lebar [Mon, 14 Mar 2016 20:18:51 +0000 (20:18 +0000)]
[docs] "Straightforward" is one word.
llvm-svn: 263480
Justin Lebar [Mon, 14 Mar 2016 20:17:08 +0000 (20:17 +0000)]
[docs] Fix typo in docs/CodeGenerator.rst.
llvm-svn: 263479
Ulrich Weigand [Mon, 14 Mar 2016 20:16:30 +0000 (20:16 +0000)]
[SystemZ] Add missing isBranch flags to certain instruction
Some instructions were missing isBranch, isCall, or isTerminator
flags. This didn't really affect code generation since most of
the affected patterns were used only for the AsmParser and/or
disassembler.
However, it could affect tools using the MC layer to disassemble
and parse binary code (e.g. via MCInstrDesc::mayAffectControlFlow).
llvm-svn: 263478
Peter Collingbourne [Mon, 14 Mar 2016 20:13:59 +0000 (20:13 +0000)]
Relax test introduced in r263464 to accept ARM ABI output.
Should fix ARM bots.
llvm-svn: 263477
Keno Fischer [Mon, 14 Mar 2016 20:04:24 +0000 (20:04 +0000)]
[SLPVectorizer] Fix dependency list
Summary:
DemandedBits was added to the requirements of SLPVectorizer in rL261212
(and various earlier version of it), but the appropriate initialization
statement was accidentally forgotten.
Ref [[ https://github.com/JuliaLang/julia/issues/14998 | JuliaLang/julia#14998 ]].
Patch by Yichao Yu.
Reviewers: mssimpso
Differential Revision: http://reviews.llvm.org/D18152
llvm-svn: 263476
Aaron Ballman [Mon, 14 Mar 2016 20:03:15 +0000 (20:03 +0000)]
Reverting r263474; it turns out there are uses of the public interface, but MSVC wasn't caring about them.
http://lab.llvm.org:8080/green//job/clang-stage1-cmake-RA-incremental_build/21475/consoleFull#-
45876453249ba4694-19c4-4d7e-bec5-
911270d8a58c
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/8879
llvm-svn: 263475
Aaron Ballman [Mon, 14 Mar 2016 19:57:48 +0000 (19:57 +0000)]
The file header of TrailingObjects.h suggests that TrailingObjects be inherited privately because the public APIs it exposes are not meant as part of the interface. There's no functional change because nothing currently relied on these being inherited publicly.
llvm-svn: 263474
Rui Ueyama [Mon, 14 Mar 2016 19:53:52 +0000 (19:53 +0000)]
ELF: Update the document.
llvm-svn: 263473
Adam Nemet [Mon, 14 Mar 2016 19:40:25 +0000 (19:40 +0000)]
Turn LoopLoadElimination on again
The two issues that were discovered got fixed (r263058, r263173).
The pass can be disabled with -mllvm -enable-loop-load-elim=0
llvm-svn: 263472
Rui Ueyama [Mon, 14 Mar 2016 19:37:58 +0000 (19:37 +0000)]
Revert r263366: Cosmetic change to reduce repetitions. NFC.
This reverts commit r263366 because it caused link errors in some linkers.
llvm-svn: 263471
Daniel Jasper [Mon, 14 Mar 2016 19:21:36 +0000 (19:21 +0000)]
clang-format: [JS] Handle certain cases of ASI.
Automatic Semicolon Insertion can only be properly handled by parsing
source code. However conservatively catching just a few, common
situations prevents breaking code during development, which greatly
improves usability.
JS code should still use semicolons, and ASI code should be flagged by
a compiler or linter.
Patch by Martin Probst. Thank you.
llvm-svn: 263470
Peter Collingbourne [Mon, 14 Mar 2016 19:07:10 +0000 (19:07 +0000)]
CodeGen: Use 32-bit gep offsets to address vtable address points.
The relative vtable ABI will use a struct rather than an array as the type
of a vtable. LLVM only allows 32-bit integers as struct indices, so we need
to use 32-bit integers to get addresses of address points. In order to keep
the code simple, we might as well do that unconditionally.
It's probably a reasonable implementation limit to support no more than 2
billion virtual functions per class.
This change causes quite a bit of churn in the test suite, so I'm making
it separately.
Differential Revision: http://reviews.llvm.org/D18113
llvm-svn: 263469
Enrico Granata [Mon, 14 Mar 2016 19:00:21 +0000 (19:00 +0000)]
More of the alias refactoring work! CommandAlias is now a CommandObject
llvm-svn: 263468
Ed Maste [Mon, 14 Mar 2016 18:59:44 +0000 (18:59 +0000)]
Enable expectedFailure for all Clang versions in TestRegisterVariables
In r262970 this was changed from xfail Clang < 3.5 to > 3.5, but it
still fails on FreeBSD 10's system Clang 3.4.1 so assume it fails on
all versions.
llvm.org/pr26937
llvm-svn: 263467
Rui Ueyama [Mon, 14 Mar 2016 18:43:01 +0000 (18:43 +0000)]
ELF: Add a few numbers to the document.
llvm-svn: 263466
Peter Collingbourne [Mon, 14 Mar 2016 18:41:59 +0000 (18:41 +0000)]
CodeGen: Mark functions used in vtables as unnamed_addr.
This marks virtual function declarations, as well as runtime library functions
__cxa_pure_virtual, __cxa_deleted_virtual and _purecall, as unnamed_addr. This
will allow us to correctly form relative references to them from vtables in
the relative vtable ABI.
Differential Revision: http://reviews.llvm.org/D18071
llvm-svn: 263464
Michael Kuperstein [Mon, 14 Mar 2016 18:34:29 +0000 (18:34 +0000)]
[AliasSetTracker] Do not strip pointer casts when processing MemSetInst
This fixes PR26843.
llvm-svn: 263462
Chad Rosier [Mon, 14 Mar 2016 18:24:34 +0000 (18:24 +0000)]
[AArch64] Refactor AArch64FrameLowering::emitPrologue. NFC.
http://reviews.llvm.org/D18125
Patch by Aditya Kumar.
llvm-svn: 263461
Quentin Colombet [Mon, 14 Mar 2016 18:21:25 +0000 (18:21 +0000)]
[SpillPlacement] Fix a quadratic behavior in spill placement.
The bad behavior happens when we have a function with a long linear chain of
basic blocks, and have a live range spanning most of this chain, but with very
few uses.
Let say we have only 2 uses.
The Hopfield network is only seeded with two active blocks where the uses are,
and each iteration of the outer loop in `RAGreedy::growRegion()` only adds two
new nodes to the network due to the completely linear shape of the CFG.
Meanwhile, `SpillPlacer->iterate()` visits the whole set of discovered nodes,
which adds up to a quadratic algorithm.
This is an historical accident effect from r129188.
When the Hopfield network is expanding, most of the action is happening on the
frontier where new nodes are being added. The internal nodes in the network are
not likely to be flip-flopping much, or they will at least settle down very
quickly. This means that while `SpillPlacer->iterate()` is recomputing all the
nodes in the network, it is probably only the two frontier nodes that are
changing their output.
Instead of recomputing the whole network on each iteration, we can maintain a
SparseSet of nodes that need to be updated:
- `SpillPlacement::activate()` adds the node to the todo list.
- When a node changes value (i.e., `update()` returns true), its neighbors are
added to the todo list.
- `SpillPlacement::iterate()` only updates the nodes in the list.
The result of Hopfield iterations is not necessarily exact. It should converge
to a local minimum, but there is no guarantee that it will find a global
minimum. It is possible that updating nodes in a different order will cause us
to switch to a different local minimum. In other words, this is not NFC, but
although I saw a few runtime improvements and regressions when I benchmarked
this change, those were side effects and actually the performance change is in
the noise as expected.
Huge thanks to Jakob Stoklund Olesen <stoklund@2pi.dk> for his feedbacks,
guidance and time for the review.
llvm-svn: 263460
Chad Rosier [Mon, 14 Mar 2016 18:17:41 +0000 (18:17 +0000)]
[AArch64] Break the dependency between FP and SP when possible.
When the SP in not changed because of realignment/VLAs etc., we restore the SP
by using the previous value of SP and not the FP. Breaking the dependency will
help in cases when the epilog of a callee is close to the epilog of the caller;
for then "sub sp, fp, #" depends on the load restoring the FP in the epilog of
the callee.
http://reviews.llvm.org/D18060
Patch by Aditya Kumar and Evandro Menezes.
llvm-svn: 263458
Quentin Colombet [Mon, 14 Mar 2016 18:10:41 +0000 (18:10 +0000)]
[ADT] Add a pop_back_val method to the SparseSet container.
The next commit will use it.
llvm-svn: 263455
Chad Rosier [Mon, 14 Mar 2016 18:10:20 +0000 (18:10 +0000)]
[Mips] Fix -Wunused-private-field warning after r263444.
llvm-svn: 263454
Sanjay Patel [Mon, 14 Mar 2016 18:09:43 +0000 (18:09 +0000)]
[DAG] use !isUndef() ; NFCI
llvm-svn: 263453
Marshall Clow [Mon, 14 Mar 2016 17:58:54 +0000 (17:58 +0000)]
Add failing tests that I forgot to add to the last commit
llvm-svn: 263451
Marshall Clow [Mon, 14 Mar 2016 17:58:11 +0000 (17:58 +0000)]
Implement LWG#2566: Requirements on the first template parameter of container adaptors
llvm-svn: 263450
Richard Smith [Mon, 14 Mar 2016 17:52:37 +0000 (17:52 +0000)]
[modules] Don't diagnose non-modular includes from modular files that are
implementation units of modules rather than interface units.
llvm-svn: 263449