6 years ago[ValueObjectSynthetic and ValueObjectDynamicValue] Override GetDeclaration
Siva Chandra [Tue, 18 Aug 2015 17:56:06 +0000 (17:56 +0000)]
[ValueObjectSynthetic and ValueObjectDynamicValue] Override GetDeclaration

Returns the declaration of the parent (non-synthetic or static) value.

Reviewers: granata.enrico, clayborg

Subscribers: lldb-commits

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

llvm-svn: 245319

6 years ago[PM/AA] Remove the last relics of the separate IPA library from LLVM,
Chandler Carruth [Tue, 18 Aug 2015 17:51:53 +0000 (17:51 +0000)]
[PM/AA] Remove the last relics of the separate IPA library from LLVM,
folding the code into the main Analysis library.

There already wasn't much of a distinction between Analysis and IPA.
A number of the passes in Analysis are actually IPA passes, and there
doesn't seem to be any advantage to separating them.

Moreover, it makes it hard to have interactions between analyses that
are both local and interprocedural. In trying to make the Alias Analysis
infrastructure work with the new pass manager, it becomes particularly
awkward to navigate this split.

I've tried to find all the places where we referenced this, but I may
have missed some. I have also adjusted the C API to continue to be
equivalently functional after this change.

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

llvm-svn: 245318

6 years ago[CMake] Refactoring add_compiler_rt functions for darwin runtimes.
Chris Bieneman [Tue, 18 Aug 2015 17:32:18 +0000 (17:32 +0000)]
[CMake] Refactoring add_compiler_rt functions for darwin runtimes.

Summary: This patch consolidates add_compiler_rt_osx_static_runtime and add_compiler_rt_darwin_dynamic_runtime into a single new function add_compiler_rt_darwin_runtime.

Reviewers: filcab, samsonov, bogner

Subscribers: llvm-commits

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

llvm-svn: 245317

6 years agoMove early exit to the beginning of the function
Michael Kruse [Tue, 18 Aug 2015 17:25:48 +0000 (17:25 +0000)]
Move early exit to the beginning of the function

If the function exits early there is no reason to enter the loop.

llvm-svn: 245316

6 years agoMIR Parser: Implicit register verifier should accept unexpected implicit
Alex Lorenz [Tue, 18 Aug 2015 17:17:13 +0000 (17:17 +0000)]
MIR Parser: Implicit register verifier should accept unexpected implicit
subregister operands.

llvm-svn: 245315

6 years ago[LVI] Use a SmallDenseMap instead of std::map for ValueCacheEntryTy
Bruno Cardoso Lopes [Tue, 18 Aug 2015 16:54:36 +0000 (16:54 +0000)]
[LVI] Use a SmallDenseMap instead of std::map for ValueCacheEntryTy

Historically there seems to be some resistance regarding the change to DenseMap
(r147980). However, I couldn't find cases of iterator invalidation for
ValueCacheEntryTy, but only for ValueCache, which I left untouched.

This reduces 20s on an internal testcase. Follow up from r245309.

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


llvm-svn: 245314

6 years agouse minSize wrapper; NFCI
Sanjay Patel [Tue, 18 Aug 2015 16:44:23 +0000 (16:44 +0000)]
use minSize wrapper; NFCI

These were missed when other uses were switched over:

llvm-svn: 245311

6 years ago[clang-tidy] Fixed typos and formatting in a comment. NFC
Alexander Kornienko [Tue, 18 Aug 2015 16:43:07 +0000 (16:43 +0000)]
[clang-tidy] Fixed typos and formatting in a comment. NFC

llvm-svn: 245310

6 years ago[LVI] Improve LazyValueInfo compile time performance
Bruno Cardoso Lopes [Tue, 18 Aug 2015 16:34:27 +0000 (16:34 +0000)]
[LVI] Improve LazyValueInfo compile time performance

Changes in LoopUnroll in the past six months exposed scalability
issues in LazyValueInfo when used from JumpThreading. One internal test
that used to take 20s under -O2 now takes 6min.

This commit change the OverDefinedCache from
DenseSet<std::pair<AssertingVH<BasicBlock>, Value*>> to
DenseMap<AssertingVH<BasicBlock>, SmallPtrSet<Value *, 4>>
and reduces compile time down to 1m40s.

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


llvm-svn: 245309

6 years ago[AArch64] Simplify the logic for computing in bounds offset. NFC.
Chad Rosier [Tue, 18 Aug 2015 16:20:03 +0000 (16:20 +0000)]
[AArch64] Simplify the logic for computing in bounds offset. NFC.

llvm-svn: 245307

6 years ago[mips] Expand JAL instructions when PIC is enabled.
Daniel Sanders [Tue, 18 Aug 2015 16:18:09 +0000 (16:18 +0000)]
[mips] Expand JAL instructions when PIC is enabled.

Summary: This is the correct way to handle JAL instructions when PIC is enabled.

Patch by Toma Tabacu

Reviewers: seanbruno, tomatabacu

Subscribers: brooks, seanbruno, emaste, llvm-commits

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

llvm-svn: 245305

6 years agoWe shouldn't need to pass -fno-strict-aliasing when building clang with clang.
Chris Bieneman [Tue, 18 Aug 2015 16:15:44 +0000 (16:15 +0000)]
We shouldn't need to pass -fno-strict-aliasing when building clang with clang.

Summary: The code comments in the Makefile indicate this was put in place to support issues when building clang with GCC. Today clang's strict aliasing works, so we shouldn't pass -fno-strict-aliasing when building with clang.

Reviewers: bogner, echristo

Subscribers: cfe-commits

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

llvm-svn: 245304

6 years agoUse isl_set_is_subset instead of isl_set_is_equal
Roman Gareev [Tue, 18 Aug 2015 16:12:05 +0000 (16:12 +0000)]
Use isl_set_is_subset instead of isl_set_is_equal

It helps to detect correct strides in case of parametric constraints of Stride
in MemoryAccess::isStrideX.

Reviewers: grosser
llvm-svn: 245303

6 years ago[MC] Convert another bunch of tests from macho-dump to llvm-readobj.
Davide Italiano [Tue, 18 Aug 2015 16:05:13 +0000 (16:05 +0000)]
[MC] Convert another bunch of tests from macho-dump to llvm-readobj.

This is (almost) everything under MC/MachO/ARM. There are still some
cases missing, because llvm-readobj doesn't (yet) support some features,
that macho-dump provides. I plan to reduce the gap between them shortly.

llvm-svn: 245302

6 years agoFix test cases which fail due to changes in isl's set representation
Tobias Grosser [Tue, 18 Aug 2015 15:28:02 +0000 (15:28 +0000)]
Fix test cases which fail due to changes in isl's set representation

llvm-svn: 245301

6 years agoUse schedule trees to compute dependences
Tobias Grosser [Tue, 18 Aug 2015 15:05:29 +0000 (15:05 +0000)]
Use schedule trees to compute dependences

This patch changes Polly to compute the data-dependences on the schedule tree
instead of a flat schedule representation. Calculating dependences directly on
the schedule tree results in some good compile-time improvements (adi : -23.35%,
3mm : -9.57%), as the structure of the schedule can be exploited for increased

Earlier experiments with schedule tree based dependence analysis in Polly showed
some compile-time regressions. These regressions arose due to the schedule tree
based dependence analysis not taking into account the domain constraints of the
schedule tree. As a result, the computed dependences were different and this
difference caused in some cases the schedule optimizer to take a very long time.
Since isl version fe865996 the schedule tree based dependence analysis takes
domain constraints into account, which fixes the earlier compile-time issues.

Contributed-by: Pratik Bhatu <cs12b1010@iith.ac.in>
llvm-svn: 245300

6 years agotest commit revert
Roman Gareev [Tue, 18 Aug 2015 14:56:50 +0000 (14:56 +0000)]
test commit revert

test commit revert

llvm-svn: 245299

6 years agotest commit
Roman Gareev [Tue, 18 Aug 2015 14:54:27 +0000 (14:54 +0000)]
test commit

test commit

llvm-svn: 245298

6 years ago[mips][microMIPS] Implement DDIV, DMOD, DDIVU and DMODU instructions
Zoran Jovanovic [Tue, 18 Aug 2015 14:40:43 +0000 (14:40 +0000)]
[mips][microMIPS] Implement DDIV, DMOD, DDIVU and DMODU instructions
Differential Revision: http://reviews.llvm.org/D10953

llvm-svn: 245297

6 years ago[compiler-rt] Add AArch64 to CMake configuration and several missing builtins
Sergey Dmitrouk [Tue, 18 Aug 2015 13:43:37 +0000 (13:43 +0000)]
[compiler-rt] Add AArch64 to CMake configuration and several missing builtins

Currently CMake doesn't build builtins for AArch64 and if one does this anyway
it's likely that at least `__multc3`, `__floatditf` and `__floatunditf` will be
missing.  There is actually more builtins to add, but these come from
different libc implementations, thus providing them makes compiler-rt for
AArch64 good enough at least for basic usage.

Builtins implementation were originally taken from FreeBSD project:

 * [[ https://reviews.freebsd.org/D2173 | __multc3 ]]
 * [[ https://reviews.freebsd.org/D2174 | __floatditf and __floatunditf ]]

Until they have been tested to find mistakes in `__float*` functions.
`__floatditf` was based on `__floatsitf`, which had the same mistakes
(fixed it in r243746).

Version of the builtins in this patch are fixed and complemented with basic
tests.  Additionally they were tested via GCC's torture (this is what revealed
these issues).

P.S. Ed (author of FreeBSD patches) asked for feedback on the list some time ago (here [[ http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-March/084064.html | here ]])
and got no response, but it seems to be worth adding these builtins as is and
extracting common part later.

Reviewers: howard.hinnant, t.p.northover, jmolloy, enefaim, rengolin, zatrazz

Subscribers: asl, emaste, samsonov, aemerson, llvm-commits, rengolin

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

llvm-svn: 245296

6 years agoFix Codegen adding a second exit out of region
Michael Kruse [Tue, 18 Aug 2015 13:14:42 +0000 (13:14 +0000)]
Fix Codegen adding a second exit out of region

executeScopConditionally would destroy a predecessor region if it the
scop's entry was the region's exit block by forking it to polly.start
and thus creating a secnd exit out of the region. This patch "shrinks"
the predecessor region s.t. polly.split_new_and_old is not the
region's exit anymore.

llvm-svn: 245294

6 years ago[mips][microMIPS] Implement SW and SWE instructions
Zoran Jovanovic [Tue, 18 Aug 2015 12:53:08 +0000 (12:53 +0000)]
[mips][microMIPS] Implement SW and SWE instructions
Differential Revision: http://reviews.llvm.org/D10869

llvm-svn: 245293

6 years agoRevert "[sanitizer] Move definition of stable-runtime to common lit config."
Renato Golin [Tue, 18 Aug 2015 12:44:55 +0000 (12:44 +0000)]
Revert "[sanitizer] Move definition of stable-runtime to common lit config."

This reverts commit r245263, and the change wasn't catched by UBsan.

It also reverts: "[ARM] Also disable stable-runtime check on UBsan,
to use generic one" (r245287), as it didn't fix the UBsan builds.

We need to investigate what's going on before continuing, since this
is breaking all ARM RT buildbots for a while.

llvm-svn: 245292

6 years ago[mips] Make the MipsAsmParser capable of knowing whether PIC mode is enabled or not.
Daniel Sanders [Tue, 18 Aug 2015 12:33:54 +0000 (12:33 +0000)]
[mips] Make the MipsAsmParser capable of knowing whether PIC mode is enabled or not.

This information is needed to decide whether we do the PIC-only JAL expansions or not. It's also needed for an upcoming patch which implements the .cprestore assembler directive (which can only be used effectively in PIC mode).

By making this information available to the MipsAsmParser, we will know when to insert the instructions mandated by the .cprestore assembler directive and we will be able to give some useful warnings when we encounter a potential misuse of this directive.

Patch by Toma Tabacu

Reviewers: dsanders, seanbruno

Subscribers: brooks, seanbruno, rafael, llvm-commits

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

llvm-svn: 245291

6 years ago[Support] On Windows, generate PDF files for graphs and open with associated viewer
Michael Kruse [Tue, 18 Aug 2015 12:17:37 +0000 (12:17 +0000)]
[Support] On Windows, generate PDF files for graphs and open with associated viewer

Summary: Windows system rarely have good PostScript viewers installed, but PDF viewers are common. So for viewing graphs, generate PDF files and open with the associated PDF viewer using cmd.exe's start command.

Reviewers: Bigcheese, aaron.ballman

Subscribers: aaron.ballman, JakeVanAdrighem, dwiberg, llvm-commits

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

llvm-svn: 245290

6 years ago[Support] Always wait for GraphViz before opening the viewer
Michael Kruse [Tue, 18 Aug 2015 12:13:57 +0000 (12:13 +0000)]
[Support] Always wait for GraphViz before opening the viewer

When calling DisplayGraph and a PS viewer is chosen, two programs are executed: The GraphViz generator and the PostScript viewer. Always for the generator to finish to ensure that the .ps file is written before opening the viewer for that file. DisplayGraph's wait parameter refers to whether to wait until the user closes the viewer.

This happened on Windows and if none of the options to open the .dot file directly applies, also on Linux.

Reviewers: Bigcheese, chandlerc, aaron.ballman

Subscribers: dwiberg, aaron.ballman, llvm-commits

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

llvm-svn: 245289

6 years agoIntroduce the ScopExpander as a SCEVExpander replacement
Johannes Doerfert [Tue, 18 Aug 2015 11:56:00 +0000 (11:56 +0000)]
Introduce the ScopExpander as a SCEVExpander replacement

  The SCEVExpander cannot deal with all SCEVs Polly allows in all kinds
  of expressions. To this end we introduce a ScopExpander that handles
  the additional expressions separatly and falls back to the
  SCEVExpander for everything else.

Reviewers: grosser, Meinersbur

Subscribers: #polly

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

llvm-svn: 245288

6 years ago[ARM] Also disable stable-runtime check on UBsan, to use generic one
Renato Golin [Tue, 18 Aug 2015 10:33:15 +0000 (10:33 +0000)]
[ARM] Also disable stable-runtime check on UBsan, to use generic one

llvm-svn: 245287

6 years agoD11990: Lock-free start of serialized parallel regions
Andrey Churbanov [Tue, 18 Aug 2015 10:08:27 +0000 (10:08 +0000)]
D11990: Lock-free start of serialized parallel regions

llvm-svn: 245286

6 years ago[mips] Correct -Woverflow warning in r245208 without changing signedness of the constant.
Daniel Sanders [Tue, 18 Aug 2015 09:55:57 +0000 (09:55 +0000)]
[mips] Correct -Woverflow warning in r245208 without changing signedness of the constant.

This was supposed to have been committed as part of r245208

llvm-svn: 245285

6 years agoDrop dead and disable code from IndependentBlocks
Tobias Grosser [Tue, 18 Aug 2015 09:30:28 +0000 (09:30 +0000)]
Drop dead and disable code from IndependentBlocks

Since Polly has now support for the code generation of scalar and PHI
dependences this code was unused and is now dropped.

llvm-svn: 245284

6 years agoFix Clang-tidy misc-use-override warnings in include/lldb/Expression and include...
Pavel Labath [Tue, 18 Aug 2015 09:18:19 +0000 (09:18 +0000)]
Fix Clang-tidy misc-use-override warnings in include/lldb/Expression and include/lldb/Initialization, unify inclusion guards

patch by Eugene Zelenko.

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

llvm-svn: 245283

6 years agoCOFF: Use ErrorOr::operator* instead of ErrorOr::get.
Rui Ueyama [Tue, 18 Aug 2015 09:18:15 +0000 (09:18 +0000)]
COFF: Use ErrorOr::operator* instead of ErrorOr::get.

This patch is to make COFF coding style consistent with ELF. NFC.

llvm-svn: 245282

6 years agoDo not use unique pointers. NFC.
Rui Ueyama [Tue, 18 Aug 2015 09:13:25 +0000 (09:13 +0000)]
Do not use unique pointers. NFC.

These unique pointers have the exact same lifetime as automatic
variables, so use automatic variables instead.

llvm-svn: 245281

6 years agoCOFF: Do not handle __NULL_IMPORT_DESCRIPTOR differently than the other symbols.
Rui Ueyama [Tue, 18 Aug 2015 09:06:41 +0000 (09:06 +0000)]
COFF: Do not handle __NULL_IMPORT_DESCRIPTOR differently than the other symbols.

__NULL_IMPORT_DESCRIPTOR is a symbol used by MSVC liner to construct
the import descriptor table. We do not use the symbol. Previously,
we had code to skip that symbol. That code does not actually do
anything meaningful because no one is referencing the symbol, the
symbol would naturally be ignored. This patch stops recognizing
the symbol.

llvm-svn: 245280

6 years agoFix Clang-tidy misc-use-override warnings in include/lldb/DataFormatters and include...
Pavel Labath [Tue, 18 Aug 2015 09:06:31 +0000 (09:06 +0000)]
Fix Clang-tidy misc-use-override warnings in include/lldb/DataFormatters and include/lldb/Host, unify closing inclusion guards

patch by Eugene Zelenko.

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

llvm-svn: 245279

6 years agoFixed max/min typo in test names
Simon Pilgrim [Tue, 18 Aug 2015 09:02:51 +0000 (09:02 +0000)]
Fixed max/min typo in test names

llvm-svn: 245278

6 years agoFix Clang-tidy misc-use-override warnings in include/lldb/Utility and some files...
Pavel Labath [Tue, 18 Aug 2015 08:54:26 +0000 (08:54 +0000)]
Fix Clang-tidy misc-use-override warnings in include/lldb/Utility and some files in include/lldb/Target, unify closing inclusion guards

patch by Eugene Zelenko.

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

llvm-svn: 245277

6 years ago[X86][SSE} Added constant SMAX/SMIN/UMAX/UMIN tests
Simon Pilgrim [Tue, 18 Aug 2015 08:52:43 +0000 (08:52 +0000)]
[X86][SSE} Added constant SMAX/SMIN/UMAX/UMIN tests

Constant folding patch to follow soon

llvm-svn: 245276

6 years agoFix Clang-tidy misc-use-override warnings in some files in include/lldb/Core, unify...
Pavel Labath [Tue, 18 Aug 2015 08:39:09 +0000 (08:39 +0000)]
Fix Clang-tidy misc-use-override warnings in some files in include/lldb/Core, unify closing inclusion guards

patch by Eugene Zelenko

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

llvm-svn: 245275

6 years ago[X86][SSE] Added extra vector truncation tests.
Simon Pilgrim [Tue, 18 Aug 2015 08:37:09 +0000 (08:37 +0000)]
[X86][SSE] Added extra vector truncation tests.

Including cases for PR14866

llvm-svn: 245274

6 years agoFix AArch64 watchpoint exception handling
Omair Javaid [Tue, 18 Aug 2015 08:28:06 +0000 (08:28 +0000)]
Fix AArch64 watchpoint exception handling

llvm-svn: 245273

6 years ago[LLGS] Avoid misrepresenting log lines as inferior output
Pavel Labath [Tue, 18 Aug 2015 08:23:35 +0000 (08:23 +0000)]
[LLGS] Avoid misrepresenting log lines as inferior output

in case we are logging to stdout, any log lines from the forked child can be misconstrued to be
inferior output. To avoid this, we disable all logging immediately after forking.

I also fix the implementatoion of DisableAllLogChannels, which was a no-op before this commit.

Reviewers: clayborg, ovyalov

Subscribers: dean, lldb-commits

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

llvm-svn: 245272

6 years ago[TreeTransform] Simplify code. No functionality change.
Benjamin Kramer [Tue, 18 Aug 2015 08:10:39 +0000 (08:10 +0000)]
[TreeTransform] Simplify code. No functionality change.

llvm-svn: 245271

6 years agoAdd unit test for isLayoutIdentical(empty, empty).
Yaron Keren [Tue, 18 Aug 2015 07:59:09 +0000 (07:59 +0000)]
Add unit test for isLayoutIdentical(empty, empty).
It was previously asserting in Visual C++ debug mode on a null
iterator passed to std::equal.

Test by Hans Wennborg!

llvm-svn: 245270

6 years agoRevert "Constant propagation after hiting llvm.assume"
Justin Bogner [Tue, 18 Aug 2015 07:00:34 +0000 (07:00 +0000)]
Revert "Constant propagation after hiting llvm.assume"

This was also failing bootstrap:


This reverts r245265.

llvm-svn: 245269

6 years ago[OPENMP 4.1] Allow variables with reference types in private clauses.
Alexey Bataev [Tue, 18 Aug 2015 06:47:21 +0000 (06:47 +0000)]
[OPENMP 4.1] Allow variables with reference types in private clauses.

OpenMP 4.1 allows to use variables with reference types in all private clauses (private, firstprivate, lastprivate, linear etc.). Patch allows to use such variables and fixes codegen for linear variables with reference types.

llvm-svn: 245268

6 years agoRevert "Generating assumption loads of vptr after ctor call (fixed)"
Justin Bogner [Tue, 18 Aug 2015 05:40:20 +0000 (05:40 +0000)]
Revert "Generating assumption loads of vptr after ctor call (fixed)"

Bootstrap bots were failing:


This reverts r245264.

llvm-svn: 245267

6 years agoCreate lld-link symlink on "make/ninja/whatever install".
Rui Ueyama [Tue, 18 Aug 2015 04:24:46 +0000 (04:24 +0000)]
Create lld-link symlink on "make/ninja/whatever install".

llvm-svn: 245266

6 years agoConstant propagation after hiting llvm.assume
Piotr Padlewski [Tue, 18 Aug 2015 03:55:30 +0000 (03:55 +0000)]
Constant propagation after hiting llvm.assume

After hitting @llvm.assume(X) we can:
- propagate equality that X == true
- if X is icmp/fcmp (with eq operation), and one of operand
  is constant we can change all variables with constants in the same BasicBlock


llvm-svn: 245265

6 years agoGenerating assumption loads of vptr after ctor call (fixed)
Piotr Padlewski [Tue, 18 Aug 2015 03:52:00 +0000 (03:52 +0000)]
Generating assumption loads of vptr after ctor call (fixed)

Generating call assume(icmp %vtable, %global_vtable) after constructor
call for devirtualization purposes.

For more info go to:

Fixed version because of PR24479.


llvm-svn: 245264

6 years ago[sanitizer] Move definition of stable-runtime to common lit config.
Evgeniy Stepanov [Tue, 18 Aug 2015 01:06:51 +0000 (01:06 +0000)]
[sanitizer] Move definition of stable-runtime to common lit config.

There are tests in sanitizer_common that are unconditionally disabled
because they REQUIRE: stable-runtime which is never defined.

llvm-svn: 245263

6 years agoRevert part of "Convert all use of pthreads in tests to c++11 threads."
Chaoren Lin [Tue, 18 Aug 2015 00:27:08 +0000 (00:27 +0000)]
Revert part of "Convert all use of pthreads in tests to c++11 threads."

TestExprDoesntBlock started failing because deadlocks behave differently with
pthread_mutex and std::mutex.

This reverts part of commit r245234.

llvm-svn: 245262

6 years agoRemove unintentional ;'s.
Jason Molenda [Tue, 18 Aug 2015 00:21:24 +0000 (00:21 +0000)]
Remove unintentional ;'s.

llvm-svn: 245261

6 years agoRevert r245257 "Generating assumption loads of vptr after ctor call"
Hans Wennborg [Tue, 18 Aug 2015 00:17:58 +0000 (00:17 +0000)]
Revert r245257 "Generating assumption loads of vptr after ctor call"

It caused PR24479

llvm-svn: 245260

6 years agoDoxygen: add build option to use svg instead of png files for graphs
Hans Wennborg [Mon, 17 Aug 2015 23:38:56 +0000 (23:38 +0000)]
Doxygen: add build option to use svg instead of png files for graphs

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

llvm-svn: 245259

6 years agoCOFF: Allow forward reference for weak externals
Rui Ueyama [Mon, 17 Aug 2015 23:35:43 +0000 (23:35 +0000)]
COFF: Allow forward reference for weak externals

Previously, weak external symbols could reference only symbols that
appeared before them. Although that covers almost all use cases
of weak externals, there are object files out there which contains
weak externals that have forward references.

This patch supports such weak externals.

llvm-svn: 245258

6 years agoGenerating assumption loads of vptr after ctor call
Piotr Padlewski [Mon, 17 Aug 2015 23:33:49 +0000 (23:33 +0000)]
Generating assumption loads of vptr after ctor call

Generating call assume(icmp %vtable, %global_vtable) after constructor
call for devirtualization purposes.

For more info go to:


llvm-svn: 245257

6 years agoDoxygen: add build option to use svg instead of png files for graphs
Hans Wennborg [Mon, 17 Aug 2015 23:24:17 +0000 (23:24 +0000)]
Doxygen: add build option to use svg instead of png files for graphs

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

llvm-svn: 245256

6 years agoAdd an exposed variable for which c++ compiler we're using for our
Eric Christopher [Mon, 17 Aug 2015 22:46:26 +0000 (22:46 +0000)]
Add an exposed variable for which c++ compiler we're using for our

Patch by Chris Bieneman!

llvm-svn: 245255

6 years ago[WebAssembly] Don't default to ELF in the triple.
Dan Gohman [Mon, 17 Aug 2015 22:37:56 +0000 (22:37 +0000)]
[WebAssembly] Don't default to ELF in the triple.

WebAssembly doesn't yet have a specified binary format, and it may not
end up being ELF, so we don't want the Triple class defaulting to ELF
for it at this time.

llvm-svn: 245254

6 years agoAlign SP adjustment in function getSPAdjust
Guozhi Wei [Mon, 17 Aug 2015 22:36:27 +0000 (22:36 +0000)]
Align SP adjustment in function getSPAdjust

This commit adds a new function TargetFrameLowering::alignSPAdjust
and calls it from TargetInstrInfo::getSPAdjust. It fixes PR24142.

llvm-svn: 245253

6 years ago[WebAssembly] Make getArchTypePrefix return "wasm".
Dan Gohman [Mon, 17 Aug 2015 22:35:40 +0000 (22:35 +0000)]
[WebAssembly] Make getArchTypePrefix return "wasm".

The arch prefix string isn't currently being used for anything on
WebAssembly, but if it were to be used, it makes sense to use the
same arch prefix string for wasm32 and wasm64.

llvm-svn: 245252

6 years agoRemove dead code, there's no need for an override that just duplicates
Eric Christopher [Mon, 17 Aug 2015 22:22:28 +0000 (22:22 +0000)]
Remove dead code, there's no need for an override that just duplicates
the default behavior.

llvm-svn: 245251

6 years agoMake a test less brittle.
Richard Trieu [Mon, 17 Aug 2015 22:18:30 +0000 (22:18 +0000)]
Make a test less brittle.

Capture line numbers in a variable for FileCheck instead of hardcoding them.

llvm-svn: 245250

6 years agoMIR Serialization: Serialize the local offsets for the stack objects.
Alex Lorenz [Mon, 17 Aug 2015 22:17:42 +0000 (22:17 +0000)]
MIR Serialization: Serialize the local offsets for the stack objects.

llvm-svn: 245249

6 years agoMIR Serialization: Serialize the memory operand's range metadata node.
Alex Lorenz [Mon, 17 Aug 2015 22:09:52 +0000 (22:09 +0000)]
MIR Serialization: Serialize the memory operand's range metadata node.

llvm-svn: 245247

6 years agoMIR Serialization: Serialize the memory operand's noalias metadata node.
Alex Lorenz [Mon, 17 Aug 2015 22:08:02 +0000 (22:08 +0000)]
MIR Serialization: Serialize the memory operand's noalias metadata node.

llvm-svn: 245246

6 years agoMIR Serialization: Serialize the memory operand's alias scope metadata node.
Alex Lorenz [Mon, 17 Aug 2015 22:06:40 +0000 (22:06 +0000)]
MIR Serialization: Serialize the memory operand's alias scope metadata node.

llvm-svn: 245245

6 years agoMIR Serialization: Serialize the memory operand's TBAA metadata node.
Alex Lorenz [Mon, 17 Aug 2015 22:05:15 +0000 (22:05 +0000)]
MIR Serialization: Serialize the memory operand's TBAA metadata node.

llvm-svn: 245244

6 years agoMake regex and any assert when they should throw an exception _but_ the user has...
Marshall Clow [Mon, 17 Aug 2015 21:14:16 +0000 (21:14 +0000)]
Make regex and any assert when they should throw an exception _but_ the user has decreed 'no exceptions'. This matches the behavior of string and vector

llvm-svn: 245239

6 years ago[WinEHPrepare] Replace unreasonable funclet terminators with unreachable
David Majnemer [Mon, 17 Aug 2015 20:56:39 +0000 (20:56 +0000)]
[WinEHPrepare] Replace unreasonable funclet terminators with unreachable

It is possible to be in a situation where more than one funclet token is
a valid SSA value.  If we see a terminator which exits a funclet which
doesn't use the funclet's token, replace it with unreachable.

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

llvm-svn: 245238

6 years agoMake sure to save the types we parse in our SymbolFile's type list so they don't...
Greg Clayton [Mon, 17 Aug 2015 20:31:46 +0000 (20:31 +0000)]
Make sure to save the types we parse in our SymbolFile's type list so they don't get deleted.

llvm-svn: 245237

6 years ago[modules] When parsing the base specifiers of a parse-merged class, the current
Richard Smith [Mon, 17 Aug 2015 20:24:17 +0000 (20:24 +0000)]
[modules] When parsing the base specifiers of a parse-merged class, the current
context is the class itself but lookups should be performed starting with the
lookup parent of the class (class and base members don't shadow types from the
surrounding context because they have not been declared yet).

llvm-svn: 245236

6 years agoConvert all use of pthreads in tests to c++11 threads.
Zachary Turner [Mon, 17 Aug 2015 20:12:04 +0000 (20:12 +0000)]
Convert all use of pthreads in tests to c++11 threads.

This eliminates portability issues among platforms that don't have
a pthreads implementation.

Differential Revision: http://reviews.llvm.org/D12043
Reviewed By: Greg Clayton

llvm-svn: 245234

6 years ago[SPARC]: recognize '.' as the start of an assembler expression.
Douglas Katzman [Mon, 17 Aug 2015 19:55:01 +0000 (19:55 +0000)]
[SPARC]: recognize '.' as the start of an assembler expression.

llvm-svn: 245232

6 years ago[ARM] Fix crash when targetting CPU without NEON
James Molloy [Mon, 17 Aug 2015 19:37:12 +0000 (19:37 +0000)]
[ARM] Fix crash when targetting CPU without NEON

We emulate a scalar vmin/vmax with NEON instructions as they don't exist in the VFP ISA. So only mark these as legal when NEON is available.

Found here: https://code.google.com/p/chromium/issues/detail?id=521671

llvm-svn: 245231

6 years ago[modules] PR20507: Avoid silent textual inclusion.
Sean Silva [Mon, 17 Aug 2015 16:39:30 +0000 (16:39 +0000)]
[modules] PR20507: Avoid silent textual inclusion.

If a module was unavailable (either a missing requirement on the module
being imported, or a missing file anywhere in the top-level module (and
not dominated by an unsatisfied `requires`)), we would silently treat
inclusions as textual. This would cause all manner of crazy and
confusing errors (and would also silently "work" sometimes, making the
problem difficult to track down).

I'm really not a fan of the `M->isAvailable(getLangOpts(), getTargetInfo(),
Requirement, MissingHeader)` function; it seems to do too many things at
once, but for now I've done things in a sort of awkward way.

The changes to test/Modules/Inputs/declare-use/module.map
were necessitated because the thing that was meant to be tested there
(introduced in r197805) was predicated on silently falling back to textual
inclusion, which we no longer do.

The changes to test/Modules/Inputs/macro-reexport/module.modulemap
are just an overlooked missing header that seems to have been missing since
this code was committed (r213922), which is now caught.

Reviewers: rsmith, benlangmuir, djasper

Subscribers: cfe-commits

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

llvm-svn: 245228

6 years ago[ScalarEvolutionExpander] Reuse findExistingExpansion during expansion cost calculati...
Igor Laevsky [Mon, 17 Aug 2015 16:37:04 +0000 (16:37 +0000)]
[ScalarEvolutionExpander] Reuse findExistingExpansion during expansion cost calculation for division

Primary purpose of this change is to reuse existing code inside findExistingExpansion. However it introduces very slight semantic change - findExistingExpansion now looks into exiting blocks instead of a loop latches. Originally heuristic was based on the fact that we want to look at the loop exit conditions. And since all exiting latches will be listed in the ExitingBlocks, heuristic stays roughly the same.

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

llvm-svn: 245227

6 years ago[CostModel][AArch64] Increase cost of vector insert element and add missing cast...
Silviu Baranga [Mon, 17 Aug 2015 16:05:09 +0000 (16:05 +0000)]
[CostModel][AArch64] Increase cost of vector insert element and add missing cast costs

Increase the estimated costs for insert/extract element operations on
AArch64. This is motivated by results from benchmarking interleaved

Add missing costs for zext/sext/trunc instructions and some integer to
floating point conversions. These costs were previously calculated
by scalarizing these operation and were affected by the cost increase of
the insert/extract element operations.

Reviewers: rengolin

Subscribers: mcrosier, aemerson, rengolin, llvm-commits

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

llvm-svn: 245226

6 years ago[CostModel][ARM] Increase cost of insert/extract operations
Silviu Baranga [Mon, 17 Aug 2015 15:57:05 +0000 (15:57 +0000)]
[CostModel][ARM] Increase cost of insert/extract operations

This change limits the minimum cost of an insert/extract
element operation to 2 in cases where this would result
in mixing of NEON and VFP code.

Reviewers: rengolin

Subscribers: mssimpso, aemerson, llvm-commits, rengolin

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

llvm-svn: 245225

6 years ago[BasicAliasAnalysis] Do not check ModRef table for intrinsics
Igor Laevsky [Mon, 17 Aug 2015 15:56:56 +0000 (15:56 +0000)]
[BasicAliasAnalysis] Do not check ModRef table for intrinsics

All possible ModRef behaviours can be completely represented using existing LLVM IR attributes.

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

llvm-svn: 245224

6 years agoTake alignment into account in isSafeToSpeculativelyExecute and isSafeToLoadUnconditi...
Artur Pilipenko [Mon, 17 Aug 2015 15:54:26 +0000 (15:54 +0000)]
Take alignment into account in isSafeToSpeculativelyExecute and isSafeToLoadUnconditionally.

Reviewed By: hfinkel, sanjoy, MatzeB

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

llvm-svn: 245223

6 years agoRevert "[LLDB] Use llvm::APInt and llvm::APFloat in Scalar and RegisterValue"
Pavel Labath [Mon, 17 Aug 2015 15:28:05 +0000 (15:28 +0000)]
Revert "[LLDB] Use llvm::APInt and llvm::APFloat in Scalar and RegisterValue"

Reverting as this commit causes an infinite loop.

llvm-svn: 245222

6 years agoExtend MCAsmLexer so that it can peek forward several tokens
Benjamin Kramer [Mon, 17 Aug 2015 14:35:25 +0000 (14:35 +0000)]
Extend MCAsmLexer so that it can peek forward several tokens

This commit adds a virtual `peekTokens()` function to `MCAsmLexer`
which can peek forward an arbitrary number of tokens.

It also makes the `peekTok()` method call `peekTokens()` method, but
only requesting one token.

The idea is to better support targets which more more ambiguous
assembly syntaxes.

Patch by Dylan McKay!

llvm-svn: 245221

6 years agoCorrecting a -Woverflow warning where 0xFFFF was overflowing an implicit constant...
Aaron Ballman [Mon, 17 Aug 2015 14:25:57 +0000 (14:25 +0000)]
Correcting a -Woverflow warning where 0xFFFF was overflowing an implicit constant conversion.

llvm-svn: 245220

6 years ago[WinEHPrepare] Fix catchret successor phi demotion
Joseph Tremoulet [Mon, 17 Aug 2015 13:51:37 +0000 (13:51 +0000)]
[WinEHPrepare] Fix catchret successor phi demotion

When demoting an SSA value that has a use on a phi and one of the phi's
predecessors terminates with catchret, the edge needs to be split and the
load inserted in the new block, else we'll still have a cross-funclet SSA

Add a test for this, and for the similar case where a def to be spilled is
on and invoke and a critical edge, which was already implemented but
missing a test.

Reviewers: majnemer

Subscribers: llvm-commits

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

llvm-svn: 245218

6 years ago[LLDB][MIPS] Fix offsets of all register sets and add MSA regset and FRE=1 mode support
Sagar Thakur [Mon, 17 Aug 2015 13:40:17 +0000 (13:40 +0000)]
[LLDB][MIPS] Fix offsets of all register sets and add MSA regset and FRE=1 mode support

This patch :

- Fixes offsets of all register sets for Mips.
- Adds MSA register set and FRE=1 mode support for FP register set.
- Separates lldb register numbers and register infos of freebsd/mips64 from linux/mips64.
- Re-orders the register numbers of all kinds for mips to be consistent with freebsd order of register numbers.

Reviewers: jaydeep, clayborg, jasonmolenda, ovyalov, emaste
Subscribers: tberghammer, ovyalov, emaste, mohit.bhakkad, nitesh.jain, bhushan
Differential: http://reviews.llvm.org/D10919
llvm-svn: 245217

6 years ago[LLDB] Use llvm::APInt and llvm::APFloat in Scalar and RegisterValue
Sagar Thakur [Mon, 17 Aug 2015 12:05:31 +0000 (12:05 +0000)]
[LLDB] Use llvm::APInt and llvm::APFloat in Scalar and RegisterValue

Eliminated ENABLE_128_BIT_SUPPORT and union ValueData from Scalar.cpp and use llvm::APInt and llvm::APFloat for all integer and floating point types. Also used Scalar in RegisterValue.cpp

Reviewers: jaydeep, clayborg, jasonmolenda, ovyalov, emaste
Subscribers: tberghammer, ovyalov, emaste, mohit.bhakkad, nitesh.jain, bhushan
Differential: http://reviews.llvm.org/D10919
llvm-svn: 245216

6 years ago[clang-tidy] Fix a use-after-free.
Alexander Kornienko [Mon, 17 Aug 2015 11:27:11 +0000 (11:27 +0000)]
[clang-tidy] Fix a use-after-free.

llvm-svn: 245215

6 years agoCOFF: Fix a broken test.
Rui Ueyama [Mon, 17 Aug 2015 11:06:21 +0000 (11:06 +0000)]
COFF: Fix a broken test.

This test couldn't be run more than once because lib.exe does not work
if the files already exist.

llvm-svn: 245214

6 years agoAdd a field to the memory access class for a related value.
Johannes Doerfert [Mon, 17 Aug 2015 10:58:17 +0000 (10:58 +0000)]
Add a field to the memory access class for a related value.

  The new field in the MemoryAccess allows us to track a value related
  to that access:
    - For real memory accesses the value is the loaded result or the
      stored value.
    - For straigt line scalar accesses it is the access instruction
    - For PHI operand accesses it is the operand value.

  We use this value to simplify code which deduced information about the value
  later in the Polly pipeline and was known to be error prone.

Reviewers: grosser, Meinsersbur

Subscribers: #polly

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

llvm-svn: 245213

6 years agoRevert "Disable targetdatalayoutcheck"
Tobias Grosser [Mon, 17 Aug 2015 10:58:03 +0000 (10:58 +0000)]
Revert "Disable targetdatalayoutcheck"

I committed by accident a local hack that should not have made it upstream.
Sorry for the noise.

llvm-svn: 245212

6 years agoFix Polly after SCEV port to new pass manager
Tobias Grosser [Mon, 17 Aug 2015 10:57:08 +0000 (10:57 +0000)]
Fix Polly after SCEV port to new pass manager

This fixes compilation after LLVM commit r245193.

llvm-svn: 245211

6 years agoDisable targetdatalayoutcheck
Tobias Grosser [Mon, 17 Aug 2015 10:56:35 +0000 (10:56 +0000)]
Disable targetdatalayoutcheck

llvm-svn: 245210

6 years agoD11988: Force serial reduction when team size is 1
Andrey Churbanov [Mon, 17 Aug 2015 10:12:12 +0000 (10:12 +0000)]
D11988: Force serial reduction when team size is 1

llvm-svn: 245209

6 years ago[mips] [IAS] Add support for the DLA pseudo-instruction and fix problems with DLI
Daniel Sanders [Mon, 17 Aug 2015 10:11:55 +0000 (10:11 +0000)]
[mips] [IAS] Add support for the DLA pseudo-instruction and fix problems with DLI

Summary: It is the same as LA, except that it can also load 64-bit addresses and it only works on 64-bit MIPS architectures.

Reviewers: tomatabacu, seanbruno, vkalintiris

Subscribers: brooks, seanbruno, emaste, llvm-commits

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

llvm-svn: 245208

6 years ago[GMR] isNonEscapingGlobalNoAlias() should look through Bitcasts/GEPs when looking...
Michael Kuperstein [Mon, 17 Aug 2015 10:06:08 +0000 (10:06 +0000)]
[GMR] isNonEscapingGlobalNoAlias() should look through Bitcasts/GEPs when looking at loads.

This fixes yet another case from PR24288.

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

llvm-svn: 245207

6 years agoD11157: Fixed missed threads re-binding in case team size reduced via omp_set_num_threads
Andrey Churbanov [Mon, 17 Aug 2015 10:04:38 +0000 (10:04 +0000)]
D11157: Fixed missed threads re-binding in case team size reduced via omp_set_num_threads

llvm-svn: 245206

6 years ago[clang-tidy] Allow use of -list-checks option without need to pass source files.
Alexander Kornienko [Mon, 17 Aug 2015 10:03:27 +0000 (10:03 +0000)]
[clang-tidy] Allow use of -list-checks option without need to pass source files.

Initialize CommonOptionsParser with ZeroOrOne NumOccurrenceFlag so callers can
pass -list-checks without the need to pass additional positional parameters,
then add dummy file if none were supplied.


Patch by Don Hinton!

llvm-svn: 245205