]> granicus.if.org Git - llvm/log
llvm
8 years ago[LAA] Fix alphabetical sorting of headers. NFC
Adam Nemet [Fri, 1 Jul 2016 00:09:02 +0000 (00:09 +0000)]
[LAA] Fix alphabetical sorting of headers. NFC

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

8 years agoCodeGen: Use MachineInstr& more in MachineTraceMetrics, NFC
Duncan P. N. Exon Smith [Fri, 1 Jul 2016 00:05:40 +0000 (00:05 +0000)]
CodeGen: Use MachineInstr& more in MachineTraceMetrics, NFC

Push MachineInstr& through helper APIs for consistency.  This doesn't
remove any more implicit conversions, but it's a nice cleanup after
r274300.

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

8 years agoCodeGen: Use MachineInstr& in MachineTraceMetrics, NFC
Duncan P. N. Exon Smith [Thu, 30 Jun 2016 23:53:20 +0000 (23:53 +0000)]
CodeGen: Use MachineInstr& in MachineTraceMetrics, NFC

This avoids an implicit conversion from iterator to pointer.

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

8 years agoLoadStoreVectorizer: Check skipFunction first.
Matt Arsenault [Thu, 30 Jun 2016 23:50:18 +0000 (23:50 +0000)]
LoadStoreVectorizer: Check skipFunction first.

Also add test I forgot to add to r274296.

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

8 years agoCodeGen: Use MachineInstr& in LocalStackSlotAllocation, NFC
Duncan P. N. Exon Smith [Thu, 30 Jun 2016 23:39:46 +0000 (23:39 +0000)]
CodeGen: Use MachineInstr& in LocalStackSlotAllocation, NFC

Avoid a number of implicit conversions from iterator to pointer by using
range-based for and MachineInstr&.

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

8 years agoCodeGen: Use range-based for in LiveVariables, NFC
Duncan P. N. Exon Smith [Thu, 30 Jun 2016 23:33:35 +0000 (23:33 +0000)]
CodeGen: Use range-based for in LiveVariables, NFC

Avoid an implicit iterator to pointer conversion in
LiveVariables::runOnBlock by switching to a range-based for.

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

8 years agoLoadStoreVectorizer: Skip optnone functions
Matt Arsenault [Thu, 30 Jun 2016 23:30:29 +0000 (23:30 +0000)]
LoadStoreVectorizer: Skip optnone functions

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

8 years agoCodeGen: Use MachineInstr& in HoistSpillHelper, NFC
Duncan P. N. Exon Smith [Thu, 30 Jun 2016 23:28:15 +0000 (23:28 +0000)]
CodeGen: Use MachineInstr& in HoistSpillHelper, NFC

Avoid another few implicit conversions from iterator to pointer.

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

8 years agoCodeGen: Use MachineInstr& in LDVImpl::handleDebugValue, NFC
Duncan P. N. Exon Smith [Thu, 30 Jun 2016 23:13:38 +0000 (23:13 +0000)]
CodeGen: Use MachineInstr& in LDVImpl::handleDebugValue, NFC

Avoid another implicit conversion from iterator to pointer.

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

8 years agoAdd LoadStoreVectorizer pass
Matt Arsenault [Thu, 30 Jun 2016 23:11:38 +0000 (23:11 +0000)]
Add LoadStoreVectorizer pass

This was contributed by Apple, and I've been working on
minimal cleanups and generalizing it.

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

8 years agoCodeGen: Use MachineInstr& in ExpandISelPseudos, NFC
Duncan P. N. Exon Smith [Thu, 30 Jun 2016 23:09:39 +0000 (23:09 +0000)]
CodeGen: Use MachineInstr& in ExpandISelPseudos, NFC

Avoid another implicit conversion from MachineInstrBundleIterator to
MachineInstr* by using MachineInstr&.

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

8 years agoCodeGen: Use MachineInstr& in IfConversion, NFC
Duncan P. N. Exon Smith [Thu, 30 Jun 2016 23:04:51 +0000 (23:04 +0000)]
CodeGen: Use MachineInstr& in IfConversion, NFC

Switch to a range-based for in IfConverter::PredicateBlock and take
MachineInstr& in MaySpeculate to avoid an implicit conversion from
MachineBasicBlock::iterator to MachineInstr*.

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

8 years agoRemove non-ASCII characters (silly smart quotes). Thanks to Hal for
Chandler Carruth [Thu, 30 Jun 2016 23:04:20 +0000 (23:04 +0000)]
Remove non-ASCII characters (silly smart quotes). Thanks to Hal for
noticing.

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

8 years ago[TableGen] Use a SmallVector for Record::Values to avoid debug iterators
Reid Kleckner [Thu, 30 Jun 2016 23:04:07 +0000 (23:04 +0000)]
[TableGen] Use a SmallVector for Record::Values to avoid debug iterators

Debug iterators are valuable so we don't want to turn them off
completely. However, llvm-tblgen is critical to build speed, so we can
skip them here.

Regenerating X86GenSubtargetInfo.inc in a clang-cl self-host debug build
now takes 39s instead of 1m29s.

Helps PR28222

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

8 years agoCodeGen: Use MachineInstr& in TargetLowering, NFC
Duncan P. N. Exon Smith [Thu, 30 Jun 2016 22:52:52 +0000 (22:52 +0000)]
CodeGen: Use MachineInstr& in TargetLowering, NFC

This is a mechanical change to make TargetLowering API take MachineInstr&
(instead of MachineInstr*), since the argument is expected to be a valid
MachineInstr.  In one case, changed a parameter from MachineInstr* to
MachineBasicBlock::iterator, since it was used as an insertion point.

As a side effect, this removes a bunch of MachineInstr* to
MachineBasicBlock::iterator implicit conversions, a necessary step
toward fixing PR26753.

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

8 years agoTest commit.
David L Kreitzer [Thu, 30 Jun 2016 21:43:11 +0000 (21:43 +0000)]
Test commit.

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

8 years agoDon't use unchecked dyn_cast
Matt Arsenault [Thu, 30 Jun 2016 21:18:06 +0000 (21:18 +0000)]
Don't use unchecked dyn_cast

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

8 years agoSLPVectorizer: Move propagateMetadata to VectorUtils
Matt Arsenault [Thu, 30 Jun 2016 21:17:59 +0000 (21:17 +0000)]
SLPVectorizer: Move propagateMetadata to VectorUtils

This will be re-used by the LoadStoreVectorizer.

Fix handling of range metadata and testcase by Justin Lebar.

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

8 years agoAMDGPU: Add m0 vgpr load loop block as successor
Matt Arsenault [Thu, 30 Jun 2016 20:49:28 +0000 (20:49 +0000)]
AMDGPU: Add m0 vgpr load loop block as successor

This shows up as a verifier error when I move this
earlier, not sure why it didn't before.

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

8 years ago[libFuzzer] Let user specify extra stats file.
Mike Aizatsky [Thu, 30 Jun 2016 20:43:06 +0000 (20:43 +0000)]
[libFuzzer] Let user specify extra stats file.

Summary: If AFL_DRIVER_EXTRA_STATS_FILENAME is set and valid, write to it peak_rss_mb and slowest_unit_time_sec. These are both stats that libFuzzer can print but afl cannot.

Reviewers: kcc, aizatsky, metzman

Subscribers: llvm-commits

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

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

8 years ago[CMake] Module builds depend on target intrinsics_gen to be built first.
Vassil Vassilev [Thu, 30 Jun 2016 20:35:56 +0000 (20:35 +0000)]
[CMake] Module builds depend on target intrinsics_gen to be built first.

When compiling with modules, header A and B can be in the same module M.
B depends on intrinsics_gen and A doesn't. Compiling a source file #include-ing
header A, we implicitly request module M to be built. It puts header A and B in
the same TU and tries to build them. Since B depends on intrinsics_gen (which
might not be built yet) we run into build failures.

This should fix our modules buildbot.

Patch reviewed by Chris Bieneman.

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

8 years agoIntroduce a *draft* of a code of conduct for the LLVM community and the
Chandler Carruth [Thu, 30 Jun 2016 20:27:54 +0000 (20:27 +0000)]
Introduce a *draft* of a code of conduct for the LLVM community and the
associated reporting guide.

I want to emphasize that at this point these are just drafts!

This is the result of very extended discussion on the mailing lists on
several different threads:
http://lists.llvm.org/pipermail/llvm-dev/2015-October/091218.html
http://lists.llvm.org/pipermail/llvm-dev/2016-May/099120.html
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151019/307070.html

The reporting guide in particular I anticipate will be shaped somewhat
by the advisory committee when they are selected. But hopefully this
serves as a good starting point and good guidance while the advisory
committee is being sorted out.

I'd like to thank all the folks who contributed to this. Many, *many*
people worked to help with drafting, wording, suggestions, and edits.
Also, this is based on widely used existing codes of coduct as mentioned
in the text, and the original authors of those deserve many thanks as
well.

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

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

8 years agoAdd an artificial line-0 debug location when the compiler emits a call to
Yunzhong Gao [Thu, 30 Jun 2016 18:49:04 +0000 (18:49 +0000)]
Add an artificial line-0 debug location when the compiler emits a call to
__stack_chk_fail(). This avoids a compiler crash.

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

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

8 years agoRefine the set of UniformAfterVectorization instructions.
Wei Mi [Thu, 30 Jun 2016 18:42:56 +0000 (18:42 +0000)]
Refine the set of UniformAfterVectorization instructions.

Except the seed uniform instructions (conditional branch and consecutive ptr
instructions), dependencies to be added into uniform set should only be used
by existing uniform instructions or intructions outside of current loop.

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

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

8 years agoCodeGen: Add the other BuildMI overload for MachineInstr&
Justin Bogner [Thu, 30 Jun 2016 18:32:12 +0000 (18:32 +0000)]
CodeGen: Add the other BuildMI overload for MachineInstr&

The change in r274193 missed this variant.

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

8 years agoDelete MCCodeGenInfo.
Rafael Espindola [Thu, 30 Jun 2016 18:25:11 +0000 (18:25 +0000)]
Delete MCCodeGenInfo.

MC doesn't really care about CodeGen stuff, so this was just
complicating target initialization.

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

8 years agorevert http://reviews.llvm.org/D21101
Etienne Bergeron [Thu, 30 Jun 2016 17:52:24 +0000 (17:52 +0000)]
revert http://reviews.llvm.org/D21101

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

8 years ago[Support] Fix a bug in ErrorList::join / joinErrors.
Lang Hames [Thu, 30 Jun 2016 17:43:06 +0000 (17:43 +0000)]
[Support] Fix a bug in ErrorList::join / joinErrors.

When concatenating two error lists the ErrorList::join method (which is called
by joinErrors) was failing to set the checked bit on the second error, leading
to a 'failure to check error' assertion.

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

8 years ago[pdb] Re-add code to write PDB files.
Zachary Turner [Thu, 30 Jun 2016 17:43:00 +0000 (17:43 +0000)]
[pdb] Re-add code to write PDB files.

Somehow all the functionality to write PDB files got removed,
probably accidentally when uploading the patch perhaps the wrong
one got uploaded.  This re-adds all the code, as well as the
corresponding test.

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

8 years agoUpdate llvm-pdbdump to use subcommands.
Zachary Turner [Thu, 30 Jun 2016 17:42:48 +0000 (17:42 +0000)]
Update llvm-pdbdump to use subcommands.

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

8 years ago[CMake] Add an LLVM_ENABLE_MODULE_DEBUGGING flag for building with -gmodules.
Adrian Prantl [Thu, 30 Jun 2016 17:15:44 +0000 (17:15 +0000)]
[CMake] Add an LLVM_ENABLE_MODULE_DEBUGGING flag for building with -gmodules.
This flag is only effective in builds with debug info and modules.
The default is On for Darwin only.

rdar://problem/27019000

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

8 years agoRevert "[CMake] Move the -Xclang option before -fmodules-cache-path"
Adrian Prantl [Thu, 30 Jun 2016 15:58:36 +0000 (15:58 +0000)]
Revert "[CMake] Move the -Xclang option before -fmodules-cache-path"

This reverts commit 3db82f646a0890eb7664d0351b5a3c79622e8bef.

Vassil already fixed this and I mechanically undid his fix without looking
too close at what I'm actually doing. Need more coffee.

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

8 years ago[CMake] Move the -Xclang option before -fmodules-cache-path
Adrian Prantl [Thu, 30 Jun 2016 15:44:35 +0000 (15:44 +0000)]
[CMake] Move the -Xclang option before -fmodules-cache-path
This fixes a typo introduced in r274196.
Thanks to Vassil Vassilev for noticing!

http://reviews.llvm.org/D21827
rdar://problem/27019000

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

8 years ago[exceptions] Upgrade exception handlers when stack protector is used
Etienne Bergeron [Thu, 30 Jun 2016 15:36:59 +0000 (15:36 +0000)]
[exceptions] Upgrade exception handlers when stack protector is used

Summary:
MSVC provide exception handlers with enhanced information to deal with security buffer feature (/GS).

To be more secure, the security cookies (GS and SEH) are validated when unwinding the stack.

The following code:
```
void f() {}

void foo() {
  __try {
    f();
  } __except(1) {
    f();
  }
}
```

Reviewers: majnemer, rnk

Subscribers: thakis, llvm-commits, chrisha

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

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

8 years agofix formatting, add TODO; NFC
Sanjay Patel [Thu, 30 Jun 2016 15:32:45 +0000 (15:32 +0000)]
fix formatting, add TODO; NFC

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

8 years ago[DSE] Fix bug in partial overwrite tracking
Jun Bum Lim [Thu, 30 Jun 2016 15:32:20 +0000 (15:32 +0000)]
[DSE] Fix bug in partial overwrite tracking

Summary:
Found cases where DSE incorrectly add partially-overwritten intervals.
Please see the test case for details.

Reviewers: mcrosier, eeckstein, hfinkel

Subscribers: mcrosier, llvm-commits

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

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

8 years ago[InstCombine] shrink switch conditions better (PR24766)
Sanjay Patel [Thu, 30 Jun 2016 14:51:21 +0000 (14:51 +0000)]
[InstCombine] shrink switch conditions better (PR24766)

https://llvm.org/bugs/show_bug.cgi?id=24766#c2

This removes a hack that was added for the benefit of x86 codegen.
It prevented shrinking the switch condition even to smaller legal (DataLayout) types.
We have a safety mechanism in CGP after:
http://reviews.llvm.org/rL251857
...so we're free to use the optimal (smallest) IR type now.

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

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

8 years agoTest commit
Elliot Colp [Thu, 30 Jun 2016 14:42:47 +0000 (14:42 +0000)]
Test commit

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

8 years ago[InstCombine] use ConstantExpr::getBitCast() instead of creating useless instruction
Sanjay Patel [Thu, 30 Jun 2016 14:27:41 +0000 (14:27 +0000)]
[InstCombine] use ConstantExpr::getBitCast() instead of creating useless instruction

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

8 years ago[InstCombine] extend matchSelectFromAndOr() to work with i1 scalar types
Sanjay Patel [Thu, 30 Jun 2016 14:18:18 +0000 (14:18 +0000)]
[InstCombine] extend matchSelectFromAndOr() to work with i1 scalar types

If the incoming types are i1, then we don't have to pattern match any sext ops.

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

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

8 years ago[CMake] -fmodules-local-submodule-visibility is a cc1-only option.
Vassil Vassilev [Thu, 30 Jun 2016 14:17:42 +0000 (14:17 +0000)]
[CMake] -fmodules-local-submodule-visibility is a cc1-only option.

This should fix modules builds on platforms other than Darwin after r274196.

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

8 years agoDon't repeat names in comments. NFC.
Rafael Espindola [Thu, 30 Jun 2016 12:44:52 +0000 (12:44 +0000)]
Don't repeat names in comments. NFC.

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

8 years agoDelete unused includes. NFC.
Rafael Espindola [Thu, 30 Jun 2016 12:19:16 +0000 (12:19 +0000)]
Delete unused includes. NFC.

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

8 years ago[SystemZ] Let z13 also support FeatureMiscellaneousExtensions.
Jonas Paulsson [Thu, 30 Jun 2016 07:13:56 +0000 (07:13 +0000)]
[SystemZ] Let z13 also support FeatureMiscellaneousExtensions.

This processor feature had been left out by mistake from the z13
ProcessorModel.

This time with updated test case. Thanks, Hans.

Reviewed by Ulrich Weigand.

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

8 years ago[AArch64] Add Broadcom Vulcan scheduling model.
Pankaj Gode [Thu, 30 Jun 2016 06:42:31 +0000 (06:42 +0000)]
[AArch64] Add Broadcom Vulcan scheduling model.

Adding scheduling model for new Broadcom Vulcan core (ARMv8.1A).

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

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

8 years agoUse ShuffleVectorSDNode::isSplat member method instead of static method isSplatMask...
Craig Topper [Thu, 30 Jun 2016 04:38:51 +0000 (04:38 +0000)]
Use ShuffleVectorSDNode::isSplat member method instead of static method isSplatMask where the mask came directly from getMask() on a shuffle node.

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

8 years ago[CodeView] Implement support for bitfields in LLVM
David Majnemer [Thu, 30 Jun 2016 03:00:20 +0000 (03:00 +0000)]
[CodeView] Implement support for bitfields in LLVM

CodeView need to know the offset of the storage allocation for a
bitfield.  Encode this via the "extraData" field in DIDerivedType and
introduced a new flag, DIFlagBitField, to indicate whether or not a
member is a bitfield.

This fixes PR28162.

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

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

8 years ago[SCEV] Compute max be count from shift operator only if all else fails
Sanjoy Das [Thu, 30 Jun 2016 02:47:28 +0000 (02:47 +0000)]
[SCEV] Compute max be count from shift operator only if all else fails

In particular, check to see if we can compute a precise trip count by
exhaustively simulating the loop first.

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

8 years ago[ADT] Add a new data structure for managing a priority worklist where
Chandler Carruth [Thu, 30 Jun 2016 02:32:20 +0000 (02:32 +0000)]
[ADT] Add a new data structure for managing a priority worklist where
re-insertion of entries into the worklist moves them to the end.

This is fairly similar to a SetVector, but helps in the case where in
addition to not inserting duplicates you want to adjust the sequence of
a pop-off-the-back worklist.

I'm not at all attached to the name of this data structure if others
have better suggestions, but this is one that David Majnemer brought up
in IRC discussions that seems plausible.

I've trimmed the interface down somewhat from SetVector's interface
because several things make less sense here IMO: iteration primarily.
I'd prefer to add these back as we have users that need them. My use
case doesn't even need all of what is provided here. =]

I've also included a basic unittest to make sure this functions
reasonably.

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

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

8 years ago[CFLAA] Add support for ModRef queries.
George Burgess IV [Thu, 30 Jun 2016 02:11:26 +0000 (02:11 +0000)]
[CFLAA] Add support for ModRef queries.

This patch makes CFLAA answer some ModRef queries. Because we don't
distinguish between reading/writing when making StratifiedSets, we're
unable to offer any of the readonly-related answers.

Patch by Jia Chen.

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

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

8 years ago[CMake] Introduce a LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY flag.
Adrian Prantl [Thu, 30 Jun 2016 01:46:49 +0000 (01:46 +0000)]
[CMake] Introduce a LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY flag.

On Darwin it is currently impossible to build LLVM with modules
because the Darwin system module map is not compatible with
-fmodules-local-submodule-visibility at this point in time.  This
patch makes the flag optional and off by default on Darwin so it
becomes possible to build LLVM with modules again.

http://reviews.llvm.org/D21827
rdar://problem/27019000

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

8 years agoRegisterScavenging: Code cleanup; NFC
Matthias Braun [Thu, 30 Jun 2016 00:23:54 +0000 (00:23 +0000)]
RegisterScavenging: Code cleanup; NFC

- Use range based for loops
- No need for some !Reg checks: isPhysicalRegister() reports false for
  NoRegister anyway
- Do not repeat function name in documentation comment.
- Do not repeat documentation comment in implementation when we already
  have one at the declaration.
- Factor some common subexpressions out.
- Change file comments to use doxygen syntax.

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

8 years agoCodeGen: Add an explicit BuildMI overload for MachineInstr&
Duncan P. N. Exon Smith [Thu, 30 Jun 2016 00:10:17 +0000 (00:10 +0000)]
CodeGen: Add an explicit BuildMI overload for MachineInstr&

Add an explicit overload to BuildMI for MachineInstr& to deal with
insertions inside of instruction bundles.

- Use it to re-implement MachineInstr* to give it coverage.

- Document how the overload for MachineBasicBlock::instr_iterator
  differs from that for MachineBasicBlock::iterator (the previous
  (implicit) overload for MachineInstr&).

- Add a comment explaining why the MachineInstr& and MachineInstr*
  overloads don't universally forward to the
  MachineBasicBlock::instr_iterator overload.

Thanks to Justin for noticing the API quirk.  While this doesn't fix any
known bugs -- all uses of BuildMI with a MachineInstr& were previously
using MachineBasicBlock::iterator -- it protects against future bugs.

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

8 years agoadd vector tests to show missing transform
Sanjay Patel [Thu, 30 Jun 2016 00:09:13 +0000 (00:09 +0000)]
add vector tests to show missing transform

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

8 years ago[SystemZ] Split up PerformDAGCombine. [NFC]
Marcin Koscielnicki [Thu, 30 Jun 2016 00:08:54 +0000 (00:08 +0000)]
[SystemZ] Split up PerformDAGCombine. [NFC]

This function is already a bit too long, and I'm about to make it worse.

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

8 years agoCodeGen: Use MachineInstr& in TargetInstrInfo, NFC
Duncan P. N. Exon Smith [Thu, 30 Jun 2016 00:01:54 +0000 (00:01 +0000)]
CodeGen: Use MachineInstr& in TargetInstrInfo, NFC

This is mostly a mechanical change to make TargetInstrInfo API take
MachineInstr& (instead of MachineInstr* or MachineBasicBlock::iterator)
when the argument is expected to be a valid MachineInstr.  This is a
general API improvement.

Although it would be possible to do this one function at a time, that
would demand a quadratic amount of churn since many of these functions
call each other.  Instead I've done everything as a block and just
updated what was necessary.

This is mostly mechanical fixes: adding and removing `*` and `&`
operators.  The only non-mechanical change is to split
ARMBaseInstrInfo::getOperandLatencyImpl out from
ARMBaseInstrInfo::getOperandLatency.  Previously, the latter took a
`MachineInstr*` which it updated to the instruction bundle leader; now,
the latter calls the former either with the same `MachineInstr&` or the
bundle leader.

As a side effect, this removes a bunch of MachineInstr* to
MachineBasicBlock::iterator implicit conversions, a necessary step
toward fixing PR26753.

Note: I updated WebAssembly, Lanai, and AVR (despite being
off-by-default) since it turned out to be easy.  I couldn't run tests
for AVR since llc doesn't link with it turned on.

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

8 years agoregenerate checks
Sanjay Patel [Wed, 29 Jun 2016 23:58:39 +0000 (23:58 +0000)]
regenerate checks

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

8 years agoPrologEpilogInserter: Some code cleanup; NFC
Matthias Braun [Wed, 29 Jun 2016 23:54:42 +0000 (23:54 +0000)]
PrologEpilogInserter: Some code cleanup; NFC

- Use range based for
- Use the more common variable names MBB and MF for
  MachineBasicBlock/MachineFunction variables.
- Add a few const modifiers

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

8 years agoAdd move constructor and move assignment to fix MSVC build.
Peter Collingbourne [Wed, 29 Jun 2016 23:54:10 +0000 (23:54 +0000)]
Add move constructor and move assignment to fix MSVC build.

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

8 years agoObject: Replace NewArchiveIterator with a simpler NewArchiveMember class. NFCI.
Peter Collingbourne [Wed, 29 Jun 2016 22:27:42 +0000 (22:27 +0000)]
Object: Replace NewArchiveIterator with a simpler NewArchiveMember class. NFCI.

The NewArchiveIterator class has a problem: it requires too much context. Any
memory buffers added to the archive must be stored within an Archive::Member,
which must have an associated Archive. This makes it harder than necessary
to create new archive members (or new archives entirely) from scratch using
memory buffers.

This patch replaces NewArchiveIterator with a NewArchiveMember class that
stores just the memory buffer and the information that goes into the archive
member header.

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

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

8 years ago[LV] Improve accuracy and formatting of function comment
Adam Nemet [Wed, 29 Jun 2016 22:04:10 +0000 (22:04 +0000)]
[LV] Improve accuracy and formatting of function comment

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

8 years ago[LLVMConfig.cmake] LLVM_CONFIG_EXPORTED_TARGETS => LLVM_EXPORTED_TARGETS.
Michael Gottesman [Wed, 29 Jun 2016 21:58:15 +0000 (21:58 +0000)]
[LLVMConfig.cmake] LLVM_CONFIG_EXPORTED_TARGETS => LLVM_EXPORTED_TARGETS.

This matches more closely the rest of the variables in LLVMConfig.cmake which
shed the _CONFIG_ part of their names.

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

8 years ago[llvm-cov] Use relative paths to file reports in -output-dir mode
Vedant Kumar [Wed, 29 Jun 2016 21:55:46 +0000 (21:55 +0000)]
[llvm-cov] Use relative paths to file reports in -output-dir mode

This makes it possible to e.g copy a report to another filesystem.

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

8 years agoResubmit "Update llvm command line parser to support subcommands."
Zachary Turner [Wed, 29 Jun 2016 21:48:26 +0000 (21:48 +0000)]
Resubmit "Update llvm command line parser to support subcommands."

This fixes an issue where occurrence counts would be unexpectedly
reset when parsing different parts of a command line multiple
times.

**ORIGINAL COMMIT MESSAGE**

This allows command line tools to use syntaxes like the following:

      llvm-foo.exe command1 -o1 -o2
      llvm-foo.exe command2 -p1 -p2

Where command1 and command2 contain completely different sets of
valid options.  This is backwards compatible with previous uses
of llvm cl which did not support subcommands, as any option
which specifies no optional subcommand (e.g. all existing
code) goes into a special "top level" subcommand that expects
dashed options to appear immediately after the program name.
For example, code which is subcommand unaware would generate
a command line such as the following, where no subcommand
is specified:

      llvm-foo.exe -q1 -q2

The top level subcommand can co-exist with actual subcommands,
as it is implemented as an actual subcommand which is searched
if no explicit subcommand is specified.  So llvm-foo.exe as
specified above could be written so as to support all three
aforementioned command lines simultaneously.

There is one additional "special" subcommand called AllSubCommands,
which can be used to inject an option into every subcommand.
This is useful to support things like help, so that commands
such as:

      llvm-foo.exe --help
      llvm-foo.exe command1 --help
      llvm-foo.exe command2 --help

All work and display the help for the selected subcommand
without having to explicitly go and write code to handle each
one separately.

This patch is submitted without an example of anything actually
using subcommands, but a followup patch will convert the
llvm-pdbdump tool to use subcommands.

Reviewed By: beanz

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

9 years agoRevert r273313 "[NVPTX] Improve lowering of byval args of device functions."
Artem Belevich [Wed, 29 Jun 2016 20:51:15 +0000 (20:51 +0000)]
Revert r273313 "[NVPTX] Improve lowering of byval args of device functions."

The change causes llvm crash in some unoptimized builds.

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

9 years agoStackColoring for SafeStack.
Evgeniy Stepanov [Wed, 29 Jun 2016 20:37:43 +0000 (20:37 +0000)]
StackColoring for SafeStack.

This is a fix for PR27842.

An IR-level implementation of stack coloring tailored to work with
SafeStack. It is a bit weaker than the MI implementation in that it
does not the "lifetime start at first access" logic. This can be
improved in the future.

This patch also replaces the naive implementation of stack frame
layout with a greedy algorithm that can split existing stack slots
and even fit small objects inside the alignment padding of other
objects.

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

9 years agoChange Archive::create() from ErrorOr<...> to Expected<...> and update
Kevin Enderby [Wed, 29 Jun 2016 20:35:44 +0000 (20:35 +0000)]
Change Archive::create() from ErrorOr<...> to Expected<...> and update
its clients.

This commit will break the next lld builds.  I’ll be committing the matching
change for lld next.

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

9 years ago[InstCombine] Simplify and correct folding fcmps with the same children
Tim Shen [Wed, 29 Jun 2016 20:10:17 +0000 (20:10 +0000)]
[InstCombine] Simplify and correct folding fcmps with the same children

Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.

Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.

Reviewers: spatel

Subscribers: llvm-commits, iteratee, echristo

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

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

9 years ago[InstCombine, NFC] Change the generated variable names by creating new instructions
Tim Shen [Wed, 29 Jun 2016 20:10:13 +0000 (20:10 +0000)]
[InstCombine, NFC] Change the generated variable names by creating new instructions

This removes some noise for D21775's test changes.

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

9 years ago[Triple] Reimplement isLittleEndian(). Now it works for arm too.
Davide Italiano [Wed, 29 Jun 2016 20:01:39 +0000 (20:01 +0000)]
[Triple] Reimplement isLittleEndian(). Now it works for arm too.

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

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

9 years agoPermit memory operands in ins/outs instructions
Nirav Dave [Wed, 29 Jun 2016 19:54:27 +0000 (19:54 +0000)]
Permit memory operands in ins/outs instructions

[x86] (PR15455) While (ins|outs)[bwld] instructions do not take %dx as a
memory operand, various unofficial references do and objdump
disassembles to this format. Extend special treatment of
similar (in|out)[bwld] operations.

Reviewers: craig.topper, rnk, ab

Subscribers: llvm-commits

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

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

9 years agoDon't verify inputs to the Linker if ODR merging.
Rafael Espindola [Wed, 29 Jun 2016 18:31:48 +0000 (18:31 +0000)]
Don't verify inputs to the Linker if ODR merging.

This fixes pr28072.

The point, as Duncan pointed out, is that the file is already
partially linked by just reading it.

Long term I think the solution is to make metadata owned by the module
and then the linker will lazily read it and be in charge of all the
linking. Running a verifier in each input will defeat the lazy
loading, but will be legal.

Right now we are at the unfortunate position that to support odr
merging we cannot verify the inputs, which mildly annoying (see test
update).

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

9 years ago[InstCombine] Add full tests for FoldAndOfFCmps and FoldOrOfFCmps
Tim Shen [Wed, 29 Jun 2016 17:55:11 +0000 (17:55 +0000)]
[InstCombine] Add full tests for FoldAndOfFCmps and FoldOrOfFCmps

Summary: This adds tests for covering all cases that FoldAndOfFCmps and FoldOrOfFCmps handle.

Reviewers: spatel

Subscribers: llvm-commits

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

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

9 years ago[llvm-cov] Change some FileCheck prefixes to make tests reusable (NFC)
Vedant Kumar [Wed, 29 Jun 2016 17:47:08 +0000 (17:47 +0000)]
[llvm-cov] Change some FileCheck prefixes to make tests reusable (NFC)

I'm planning on extending these two tests with checks that validate
html coverage reports. Make it easier to extend them by not using a
prefix called "CHECK".

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

9 years agoAdd a regression test for PR28348.
Nico Weber [Wed, 29 Jun 2016 17:34:31 +0000 (17:34 +0000)]
Add a regression test for PR28348.

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

9 years agoRevert r272251, it caused PR28348.
Nico Weber [Wed, 29 Jun 2016 17:33:41 +0000 (17:33 +0000)]
Revert r272251, it caused PR28348.

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

9 years ago[LLVMConfig.cmake.in] Create a new variable LLVM_CONFIG_EXPORTED_TARGETS that contain...
Michael Gottesman [Wed, 29 Jun 2016 17:32:37 +0000 (17:32 +0000)]
[LLVMConfig.cmake.in] Create a new variable LLVM_CONFIG_EXPORTED_TARGETS that contains the list of all targets exported via LLVMExports.cmake.

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

9 years agoUse LLVM_ATTRIBUTE_UNUSED instead of void casts; NFC
Vedant Kumar [Wed, 29 Jun 2016 16:56:46 +0000 (16:56 +0000)]
Use LLVM_ATTRIBUTE_UNUSED instead of void casts; NFC

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

9 years ago[X86] Lower blended PACKUSes using appropriate types.
Ahmed Bougacha [Wed, 29 Jun 2016 16:56:09 +0000 (16:56 +0000)]
[X86] Lower blended PACKUSes using appropriate types.

When lowering two blended PACKUS, we used to disregard the types
of the PACKUS inputs, indiscriminately generating a v16i8 PACKUS.

This leads to non-selectable things like:
    (v16i8 (PACKUS (v4i32 v0), (v4i32 v1)))

Instead, check that the PACKUSes have the same type, and use that
as the final result type.

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

9 years ago[llvm-cov] Disable PGO name compression in a test file
Vedant Kumar [Wed, 29 Jun 2016 16:34:57 +0000 (16:34 +0000)]
[llvm-cov] Disable PGO name compression in a test file

Some bots do not configure llvm with zlib enabled. Should fix:

http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/15571

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

9 years agoFix a typo; NFC
Vedant Kumar [Wed, 29 Jun 2016 16:23:34 +0000 (16:23 +0000)]
Fix a typo; NFC

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

9 years ago[llvm-cov] Do not allow ".." to escape the coverage sub-directory
Vedant Kumar [Wed, 29 Jun 2016 16:22:12 +0000 (16:22 +0000)]
[llvm-cov] Do not allow ".." to escape the coverage sub-directory

In -output-dir mode, file reports are placed into a "coverage"
directory. If filenames in the coverage mapping contain "..", they might
escape out of this directory.

Fix the problem by removing ".." from source filenames (expand the path
component).

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

9 years ago[ManagedStatic] Reimplement double-checked locking with std::atomic.
Benjamin Kramer [Wed, 29 Jun 2016 15:04:07 +0000 (15:04 +0000)]
[ManagedStatic] Reimplement double-checked locking with std::atomic.

This gets rid of the memory fence in the hot path (dereferencing the
ManagedStatic), trading for an extra mutex lock in the cold path (when
the ManagedStatic was uninitialized). Since this only happens on the
first accesses it shouldn't matter much. On strict architectures like
x86 this removes any atomic instructions from the hot path.

Also remove the tsan annotations, tsan knows how standard atomics work
so they should be unnecessary now.

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

9 years agoDrop support for creating $stubs.
Rafael Espindola [Wed, 29 Jun 2016 14:59:50 +0000 (14:59 +0000)]
Drop support for creating $stubs.

They are created by ld64 since OS X 10.5.

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

9 years agoUpdate tests to use at least darwin9.
Rafael Espindola [Wed, 29 Jun 2016 14:51:10 +0000 (14:51 +0000)]
Update tests to use at least darwin9.

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

9 years ago[Docs][CodeGenerator] Don't specify the number of operands in BuildMI
Krzysztof Parzyszek [Wed, 29 Jun 2016 14:14:59 +0000 (14:14 +0000)]
[Docs][CodeGenerator] Don't specify the number of operands in BuildMI

Patch by Visoiu Mistrih Francis.

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

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

9 years ago[X86][SSE2] Added _mm_loadu_si64 test to match llvm\tools\clang\test\CodeGen\sse2...
Simon Pilgrim [Wed, 29 Jun 2016 14:05:33 +0000 (14:05 +0000)]
[X86][SSE2] Added _mm_loadu_si64 test to match llvm\tools\clang\test\CodeGen\sse2-builtins.c

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

9 years ago[X86] Regenerated popcnt combine tests
Simon Pilgrim [Wed, 29 Jun 2016 13:54:03 +0000 (13:54 +0000)]
[X86] Regenerated popcnt combine tests

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

9 years agoReverted patch 273864
Elena Demikhovsky [Wed, 29 Jun 2016 10:01:06 +0000 (10:01 +0000)]
Reverted patch 273864

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

9 years ago[SystemZ] Add floating-point test data class instructions.
Marcin Koscielnicki [Wed, 29 Jun 2016 07:29:07 +0000 (07:29 +0000)]
[SystemZ] Add floating-point test data class instructions.

These are not used by CodeGen yet - ISD combiners creating the new node
will come in subsequent patches.

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

9 years agoRevert "[Coverage] Move logic to encode filenames and mappings into llvm (NFC)"
Vedant Kumar [Wed, 29 Jun 2016 05:33:26 +0000 (05:33 +0000)]
Revert "[Coverage] Move logic to encode filenames and mappings into llvm (NFC)"

This reverts commit 520a8298d8ef676b5da617ba3d2c7fa37381e939 (r273055).

This is breaking stage2 instrumented builds with "malformed coverage
data" errors.

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

9 years agoRevert "[Coverage] Clarify ownership of a MemoryBuffer in the reader (NFC)"
Vedant Kumar [Wed, 29 Jun 2016 05:33:24 +0000 (05:33 +0000)]
Revert "[Coverage] Clarify ownership of a MemoryBuffer in the reader (NFC)"

This reverts commit 1037ef2574adde2103ad221d63834c3e1df4a776.

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

9 years agoRevert "[ValueTracking] Teach computeKnownBits for PHI nodes to compute sign bit...
Craig Topper [Wed, 29 Jun 2016 04:57:00 +0000 (04:57 +0000)]
Revert "[ValueTracking] Teach computeKnownBits for PHI nodes to compute sign bit for a recurrence with a NSW addition."

This is breaking an optimizaton remark test in clang. I've identified a couple fixes for that, but want to understand it better before I commit to anything.

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

9 years ago[Diag] Add getter shouldAlwaysPrint. NFC
Adam Nemet [Wed, 29 Jun 2016 04:55:19 +0000 (04:55 +0000)]
[Diag] Add getter shouldAlwaysPrint. NFC

For the new hotness attribute, the API will take the pass rather than
the pass name so we can no longer play the trick of AlwaysPrint being a
special pass name. This adds a getter to help the transition.

There is also a corresponding clang patch.

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

9 years ago[ValueTracking] Teach computeKnownBits for PHI nodes to compute sign bit for a recurr...
Craig Topper [Wed, 29 Jun 2016 03:46:47 +0000 (03:46 +0000)]
[ValueTracking] Teach computeKnownBits for PHI nodes to compute sign bit for a recurrence with a NSW addition.

If a operation for a recurrence is an addition with no signed wrap and both input sign bits are 0, then the result sign bit must also be 0. Similar for the negative case.

I found this deficiency while playing around with a loop in the x86 backend that contained a signed division that could be optimized into an unsigned division if we could prove both inputs were positive. One of them being the loop induction variable. With this patch we can perform the conversion for this case. One of the test cases here is a contrived variation of the loop I was looking at.

Differential revision: http://reviews.llvm.org/D21493

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

9 years ago[DAGCombine] Teach DAG combine to handle ORs of shuffles involving zero vectors where...
Craig Topper [Wed, 29 Jun 2016 03:29:12 +0000 (03:29 +0000)]
[DAGCombine] Teach DAG combine to handle ORs of shuffles involving zero vectors where the zero vector is the first operand to the shuffle instead of the second.

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

9 years ago[DAGCombine] Add test cases to show that DAG combining an OR of two shuffles with...
Craig Topper [Wed, 29 Jun 2016 03:29:09 +0000 (03:29 +0000)]
[DAGCombine] Add test cases to show that DAG combining an OR of two shuffles with zero vectors doesn't work if the zero vector is the first operand of the shuffle. Fix coming in a follow up patch.

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

9 years ago[CodeGen] Make ShuffleVectorSDNode::commuteMask take a MutableArrayRef instead of...
Craig Topper [Wed, 29 Jun 2016 03:29:06 +0000 (03:29 +0000)]
[CodeGen] Make ShuffleVectorSDNode::commuteMask take a MutableArrayRef instead of SmallVectorImpl. NFC.

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

9 years agoRevert "[InstCombine] Avoid combining the bitcast of a var that is used as both addre...
Eric Christopher [Wed, 29 Jun 2016 03:05:58 +0000 (03:05 +0000)]
Revert "[InstCombine] Avoid combining the bitcast of a var that is used as both address and result of load instructions"
Revert "[InstCombine] Combine A->B->A BitCast"

as this appears to cause PR27996 and as discussed in http://reviews.llvm.org/D20847

This reverts commits r270135 and r263734.

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

9 years ago[bugpoint] Delete a stale comment.
Philip Reames [Wed, 29 Jun 2016 03:02:01 +0000 (03:02 +0000)]
[bugpoint] Delete a stale comment.

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