oota-llvm.git
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244472 91177308-0d34-0410-b5e6-96231b3b80d8

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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244471 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244470 91177308-0d34-0410-b5e6-96231b3b80d8

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".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244466 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244465 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244464 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244463 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244461 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244460 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244458 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244457 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244455 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244452 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244449 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244448 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244447 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244445 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244444 91177308-0d34-0410-b5e6-96231b3b80d8

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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244442 91177308-0d34-0410-b5e6-96231b3b80d8

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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244441 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244440 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244439 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244438 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244434 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244432 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244431 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244430 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244429 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244426 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244423 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244421 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244420 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244418 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244408 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244406 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244405 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244403 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244402 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244399 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244397 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244396 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244395 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244391 91177308-0d34-0410-b5e6-96231b3b80d8

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]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244388 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244387 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244385 91177308-0d34-0410-b5e6-96231b3b80d8

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244384 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244383 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244382 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244381 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Remove VCCReg
Matt Arsenault [Sat, 8 Aug 2015 00:41:48 +0000 (00:41 +0000)]
AMDGPU/SI: Remove VCCReg

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244380 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Remove source uses of VCCReg
Matt Arsenault [Sat, 8 Aug 2015 00:41:45 +0000 (00:41 +0000)]
AMDGPU/SI: Remove source uses of VCCReg

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244379 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDelete dead code. NFC.
Rafael Espindola [Sat, 8 Aug 2015 00:25:57 +0000 (00:25 +0000)]
Delete dead code. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244378 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Attempt to fix Windows bots broken by r244372
Tom Stellard [Sat, 8 Aug 2015 00:17:59 +0000 (00:17 +0000)]
AMDGPU/SI: Attempt to fix Windows bots broken by r244372

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244376 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoConvert getSymbolSection to return an ErrorOr.
Rafael Espindola [Fri, 7 Aug 2015 23:27:14 +0000 (23:27 +0000)]
Convert getSymbolSection to return an ErrorOr.

This function can actually fail since the symbol contains an index to the
section and that can be invalid.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244375 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoadd a missing regression test for a DAGCombiner FDIV optimization
Sanjay Patel [Fri, 7 Aug 2015 23:19:41 +0000 (23:19 +0000)]
add a missing regression test for a DAGCombiner FDIV optimization

There's no test for this transform in any backend. Discovered
while debugging fast-math-flag propagation in the DAG (r244053).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244373 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Add pass to lower OpenCL image and sampler arguments.
Tom Stellard [Fri, 7 Aug 2015 23:19:30 +0000 (23:19 +0000)]
AMDGPU: Add pass to lower OpenCL image and sampler arguments.

The pass adds new kernel arguments for image attributes, and
resolves calls to dummy attribute and resource id getter functions.

Patch by: Zoltan Gilian

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244372 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SPARC] Disable unsupported ExecutionEngine tests, and XFAIL a couple
James Y Knight [Fri, 7 Aug 2015 23:01:16 +0000 (23:01 +0000)]
[SPARC] Disable unsupported ExecutionEngine tests, and XFAIL a couple
of DebugInfo tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244371 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LAA] Remove unused pointer partition argument from getNumberOfChecks, NFC
Adam Nemet [Fri, 7 Aug 2015 22:44:21 +0000 (22:44 +0000)]
[LAA] Remove unused pointer partition argument from getNumberOfChecks, NFC

This is unused after filtering checks was moved to the clients.

As a result, we can just return the number of the checks in the
precomputed set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244369 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LAA] Make the set of runtime checks part of the state of LAA, NFC
Adam Nemet [Fri, 7 Aug 2015 22:44:15 +0000 (22:44 +0000)]
[LAA] Make the set of runtime checks part of the state of LAA, NFC

This is the full set of checks that clients can further filter. IOW,
it's client-agnostic.  This makes LAA complete in the sense that it now
provides the two main results of its analysis precomputed:

1. memory dependences via getDepChecker().getInsterestingDependences()
2. run-time checks via getRuntimePointerCheck().getChecks()

However, as a consequence we now compute this information pro-actively.
Thus if the client decides to skip the loop based on the dependences
we've computed the checks unnecessarily.  In order to see whether this
was a significant overhead I checked compile time on SPEC2k6 LTO bitcode
files.  The change was in the noise.

The checks are generated in canCheckPtrAtRT, at the same place where we
used to call groupChecks to merge checks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244368 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AArch64][LoadStoreOptimizer] Turn a test into an assert. NFC.
Quentin Colombet [Fri, 7 Aug 2015 22:40:51 +0000 (22:40 +0000)]
[AArch64][LoadStoreOptimizer] Turn a test into an assert. NFC.

At this point the given Opc must be valid, otherwise we should
not look for a matching pair to form paired load or store.

Thanks to Chad to point out this piece of code!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244366 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Use InstAlias instead of MnemonicAlias for VOPC instructions
Tom Stellard [Fri, 7 Aug 2015 22:00:56 +0000 (22:00 +0000)]
AMDGPU/SI: Use InstAlias instead of MnemonicAlias for VOPC instructions

Summary:
With InstAlias, we don't need to print the _e32 portion of the mnemonic
when we print the $dst operand.  This change makes it possible to
include vcc in the asm string when we switch VOPC over to having
implicit vcc defs.

Reviewers: arsenm

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244362 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoredo r244360 (tighten checks...) after specifying triple
Sanjay Patel [Fri, 7 Aug 2015 21:42:24 +0000 (21:42 +0000)]
redo r244360 (tighten checks...) after specifying triple

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244361 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agotighten checks using update_llc_test_checks.py
Sanjay Patel [Fri, 7 Aug 2015 21:38:53 +0000 (21:38 +0000)]
tighten checks using update_llc_test_checks.py

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244360 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMIR Serialization: Serialize the base alignment for the machine memory operands.
Alex Lorenz [Fri, 7 Aug 2015 20:48:30 +0000 (20:48 +0000)]
MIR Serialization: Serialize the base alignment for the machine memory operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244357 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMIR Serialization: Serialize the offsets for the machine memory operands.
Alex Lorenz [Fri, 7 Aug 2015 20:26:52 +0000 (20:26 +0000)]
MIR Serialization: Serialize the offsets for the machine memory operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244356 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMIR Parser: Extract the parsing of the operand's offset into a new method. NFC.
Alex Lorenz [Fri, 7 Aug 2015 20:21:00 +0000 (20:21 +0000)]
MIR Parser: Extract the parsing of the operand's offset into a new method. NFC.

This commit extract the code that parses the 64-bit offset from the method
'parseOperandsOffset' to a new method 'parseOffset' so that we can reuse it
when parsing the offset for the machine memory operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244355 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Assume SMRD access for constant address space
Matt Arsenault [Fri, 7 Aug 2015 20:18:34 +0000 (20:18 +0000)]
AMDGPU: Assume SMRD access for constant address space

Since r243294 these are selected to SMRD and
moved later if required.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244354 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDon't look for a SHT_DYNSYM in the ELFFile's constructor.
Rafael Espindola [Fri, 7 Aug 2015 20:11:08 +0000 (20:11 +0000)]
Don't look for a SHT_DYNSYM in the ELFFile's constructor.

Yet another step in not having it scan every section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244353 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd Intel family 6 model 90 as Silvermont. Fixes PR24392.
Craig Topper [Fri, 7 Aug 2015 20:09:42 +0000 (20:09 +0000)]
Add Intel family 6 model 90 as Silvermont. Fixes PR24392.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244352 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove the symbol iteration functions that don't take a symbol table.
Rafael Espindola [Fri, 7 Aug 2015 20:07:27 +0000 (20:07 +0000)]
Remove the symbol iteration functions that don't take a symbol table.

Another step in making ELFFile's constructor not iterate over all sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244351 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LAA] Remove unused pointer partition argument from print(), NFC
Adam Nemet [Fri, 7 Aug 2015 19:44:48 +0000 (19:44 +0000)]
[LAA] Remove unused pointer partition argument from print(), NFC

This is now handled in the client.  No need for LAA to provide this
variant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244349 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ConstantFoldTerminator] Preserve make.implicit metadata when converting SwitchInst...
Chen Li [Fri, 7 Aug 2015 19:30:12 +0000 (19:30 +0000)]
[ConstantFoldTerminator] Preserve make.implicit metadata when converting SwitchInst to BranchInst

Summary: llvm::ConstantFoldTerminator function can convert SwitchInst with single case (and default) to a conditional BranchInst. This patch adds support to preserve make.implicit metadata on this conversion.

Reviewers: sanjoy, weimingz, chenli

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244348 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MCDwarf] Use more idiomatic [u]int8_t types.
Frederic Riss [Fri, 7 Aug 2015 19:19:44 +0000 (19:19 +0000)]
[MCDwarf] Use more idiomatic [u]int8_t types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244347 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[InstCombine] Fix SSE2/AVX2 vector logical shift by constant
Simon Pilgrim [Fri, 7 Aug 2015 18:22:50 +0000 (18:22 +0000)]
[InstCombine] Fix SSE2/AVX2 vector logical shift by constant

This patch fixes the sse2/avx2 vector shift by constant instcombine call to correctly deal with the fact that the shift amount is formed from the entire lower 64-bit and not just the lowest element as it currently assumes.

e.g.

%1 = tail call <4 x i32> @llvm.x86.sse2.psrl.d(<4 x i32> %v, <4 x i32> <i32 15, i32 15, i32 15, i32 15>)

In this case, (V)PSRLD doesn't perform a lshr by 15 but in fact attempts to shift by 64424509455 ((15 << 32) | 15) - giving a zero result.

In addition, this review also recognizes shift-by-zero from a ConstantAggregateZero type (PR23821).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244341 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoNFC.
Cong Hou [Fri, 7 Aug 2015 18:04:17 +0000 (18:04 +0000)]
NFC.

Use a parent class to avoid reduncant code when specializing GraphTraits for T and const T.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244340 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd functions to save and restore the PrettyStackTrace state.
Nico Weber [Fri, 7 Aug 2015 17:47:03 +0000 (17:47 +0000)]
Add functions to save and restore the PrettyStackTrace state.

PrettyStackTraceHead is a LLVM_THREAD_LOCAL, which means it's just a global
in LLVM_ENABLE_THREADS=NO builds.  If a CrashRecoveryContext is used with
code that uses PrettyStackEntries, and a crash happens, PrettyStackTraceHead is
currently not reset to its pre-crash value.  These functions make it possible
to add a cleanup to such code that does this.

(Not reseting the value then causes the assert in ~PrettyStackTraceEntry() to
fire if the code outside of the CrashRecoveryContext also uses
PrettyStackEntries -- for example, clang when building a module.)

Part of PR11974.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244338 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd a comment.
Nico Weber [Fri, 7 Aug 2015 17:32:06 +0000 (17:32 +0000)]
Add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244337 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDelete dead code. NFC.
Rafael Espindola [Fri, 7 Aug 2015 17:06:05 +0000 (17:06 +0000)]
Delete dead code. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244335 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Remove an unused reference to MachineRegisterInfo. NFC.
Chad Rosier [Fri, 7 Aug 2015 17:02:29 +0000 (17:02 +0000)]
[ARM] Remove an unused reference to MachineRegisterInfo. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244334 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDon't use a DenseMap to handle SHT_SYMTAB_SHNDX.
Rafael Espindola [Fri, 7 Aug 2015 16:51:44 +0000 (16:51 +0000)]
Don't use a DenseMap to handle SHT_SYMTAB_SHNDX.

It is already a convenient table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244333 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Use correct encoding of vopc for VI in the assembler
Tom Stellard [Fri, 7 Aug 2015 16:45:33 +0000 (16:45 +0000)]
AMDGPU/SI: Use correct encoding of vopc for VI in the assembler

Summary: We were using the SI encoding for VI.

Reviewers: arsenm

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244332 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Add VI checks to vop3 assembler tests
Tom Stellard [Fri, 7 Aug 2015 16:45:30 +0000 (16:45 +0000)]
AMDGPU/SI: Add VI checks to vop3 assembler tests

Reviewers: arsenm

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244331 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoWe're actually -Wmissing-field-initializers clean thanks to the cmake
Eric Christopher [Fri, 7 Aug 2015 16:44:47 +0000 (16:44 +0000)]
We're actually -Wmissing-field-initializers clean thanks to the cmake
build so check and turn on -Wmissing-field-initializers. While there,
reorganize the conditional warning code based on compiler to be a bit
more obvious and inside a switch statement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244330 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDelete dead typedef. NFC.
Rafael Espindola [Fri, 7 Aug 2015 16:36:47 +0000 (16:36 +0000)]
Delete dead typedef. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244328 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse 'signed char' instead of 'char'
Frederic Riss [Fri, 7 Aug 2015 16:31:59 +0000 (16:31 +0000)]
Use 'signed char' instead of 'char'

Hope this fixes the s390 and aarch64 bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244327 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoadd missing tests files
Rafael Espindola [Fri, 7 Aug 2015 15:35:49 +0000 (15:35 +0000)]
add missing tests files

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244323 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: v_mac_legacy_f32 does not exist on VI
Tom Stellard [Fri, 7 Aug 2015 15:34:30 +0000 (15:34 +0000)]
AMDGPU/SI: v_mac_legacy_f32 does not exist on VI

Reviewers: arsenm

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244322 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Remove unused outs parameter from VOPC TableGen classes
Tom Stellard [Fri, 7 Aug 2015 15:34:27 +0000 (15:34 +0000)]
AMDGPU/SI: Remove unused outs parameter from VOPC TableGen classes

Reviewers: arsenm

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244321 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd dynamic_table iterators back to ELF.h.
Rafael Espindola [Fri, 7 Aug 2015 15:25:20 +0000 (15:25 +0000)]
Add dynamic_table iterators back to ELF.h.

In tree they are only used by llvm-readobj, but it is also used by
https://github.com/mono/CppSharp.

While at it, add some missing error checking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244320 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[dsymutil] Use the new MCDwarfLineTableParams customization to emit linetables
Frederic Riss [Fri, 7 Aug 2015 15:14:13 +0000 (15:14 +0000)]
[dsymutil] Use the new MCDwarfLineTableParams customization to emit linetables

llvm-dsymutil has to be able to process debug info produced by other compilers
which use different line table settings. The testcase wasn't generated by
another compiler, but by a modified clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244319 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MC/Dwarf] Allow to specify custom parameters for linetable emission.
Frederic Riss [Fri, 7 Aug 2015 15:14:08 +0000 (15:14 +0000)]
[MC/Dwarf] Allow to specify custom parameters for linetable emission.

NFC patch for current users, but llvm-dsymutil will use the new
functionality to adapt to the input linetable.

Based on a patch by Adrian Prantl.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244318 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix unused variable warning introduced in r244314
Silviu Baranga [Fri, 7 Aug 2015 12:05:46 +0000 (12:05 +0000)]
Fix unused variable warning introduced in r244314

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244315 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Update ReconstructShuffle to handle mismatched types
Silviu Baranga [Fri, 7 Aug 2015 11:40:46 +0000 (11:40 +0000)]
[ARM] Update ReconstructShuffle to handle mismatched types

Summary:
Port the ReconstructShuffle function from AArch64 to ARM
to handle mismatched incoming types in the BUILD_VECTOR
node.

This fixes an outstanding FIXME in the ReconstructShuffle
code.

Reviewers: t.p.northover, rengolin

Subscribers: aemerson, llvm-commits, rengolin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244314 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "Make global aliases have symbol size equal to their type"
John Brawn [Fri, 7 Aug 2015 10:56:21 +0000 (10:56 +0000)]
Revert "Make global aliases have symbol size equal to their type"

This reverts r242520, as it caused pr24379. Also removes part of the test added
by r243874 that checks the size of alias symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244313 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTweak llvm/test/tools/dsymutil/arch-option.test to avoid globbing on mingw-w64.
NAKAMURA Takumi [Fri, 7 Aug 2015 08:38:22 +0000 (08:38 +0000)]
Tweak llvm/test/tools/dsymutil/arch-option.test to avoid globbing on mingw-w64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244311 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoShrinkWrap.cpp: Tweak r244235 for a non-functional member, PredicateFtor. [-Wdocument...
NAKAMURA Takumi [Fri, 7 Aug 2015 07:40:23 +0000 (07:40 +0000)]
ShrinkWrap.cpp: Tweak r244235 for a non-functional member, PredicateFtor. [-Wdocumentation]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244309 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoWebAssembly: textual emission uses expected opcode names
JF Bastien [Fri, 7 Aug 2015 01:57:03 +0000 (01:57 +0000)]
WebAssembly: textual emission uses expected opcode names

Summary: WebAssembly's tablegen instructions have the names WebAssembly expects, but by LLVM convention they're uppercase and suffixed with their type after an underscore. Leave the C++ code that way, but print outt he names WebAssembly expects (lowercase, no type). We could teach tablegen to do this later, maybe by using `!cast<string>(node)` in the .td files.

Reviewers: sunfish

Subscribers: jfb, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244305 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoELF: Add AMDGPU specific defintions
Tom Stellard [Fri, 7 Aug 2015 01:35:24 +0000 (01:35 +0000)]
ELF: Add AMDGPU specific defintions

Reviewers: rafael

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244303 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoValueMapper: Resolve uniquing cycles more aggressively
Duncan P. N. Exon Smith [Fri, 7 Aug 2015 00:44:55 +0000 (00:44 +0000)]
ValueMapper: Resolve uniquing cycles more aggressively

As a follow-up to r244181, resolve uniquing cycles underneath distinct
nodes on the fly.  This prevents uniquing cycles in early operands from
affecting later operands.  It also removes an iteration through distinct
nodes' operands.

No real functional change here, just more prompt resolution of temporary
nodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244302 91177308-0d34-0410-b5e6-96231b3b80d8