platform/upstream/llvm.git
8 years agoFix a bunch of trivial cases of 'CHECK[^:]*$' in the tests. NFCI
Jonathan Roelofs [Mon, 10 Aug 2015 19:01:27 +0000 (19:01 +0000)]
Fix a bunch of trivial cases of 'CHECK[^:]*$' in the tests. NFCI

I looked into adding a warning / error for this to FileCheck, but there doesn't
seem to be a good way to avoid it triggering on the instances of it in RUN lines.

llvm-svn: 244481

8 years agoUse continue to reduce indentation. NFC.
Rafael Espindola [Mon, 10 Aug 2015 18:57:42 +0000 (18:57 +0000)]
Use continue to reduce indentation. NFC.

llvm-svn: 244480

8 years ago[AArch64] Convert a conditional check that will always be true to an assert. NFC.
Chad Rosier [Mon, 10 Aug 2015 18:42:45 +0000 (18:42 +0000)]
[AArch64] Convert a conditional check that will always be true to an assert. NFC.

llvm-svn: 244479

8 years agoCorrect non-existing past participle of split in filename
Michael Kruse [Mon, 10 Aug 2015 18:37:34 +0000 (18:37 +0000)]
Correct non-existing past participle of split in filename

llvm-svn: 244478

8 years agoAdd a test for our handling of shndx.
Rafael Espindola [Mon, 10 Aug 2015 18:28:24 +0000 (18:28 +0000)]
Add a test for our handling of shndx.

It was already working, but missing a test.

llvm-svn: 244477

8 years agoRecommit r244470+ r244471 together, the bot failed between them.
Yaron Keren [Mon, 10 Aug 2015 18:27:51 +0000 (18:27 +0000)]
Recommit r244470+ r244471 together, the bot failed between them.

llvm-svn: 244476

8 years agoFix typo.
Filipe Cabecinhas [Mon, 10 Aug 2015 18:26:29 +0000 (18:26 +0000)]
Fix typo.

llvm-svn: 244475

8 years ago[IndVarSimplify] Make cost estimation in RewriteLoopExitValues smarter
Igor Laevsky [Mon, 10 Aug 2015 18:23:58 +0000 (18:23 +0000)]
[IndVarSimplify] Make cost estimation in RewriteLoopExitValues smarter

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

llvm-svn: 244474

8 years ago[clang-cl] Add support for CL and _CL_ environment variables
David Majnemer [Mon, 10 Aug 2015 18:16:32 +0000 (18:16 +0000)]
[clang-cl] Add support for CL and _CL_ environment variables

cl uses 'CL' and '_CL_' to prepend and append command line options to
the given argument vector.  There is an additional quirk whereby '#' is
transformed into '='.

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

llvm-svn: 244473

8 years agoRevert r244470 and 244471 while looking into it.
Yaron Keren [Mon, 10 Aug 2015 18:14:56 +0000 (18:14 +0000)]
Revert r244470 and 244471 while looking into it.

llvm-svn: 244472

8 years agoSecond part of r244470 (source file was unsaved in editor).
Yaron Keren [Mon, 10 Aug 2015 18:06:01 +0000 (18:06 +0000)]
Second part of r244470 (source file was unsaved in editor).

llvm-svn: 244471

8 years agoReally implement David Blaikie suggestion in full of seperating
Yaron Keren [Mon, 10 Aug 2015 18:03:35 +0000 (18:03 +0000)]
Really implement David Blaikie suggestion in full of seperating
variable initialization from its usage in the push_back making
collapse of the two statements unlikely even without a comment.

llvm-svn: 244470

8 years agoAllow dosep.py to print dotest.py output on success.
Zachary Turner [Mon, 10 Aug 2015 17:46:11 +0000 (17:46 +0000)]
Allow dosep.py to print dotest.py output on success.

Previously all test output was reported by each individual
instance of dotest.py.  After a recent patch, dosep gets dotest
outptu via a pipe, and selectively decides which output to
print.

This breaks certain scripts which rely on having full output
of each dotest instance to do various parsing and/or log-scraping.

While we make no promises about the format of dotest output, it's
easy to restore this to the old behavior for now, although it is
behind a flag.  To re-enable full output, run dosep.py with the -s
option.

Differential Revision: http://reviews.llvm.org/D11816
Reviewed By: Chaoren Lin

llvm-svn: 244469

8 years agoCorrect x86_64 fp128 calling convention
Chih-Hung Hsieh [Mon, 10 Aug 2015 17:33:31 +0000 (17:33 +0000)]
Correct x86_64 fp128 calling convention

These changes are for Android x86_64 targets to be compatible
with current Android g++ and conform to AMD64 ABI.

https://llvm.org/bugs/show_bug.cgi?id=23897
  * Return type of long double (fp128) should be fp128, not x86_fp80.
  * Vararg of long double (fp128) could be in register and overflowed to memory.

https://llvm.org/bugs/show_bug.cgi?id=24111
  * Return value of long double (fp128) _Complex should be in memory like a structure of {fp128,fp128}.

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

llvm-svn: 244468

8 years agoAdd new llvm.loop.unroll.enable metadata for use with "#pragma unroll".
Mark Heffernan [Mon, 10 Aug 2015 17:29:39 +0000 (17:29 +0000)]
Add new llvm.loop.unroll.enable metadata for use with "#pragma unroll".

This change adds the new unroll metadata "llvm.loop.unroll.enable" which directs
the optimizer to unroll a loop fully if the trip count is known at compile time, and
unroll partially if the trip count is not known at compile time. This differs from
"llvm.loop.unroll.full" which explicitly does not unroll a loop if the trip count is not
known at compile time

With this change "#pragma unroll" generates "llvm.loop.unroll.enable" rather than
"llvm.loop.unroll.full" metadata. This changes the semantics of "#pragma unroll" slightly
to mean "unroll aggressively (fully or partially)" rather than "unroll fully or not at all".

The motivating example for this change was some internal code with a loop marked
with "#pragma unroll" which only sometimes had a compile-time trip count depending
on template magic. When the trip count was a compile-time constant, everything works
as expected and the loop is fully unrolled. However, when the trip count was not a
compile-time constant the "#pragma unroll" explicitly disabled unrolling of the loop(!).
Removing "#pragma unroll" caused the loop to be unrolled partially which was desirable
from a performance perspective.

llvm-svn: 244467

8 years agoAdd new llvm.loop.unroll.enable metadata.
Mark Heffernan [Mon, 10 Aug 2015 17:28:08 +0000 (17:28 +0000)]
Add new llvm.loop.unroll.enable metadata.

This change adds the unroll metadata "llvm.loop.unroll.enable" which directs
the optimizer to unroll a loop fully if the trip count is known at compile time, and
unroll partially if the trip count is not known at compile time. This differs from
"llvm.loop.unroll.full" which explicitly does not unroll a loop if the trip count is not
known at compile time.

The "llvm.loop.unroll.enable" is intended to be added for loops annotated with
"#pragma unroll".

llvm-svn: 244466

8 years agoTypo. Move comment closer to relevant code. NFC.
Chad Rosier [Mon, 10 Aug 2015 17:17:19 +0000 (17:17 +0000)]
Typo. Move comment closer to relevant code. NFC.

llvm-svn: 244465

8 years agofix minsize detection: minsize attribute implies optimizing for size
Sanjay Patel [Mon, 10 Aug 2015 17:15:17 +0000 (17:15 +0000)]
fix minsize detection: minsize attribute implies optimizing for size

llvm-svn: 244464

8 years agofix minsize detection: minsize attribute implies optimizing for size
Sanjay Patel [Mon, 10 Aug 2015 17:00:44 +0000 (17:00 +0000)]
fix minsize detection: minsize attribute implies optimizing for size

llvm-svn: 244463

8 years agoProtect template argument from user interference.
Joerg Sonnenberger [Mon, 10 Aug 2015 16:58:04 +0000 (16:58 +0000)]
Protect template argument from user interference.

llvm-svn: 244462

8 years agoFully apply David Blaikie suggestion and add comment explaining why.
Yaron Keren [Mon, 10 Aug 2015 16:53:30 +0000 (16:53 +0000)]
Fully apply David Blaikie suggestion and add comment explaining why.

llvm-svn: 244461

8 years agofix minsize detection: minsize attribute implies optimizing for size
Sanjay Patel [Mon, 10 Aug 2015 16:47:47 +0000 (16:47 +0000)]
fix minsize detection: minsize attribute implies optimizing for size

llvm-svn: 244460

8 years agoMake StmtSet a list.
Johannes Doerfert [Mon, 10 Aug 2015 16:47:20 +0000 (16:47 +0000)]
Make StmtSet a list.

  With a deque (or any other sequential container) it is not sound to
  take the address of the elements when the container is still under
  construction. With a pointer based container this is save.

llvm-svn: 244459

8 years agofix minsize detection: minsize attribute implies optimizing for size
Sanjay Patel [Mon, 10 Aug 2015 16:43:20 +0000 (16:43 +0000)]
fix minsize detection: minsize attribute implies optimizing for size

llvm-svn: 244458

8 years agoAdd missing include guard to FuzzerInternal.h, NFC.
Yaron Keren [Mon, 10 Aug 2015 16:37:40 +0000 (16:37 +0000)]
Add missing include guard to FuzzerInternal.h, NFC.

llvm-svn: 244457

8 years agoAdd test case with PHI node in exit block
Michael Kruse [Mon, 10 Aug 2015 16:17:59 +0000 (16:17 +0000)]
Add test case with PHI node in exit block

The PHI node with multiple incoming edges from inside the region.

Thanks Tobias for coming up with the example.

llvm-svn: 244456

8 years agoModify r244405 to clearer code, per David Blaikie suggestion.
Yaron Keren [Mon, 10 Aug 2015 16:15:51 +0000 (16:15 +0000)]
Modify r244405 to clearer code, per David Blaikie suggestion.

llvm-svn: 244455

8 years agomisc-unused-parameters: Don't touch K&R style functions.
Daniel Jasper [Mon, 10 Aug 2015 15:45:46 +0000 (15:45 +0000)]
misc-unused-parameters: Don't touch K&R style functions.

We couldn't calculate the removal ranges properly at this point.

llvm-svn: 244454

8 years ago-Wdeprecated: Use noexcept rather than throw() where supported
David Blaikie [Mon, 10 Aug 2015 15:24:22 +0000 (15:24 +0000)]
-Wdeprecated: Use noexcept rather than throw() where supported

Summary: I've copy/pasted the LLVM_NOEXCEPT definition macro goo from LLVM's Compiler.h. Is there somewhere I should put this in Compiler RT? Is there a useful header to define/share things like this?

Reviewers: samsonov

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

llvm-svn: 244453

8 years agoSilence a sign mismatch warning; NFC.
Aaron Ballman [Mon, 10 Aug 2015 15:22:39 +0000 (15:22 +0000)]
Silence a sign mismatch warning; NFC.

llvm-svn: 244452

8 years agoDon't depend on getDotSymtabSec. It is going away.
Rafael Espindola [Mon, 10 Aug 2015 15:12:17 +0000 (15:12 +0000)]
Don't depend on getDotSymtabSec. It is going away.

llvm-svn: 244451

8 years agoRemove leftover comment
Michael Kruse [Mon, 10 Aug 2015 15:07:16 +0000 (15:07 +0000)]
Remove leftover comment

The function to which this commit applies has been removed in a
previous commit.

llvm-svn: 244450

8 years ago[TTI] Add a hook for specifying per-target defaults for Interleaved Accesses
Silviu Baranga [Mon, 10 Aug 2015 14:50:54 +0000 (14:50 +0000)]
[TTI] Add a hook for specifying per-target defaults for Interleaved Accesses

Summary:
This adds a hook to TTI which enables us to selectively turn on by default
interleaved access vectorization for targets on which we have have performed
the required benchmarking.

Reviewers: rengolin

Subscribers: rengolin, llvm-commits

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

llvm-svn: 244449

8 years agoPrevent the scalarizer from caching incorrect entries
Fraser Cormack [Mon, 10 Aug 2015 14:48:47 +0000 (14:48 +0000)]
Prevent the scalarizer from caching incorrect entries

The scalarizer can cache incorrect entries when walking up a chain of
insertelement instructions. This occurs when it encounters more than one
instruction that it is not actively searching for, as it unconditionally caches
every element it finds. The fix is to only cache the first element that it
isn't searching for so we don't overwrite correct entries.

Reviewers: hfinkel

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

llvm-svn: 244448

8 years agoelf2yaml: Use existing section walk to find the symbol table. NFC.
Rafael Espindola [Mon, 10 Aug 2015 14:27:50 +0000 (14:27 +0000)]
elf2yaml: Use existing section walk to find the symbol table. NFC.

llvm-svn: 244447

8 years agoAdd WebKit brace style configuration option.
Roman Kashitsyn [Mon, 10 Aug 2015 13:43:19 +0000 (13:43 +0000)]
Add WebKit brace style configuration option.

Summary:
Add brace style `BS_WebKit` as described on https://www.webkit.org/coding/coding-style.html:

* Function definitions: place each brace on its own line.
* Other braces: place the open brace on the line preceding the code block; place the close brace on its own line.

Set brace style used in `getWebKitStyle()` to the newly added `BS_WebKit`.

Reviewers: djasper, klimek

Subscribers: klimek, cfe-commits

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

llvm-svn: 244446

8 years ago[RegionInfo] Fix typo
Michael Kruse [Mon, 10 Aug 2015 13:26:09 +0000 (13:26 +0000)]
[RegionInfo] Fix typo

llvm-svn: 244445

8 years ago[RegionInfo] Add debug-time region viewer functions
Michael Kruse [Mon, 10 Aug 2015 13:21:59 +0000 (13:21 +0000)]
[RegionInfo] Add debug-time region viewer functions

Summary:
Analogously to Function::viewCFG(), RegionInfo::view() and RegionInfo::viewOnly() are meant to be called in debugging sessions. They open a viewer to show how RegionInfo currently understands the region hierarchy.

The functions viewRegion(Function*) and viewRegionOnly(Function*) invoke a fresh region analysis of the function in contrast to viewRegion(RegionInfo*) and viewRegionOnly(RegionInfo*) which show the current analysis result.

Reviewers: grosser

Subscribers: llvm-commits

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

llvm-svn: 244444

8 years ago[Polly] Refactor buildScop
Michael Kruse [Mon, 10 Aug 2015 13:01:57 +0000 (13:01 +0000)]
[Polly] Refactor buildScop

Summary: The extracted function buildBBScopStmt will be needed later to be invoked individually on the region's exit block.

Reviewers: grosser, jdoerfert

Subscribers: jdoerfert, llvm-commits, pollydev

Projects: #polly

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

llvm-svn: 244443

8 years ago[RegionInfo] Use RegionInfo* instead of RegionInfoPass* as graph type
Michael Kruse [Mon, 10 Aug 2015 12:57:23 +0000 (12:57 +0000)]
[RegionInfo] Use RegionInfo* instead of RegionInfoPass* as graph type

This allows printing region graphs when only the RegionInfo (e.g. Region::getRegionInfo()), but no RegionInfoPass object is available.

Specifically, we will use this to print RegionInfo graphs in the debugger.

Differential version: http://reviews.llvm.org/D11874

Reviewed-by: grosser
llvm-svn: 244442

8 years ago[RegionInfo] Update old-style comments
Michael Kruse [Mon, 10 Aug 2015 12:40:41 +0000 (12:40 +0000)]
[RegionInfo] Update old-style comments

Authorized-by: grosser
llvm-svn: 244441

8 years ago[RegionInfo] More descriptive error messages in verifier
Michael Kruse [Mon, 10 Aug 2015 12:28:52 +0000 (12:28 +0000)]
[RegionInfo] More descriptive error messages in verifier

llvm-svn: 244440

8 years agoTrace copies when checking for rematerializability in spill weight calculation
Robert Lougher [Mon, 10 Aug 2015 11:59:44 +0000 (11:59 +0000)]
Trace copies when checking for rematerializability in spill weight calculation

PR24139 contains an analysis of poor register allocation. One of the findings
was that when calculating the spill weight, a rematerializable interval once
split is no longer rematerializable. This is because the isRematerializable
check in CalcSpillWeights.cpp does not follow the copies introduced by live
range splitting (after splitting, the live interval register definition is a
copy which is not rematerializable).

Reviewers: qcolombet

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

llvm-svn: 244439

8 years agoTest commit to verify commit access
Marina Yatsina [Mon, 10 Aug 2015 11:33:10 +0000 (11:33 +0000)]
Test commit to verify commit access

llvm-svn: 244438

8 years ago[Driver] Fix handling of -fbuiltin/-fcommon when combined with -mkernel
John Brawn [Mon, 10 Aug 2015 11:11:28 +0000 (11:11 +0000)]
[Driver] Fix handling of -fbuiltin/-fcommon when combined with -mkernel

-mkernel enables -fno-builtin and -fno-common by default, but allows -fbuiltin
and -fcommon to override that. However "-fbuiltin -fno-builtin" is treated the
same as "-fbuiltin" which is wrong, so fix that. Also fixes similar behaviour
when -fno-common is default.

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

llvm-svn: 244437

8 years agoFeedback from Jim: Change the "optimized code" warning to be entirely
Jason Molenda [Mon, 10 Aug 2015 07:55:25 +0000 (07:55 +0000)]
Feedback from Jim: Change the "optimized code" warning to be entirely
contained within Process so that we won't be duplicating the warning
message if other parts of the code want to issue the message.  Change
Process::PrintWarning to be a protected method - the public method
will be the PrintWarningOptimization et al.  Also, Have
Thread::FunctionOptimizationWarning shortcut out if the warnings
have been disabled so that we don't (potentially) compute parts of
the SymbolContext unnecessarily.

llvm-svn: 244436

8 years ago[Static Analyzer] Warn when inner and outer conditions are identical. The inner condi...
Daniel Marjamaki [Mon, 10 Aug 2015 07:18:29 +0000 (07:18 +0000)]
[Static Analyzer] Warn when inner and outer conditions are identical. The inner condition is always true.

Reviewed in http://reviews.llvm.org/D10892.

llvm-svn: 244435

8 years agoRangify for loop, NFC.
Yaron Keren [Mon, 10 Aug 2015 07:04:29 +0000 (07:04 +0000)]
Rangify for loop, NFC.

llvm-svn: 244434

8 years ago[tests] Remove calls to grep
Filipe Cabecinhas [Mon, 10 Aug 2015 07:01:11 +0000 (07:01 +0000)]
[tests] Remove calls to grep

llvm-svn: 244433

8 years agoReformat headers in ADT and Support partially.
NAKAMURA Takumi [Mon, 10 Aug 2015 04:22:36 +0000 (04:22 +0000)]
Reformat headers in ADT and Support partially.

Note, I didn't reformat entirely, but partially where I touched in previous commits.

llvm-svn: 244432

8 years agoWhitespace.
NAKAMURA Takumi [Mon, 10 Aug 2015 04:22:09 +0000 (04:22 +0000)]
Whitespace.

llvm-svn: 244431

8 years agoReformat linebreaks.
NAKAMURA Takumi [Mon, 10 Aug 2015 04:21:43 +0000 (04:21 +0000)]
Reformat linebreaks.

llvm-svn: 244430

8 years agollvm/include/llvm/Support/Memory.h: Fix comment header.
NAKAMURA Takumi [Mon, 10 Aug 2015 04:21:19 +0000 (04:21 +0000)]
llvm/include/llvm/Support/Memory.h: Fix comment header.

llvm-svn: 244429

8 years ago[MSVC] Crash fix: assigning of overloaded member function pointer caused assertion
Alexey Bataev [Mon, 10 Aug 2015 04:07:49 +0000 (04:07 +0000)]
[MSVC] Crash fix: assigning of overloaded member function pointer caused assertion

Original class was not marked with inheritance attribute and it causes a crash on codegen.
Differential Revision: http://reviews.llvm.org/D11828

llvm-svn: 244428

8 years agoclang/test/Modules: Satisfy win32 hosts due to dospath issue.
NAKAMURA Takumi [Sun, 9 Aug 2015 22:55:50 +0000 (22:55 +0000)]
clang/test/Modules: Satisfy win32 hosts due to dospath issue.

llvm-svn: 244427

8 years ago[TableGen] Make StringInit constructor take a StringRef instead of const std::string...
Craig Topper [Sun, 9 Aug 2015 22:03:04 +0000 (22:03 +0000)]
[TableGen] Make StringInit constructor take a StringRef instead of const std::string&. NFC.

llvm-svn: 244426

8 years agoCOFF: Define symbols for MSVC 2015 Control Flow Protection.
Rui Ueyama [Sun, 9 Aug 2015 21:01:06 +0000 (21:01 +0000)]
COFF: Define symbols for MSVC 2015 Control Flow Protection.

MSVC 2015's load configuration object (__load_config_used) contains
references to these symbols. I don't fully understand how it works,
but looks like these symbols are linker-defined ones. So I define them
here in the Driver. With this patch, LLD can self-host with MSVC 2015.

This patch is to link MSVC 2015-produced object files. It does not
implement Control Flow Protection. If I understand correctly, the
linker has to create a bitmap of function entry point addresses for
the CFG runtime. We don't do that yet. Produced executables will not
be protected by CFG.

llvm-svn: 244425

8 years agoCOFF: Do not fall through if /lib is processed.
Rui Ueyama [Sun, 9 Aug 2015 20:45:17 +0000 (20:45 +0000)]
COFF: Do not fall through if /lib is processed.

llvm-svn: 244424

8 years agoX86: remove a dead store (NFC)
Saleem Abdulrasool [Sun, 9 Aug 2015 20:39:09 +0000 (20:39 +0000)]
X86: remove a dead store (NFC)

The SP was always unconditionally assigned to later, but initialised early.
This delays the initialisation, and avoids the dead store.  Identified by
clang static analysis.  No functional change intended.

llvm-svn: 244423

8 years agoRemove unused `using`.
Rui Ueyama [Sun, 9 Aug 2015 20:38:58 +0000 (20:38 +0000)]
Remove unused `using`.

llvm-svn: 244422

8 years ago[LAA] Remove unused pointer partition argument from needsChecking(), NFC
Adam Nemet [Sun, 9 Aug 2015 20:06:08 +0000 (20:06 +0000)]
[LAA] Remove unused pointer partition argument from needsChecking(), NFC

This is no longer used in any of the callers.  Also remove the logic of
handling this argument.

llvm-svn: 244421

8 years ago[LAA] Remove unused pointer partition argument from generateChecks, NFC
Adam Nemet [Sun, 9 Aug 2015 20:06:06 +0000 (20:06 +0000)]
[LAA] Remove unused pointer partition argument from generateChecks, NFC

LoopDistribution does its own filtering now.

llvm-svn: 244420

8 years agoFix for build errors on arm-linux-gnueabi-gcc
Omair Javaid [Sun, 9 Aug 2015 19:04:41 +0000 (19:04 +0000)]
Fix for build errors on arm-linux-gnueabi-gcc
http://reviews.llvm.org/D11256

llvm-svn: 244419

8 years ago[PHITransAddr] Don't assume that instruction operands are translatable
David Majnemer [Sun, 9 Aug 2015 15:43:02 +0000 (15:43 +0000)]
[PHITransAddr] Don't assume that instruction operands are translatable

We can only PHI translate instructions.  In our attempt to PHI translate
a bitcast, we attempt to translate its operand; however, the operand
might be an argument or a global instead of an instruction.  Benignly
bail out when this happens.

This fixes PR24397.

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

llvm-svn: 244418

8 years ago[modules] Remove now-dead code for lazy loading of files specified by -fmodule-file=.
Richard Smith [Sun, 9 Aug 2015 08:58:36 +0000 (08:58 +0000)]
[modules] Remove now-dead code for lazy loading of files specified by -fmodule-file=.

llvm-svn: 244417

8 years ago[modules] PR22534: Load files specified by -fmodule-file= eagerly. In particular...
Richard Smith [Sun, 9 Aug 2015 08:48:41 +0000 (08:48 +0000)]
[modules] PR22534: Load files specified by -fmodule-file= eagerly. In particular, this avoids the need to re-parse module map files when using such a module.

llvm-svn: 244416

8 years agoUnrevert r244412 (reverted in r244414), and delete the bogus line left behind
Richard Smith [Sun, 9 Aug 2015 06:03:55 +0000 (06:03 +0000)]
Unrevert r244412 (reverted in r244414), and delete the bogus line left behind
in the unit test that was checking a file the test no longer creates.

llvm-svn: 244415

8 years agoRevert "[modules] Don't leak -M flags for dependency file generation into the module"
Justin Bogner [Sun, 9 Aug 2015 05:40:38 +0000 (05:40 +0000)]
Revert "[modules] Don't leak -M flags for dependency file generation into the module"

This was failing tests on a bunch of bots:

http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/29919/steps/check-all
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/29627/steps/check-all
http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/9959/
http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/5591/

This reverts r244412

llvm-svn: 244414

8 years ago[modules] When building a dependency file, include module maps parsed in the
Richard Smith [Sun, 9 Aug 2015 04:46:57 +0000 (04:46 +0000)]
[modules] When building a dependency file, include module maps parsed in the
current compilation, not just those from imported modules.

llvm-svn: 244413

8 years ago[modules] Don't leak -M flags for dependency file generation into the module
Richard Smith [Sun, 9 Aug 2015 02:44:20 +0000 (02:44 +0000)]
[modules] Don't leak -M flags for dependency file generation into the module
build process when we implicitly build a module. Previously, we'd create the
specified .d file once for each implicitly-built module and then finally
overwrite it with the correct contents after the requested build completes.
(This fails if you use stdout as a dependency file, which is what the provided
testcase does, and is how I discovered this brokenness.)

llvm-svn: 244412

8 years ago[modules] Attach dependency listeners to the module manager once when it's
Richard Smith [Sun, 9 Aug 2015 02:28:42 +0000 (02:28 +0000)]
[modules] Attach dependency listeners to the module manager once when it's
created, rather than creating and attaching a new listener each time we load a
module file (yes, the old ones were kept around too!). No functionality change
intended, but a bit more sanity.

llvm-svn: 244411

8 years agoAdd file missed from r244409.
Richard Smith [Sun, 9 Aug 2015 01:50:14 +0000 (01:50 +0000)]
Add file missed from r244409.

llvm-svn: 244410

8 years ago[modules] When loading a template specialization, re-canonicalize its template
Richard Smith [Sun, 9 Aug 2015 01:05:31 +0000 (01:05 +0000)]
[modules] When loading a template specialization, re-canonicalize its template
arguments because the reloaded form might have become non-canonical across the
serialization/deserialization step (this particularly happens when the
canonical form of the type involves an expression).

llvm-svn: 244409

8 years ago[IR] Remove unused declaration
David Majnemer [Sun, 9 Aug 2015 00:32:18 +0000 (00:32 +0000)]
[IR] Remove unused declaration

CatchReturnInst::init is never referenced, remove it.
No functionality change is intended.

llvm-svn: 244408

8 years agoTeach mingw toolchain driver to properly emit static or dynamic linking of ligcc.
Yaron Keren [Sun, 9 Aug 2015 00:24:07 +0000 (00:24 +0000)]
Teach mingw toolchain driver to properly emit static or dynamic linking of ligcc.
Implemented in MinGW::Linker::AddLibGCC since AddLibgcc is a logic puzzle even
before adding one more boolean. A first step towards simplification of AddLibgcc
would be to factor out the Android AddLibgcc code into its own routine.

llvm-svn: 244407

8 years agocmake: Error on invalid CMAKE_BUILD_TYPE
Justin Bogner [Sat, 8 Aug 2015 21:04:45 +0000 (21:04 +0000)]
cmake: Error on invalid CMAKE_BUILD_TYPE

Apparently if you make a typo in the argument to CMAKE_BUILD_TYPE,
cmake silently accepts this but doesn't apply any particular build
type to your build. This means you get a build that doesn't really
make any sense - it's sort of a debug build with asserts disabled.

Error out instead.

llvm-svn: 244406

8 years agoFix dangling reference in DwarfLinker.cpp. The original code
Yaron Keren [Sat, 8 Aug 2015 21:03:19 +0000 (21:03 +0000)]
Fix dangling reference in DwarfLinker.cpp. The original code

  Seq.emplace_back(Seq.back());

does not work as planned, since Seq.back() may become a dangling reference
when emplace_back is called and possibly reallocates vector. To avoid this,
the vector allocation should be reserved first and only then used.

This broke test/tools/dsymutil/X86/custom-line-table.test with Visual C++ 2013.

llvm-svn: 244405

8 years ago[Polly] Remove dead code in IndependentBlocks
Michael Kruse [Sat, 8 Aug 2015 20:31:20 +0000 (20:31 +0000)]
[Polly] Remove dead code in IndependentBlocks

Summary: The splitExitBlock function is never called. Going to replace its functionality in successive patches that do not modify the IR.

Reviewers: grosser

Subscribers: pollydev

Projects: #polly

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

llvm-svn: 244404

8 years ago[x86] enable machine combiner reassociations for 128-bit vector single/double adds
Sanjay Patel [Sat, 8 Aug 2015 19:08:20 +0000 (19:08 +0000)]
[x86] enable machine combiner reassociations for 128-bit vector single/double adds

llvm-svn: 244403

8 years agoFix some comment typos.
Benjamin Kramer [Sat, 8 Aug 2015 18:27:36 +0000 (18:27 +0000)]
Fix some comment typos.

llvm-svn: 244402

8 years agoAdd an assertion
Michael Kruse [Sat, 8 Aug 2015 18:10:54 +0000 (18:10 +0000)]
Add an assertion

Check whether a block is a direct predecessor.

llvm-svn: 244401

8 years ago[Static Analyzer] Add --analyzer-target option to scan-build.
Ted Kremenek [Sat, 8 Aug 2015 17:58:47 +0000 (17:58 +0000)]
[Static Analyzer] Add --analyzer-target option to scan-build.

When interposing on a compiler doing cross-compilation, scan-build
does not infer the target triple needed to pass to clang for
doing static analysis.  The --analyzer-target option allows one
to manually specify the target triple used during static analysis
(and only static analysis) for such cases.

Patch by Honggyu Kim!

Reviewed in http://reviews.llvm.org/D10356.

llvm-svn: 244400

8 years ago[IR] Cleanup some formatting issues in the EH instructions
David Majnemer [Sat, 8 Aug 2015 17:41:21 +0000 (17:41 +0000)]
[IR] Cleanup some formatting issues in the EH instructions

No functionality change is intended.

llvm-svn: 244399

8 years ago[ASAN/AArch64] Disable forkpty tests until we can fix them
Renato Golin [Sat, 8 Aug 2015 15:47:17 +0000 (15:47 +0000)]
[ASAN/AArch64] Disable forkpty tests until we can fix them

Reported in PR24400. Disable until it works, so we can keep the rest
tested and green.

llvm-svn: 244398

8 years agoReturn early on error. Should fix the asan bots.
Rafael Espindola [Sat, 8 Aug 2015 14:54:09 +0000 (14:54 +0000)]
Return early on error. Should fix the asan bots.

llvm-svn: 244397

8 years ago[X86] Add ADX and RDSEED to Skylake processor.
Craig Topper [Sat, 8 Aug 2015 07:31:15 +0000 (07:31 +0000)]
[X86] Add ADX and RDSEED to Skylake processor.

llvm-svn: 244396

8 years agoAdd SlowBTMem to Sandy Bridge and newer Intel CPUs. Reading through Agner Fog's table...
Craig Topper [Sat, 8 Aug 2015 07:20:04 +0000 (07:20 +0000)]
Add SlowBTMem to Sandy Bridge and newer Intel CPUs. Reading through Agner Fog's table suggests there have been no improvements to these processors relative to Westmere for bit test instructions.

llvm-svn: 244395

8 years agoRevert "[analyzer] Add checkers for OS X / iOS localizability issues"
Anna Zaks [Sat, 8 Aug 2015 04:53:04 +0000 (04:53 +0000)]
Revert "[analyzer] Add checkers for OS X / iOS localizability issues"

This reverts commit fc885033a30b6e30ccf82398ae7c30e646727b10.

Revert all localization checker commits until the proper fix is implemented.

llvm-svn: 244394

8 years agoRevert "[analyzer] Fixup to r244389 to make this build on windows."
Anna Zaks [Sat, 8 Aug 2015 04:52:59 +0000 (04:52 +0000)]
Revert "[analyzer] Fixup to r244389 to make this build on windows."

This reverts commit 57a46a75b408245cf4154a838fe13ad702065745.

Revert all localization checker commits until the proper fix is implemented.

llvm-svn: 244393

8 years ago[InstCombine] Don't try to sink EH pad instructions
David Majnemer [Sat, 8 Aug 2015 03:51:49 +0000 (03:51 +0000)]
[InstCombine] Don't try to sink EH pad instructions

Found by inspection, this change should not effect the existing
landingpad behavior.

llvm-svn: 244391

8 years ago[analyzer] Fixup to r244389 to make this build on windows.
Anna Zaks [Sat, 8 Aug 2015 02:26:07 +0000 (02:26 +0000)]
[analyzer] Fixup to r244389 to make this build on windows.

llvm-svn: 244390

8 years ago[analyzer] Add checkers for OS X / iOS localizability issues
Anna Zaks [Sat, 8 Aug 2015 01:49:26 +0000 (01:49 +0000)]
[analyzer] Add checkers for OS X / iOS localizability issues

Add checkers that detect code-level localizability issues for OS X / iOS:
 - A path sensitive checker that warns about uses of non-localized
 NSStrings passed to UI methods expecting localized strings.
 - A syntax checker that warns against not including a comment in
 NSLocalizedString macros.

A patch by Kulpreet Chilana!

llvm-svn: 244389

8 years ago244368: Fix a comment line introduced in r244368. [-Wdocumentation]
NAKAMURA Takumi [Sat, 8 Aug 2015 01:34:20 +0000 (01:34 +0000)]
244368: Fix a comment line introduced in r244368. [-Wdocumentation]

llvm-svn: 244388

8 years ago[IR] Stop hacking around a bug in GCC 4.5
David Majnemer [Sat, 8 Aug 2015 01:33:30 +0000 (01:33 +0000)]
[IR] Stop hacking around a bug in GCC 4.5

GCC 4.5 miscompiled this aspect of LLVM.  We support a minimum version
of 4.7.

llvm-svn: 244387

8 years ago[analyzer] Don't issue alarm in ObjCSuperCallChecker for the super class itself.
Devin Coughlin [Sat, 8 Aug 2015 01:31:51 +0000 (01:31 +0000)]
[analyzer] Don't issue alarm in ObjCSuperCallChecker for the super class itself.

The ObjCSuperCallChecker issues alarms for various Objective-C APIs that require
a subclass to call to its superclass's version of a method when overriding it.
So, for example, it raises an alarm when the -viewDidLoad method in a subclass
of UIViewController does not call [super viewDidLoad].

This patch fixes a false alarm where the analyzer erroneously required the
implementation of the superclass itself (e.g., UIViewController) to call
super.

rdar://problem/18416944

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

llvm-svn: 244386

8 years agoAdd model numbers for Skylake CPUs and an additional Broadwell model.
Craig Topper [Sat, 8 Aug 2015 01:29:15 +0000 (01:29 +0000)]
Add model numbers for Skylake CPUs and an additional Broadwell model.

llvm-svn: 244385

8 years agoAdd Intel family 6 model 93 as Silvermont.
Craig Topper [Sat, 8 Aug 2015 01:16:05 +0000 (01:16 +0000)]
Add Intel family 6 model 93 as Silvermont.

llvm-svn: 244384

8 years agoAMDGPU/SI: Another attempt to fix Windows bots broken by r244372
Tom Stellard [Sat, 8 Aug 2015 01:11:07 +0000 (01:11 +0000)]
AMDGPU/SI: Another attempt to fix Windows bots broken by r244372

llvm-svn: 244383

8 years agoRemove unnecessary includes
Matt Arsenault [Sat, 8 Aug 2015 00:41:53 +0000 (00:41 +0000)]
Remove unnecessary includes

llvm-svn: 244382

8 years agoAMDGPU: Implement AMDGPUOperand::print()
Matt Arsenault [Sat, 8 Aug 2015 00:41:51 +0000 (00:41 +0000)]
AMDGPU: Implement AMDGPUOperand::print()

llvm-svn: 244381