oota-llvm.git
10 years agoDon't let x86 asm printer use the no operand movsd alias. It should use the normal...
Craig Topper [Tue, 23 Jul 2013 01:21:36 +0000 (01:21 +0000)]
Don't let x86 asm printer use the no operand movsd alias. It should use the normal movsl instead.

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

10 years agoAdd aliases to map 'imm, mem' form of x86 bts/btr/btc without a size suffix to their...
Craig Topper [Tue, 23 Jul 2013 00:56:15 +0000 (00:56 +0000)]
Add aliases to map 'imm, mem' form of x86 bts/btr/btc without a size suffix to their 32-bit forms.

This makes them consistent with 'bt' which already had this handling. gas has the same behavior. There have been discussions on the mailing list about determining size based on the immediate, but my goal here was just to remove the inconsistency.

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

10 years agoDebug Info Finder: use processDeclare and processValue to list debug info
Manman Ren [Tue, 23 Jul 2013 00:22:51 +0000 (00:22 +0000)]
Debug Info Finder: use processDeclare and processValue to list debug info
MDNodes used by DbgDeclareInst and DbgValueInst.

Another 16 testing cases failed and they are disabled with
-disable-debug-info-verifier.
A total of 34 cases are disabled with -disable-debug-info-verifier and will be
corrected.

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

10 years agoExplicitly don't let the asm printer use the clrb/w/l aliases for xor %reg, %reg.
Craig Topper [Tue, 23 Jul 2013 00:15:19 +0000 (00:15 +0000)]
Explicitly don't let the asm printer use the clrb/w/l aliases for xor %reg, %reg.

It only didn't use it before because it seems InstAlias handling in the asm printer fails to count tied operands so it tried to find an xor with 2 operands instead of the 3 it wfails to count tied.

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

10 years agoSuppress argumentless aliases for some x86 FP operations from being used by the asm...
Craig Topper [Tue, 23 Jul 2013 00:03:33 +0000 (00:03 +0000)]
Suppress argumentless aliases for some x86 FP operations from being used by the asm writer. Prefer to use the explicit %st(1) form.

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

10 years agoFix typo (ponted -> pointed)
Matt Arsenault [Mon, 22 Jul 2013 23:52:23 +0000 (23:52 +0000)]
Fix typo (ponted -> pointed)

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

10 years agoRemove extraneous null statement. No functionality change!
Nick Lewycky [Mon, 22 Jul 2013 23:38:27 +0000 (23:38 +0000)]
Remove extraneous null statement. No functionality change!

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

10 years agoUse switch instead of if. No functionality change.
Jakub Staszak [Mon, 22 Jul 2013 23:38:16 +0000 (23:38 +0000)]
Use switch instead of if. No functionality change.

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

10 years agoRemove trailing spaces.
Jakub Staszak [Mon, 22 Jul 2013 23:16:36 +0000 (23:16 +0000)]
Remove trailing spaces.

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

10 years agoAdd a simple unit test for MemoryBuffer::getOpenFile
Eli Bendersky [Mon, 22 Jul 2013 22:46:21 +0000 (22:46 +0000)]
Add a simple unit test for MemoryBuffer::getOpenFile

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

10 years agoTypo.
Eric Christopher [Mon, 22 Jul 2013 22:25:09 +0000 (22:25 +0000)]
Typo.

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

10 years ago80-column tidying. Formatting choices by clang-format.
Eric Christopher [Mon, 22 Jul 2013 22:25:07 +0000 (22:25 +0000)]
80-column tidying. Formatting choices by clang-format.

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

10 years agoWhen we vectorize across multiple basic blocks we may vectorize PHINodes that create...
Nadav Rotem [Mon, 22 Jul 2013 22:18:07 +0000 (22:18 +0000)]
When we vectorize across multiple basic blocks we may vectorize PHINodes that create a cycle. We already break the cycle on phi-nodes, but arithmetic operations are still uplicated. This patch adds code that checks if the operation that we are vectorizing was vectorized during the visit of the operands and uses this value if it can.

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

10 years agoOldPtr is llvm::Instruction. Remove unneeded cast<>.
Jakub Staszak [Mon, 22 Jul 2013 22:10:43 +0000 (22:10 +0000)]
OldPtr is llvm::Instruction. Remove unneeded cast<>.

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

10 years agoSilence gcc warning.
Richard Trieu [Mon, 22 Jul 2013 21:29:28 +0000 (21:29 +0000)]
Silence gcc warning.

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

10 years agoFix the move to/from accumulator register instructions that use a full 64-bit
Kevin Enderby [Mon, 22 Jul 2013 21:25:31 +0000 (21:25 +0000)]
Fix the move to/from accumulator register instructions that use a full 64-bit
absolute address encoded in the instruction.

rdar://8612627 and rdar://14299221

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

10 years agoChange tabs to spaces.
Jakub Staszak [Mon, 22 Jul 2013 21:11:30 +0000 (21:11 +0000)]
Change tabs to spaces.

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

10 years agoFix typo in test.
Jakub Staszak [Mon, 22 Jul 2013 21:10:42 +0000 (21:10 +0000)]
Fix typo in test.

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

10 years ago[stackprotector] Changed isNoopBitcast/sameNoopInput to take TargetLoweringBase inste...
Michael Gottesman [Mon, 22 Jul 2013 21:05:47 +0000 (21:05 +0000)]
[stackprotector] Changed isNoopBitcast/sameNoopInput to take TargetLoweringBase instead of TargetLowering.

Both functions only use functionality from TargetLoweringBase.

rdar://13935163

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

10 years agoRecommit r186813: More Intel syntax alias fixes. With the addition of suppressing...
Craig Topper [Mon, 22 Jul 2013 20:46:37 +0000 (20:46 +0000)]
Recommit r186813: More Intel syntax alias fixes. With the addition of suppressing some of the aliases from being emitted by the asm printer.

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

10 years ago[stackprotector] Refactored ssp prologue creation code into its own helper function.
Michael Gottesman [Mon, 22 Jul 2013 20:44:11 +0000 (20:44 +0000)]
[stackprotector] Refactored ssp prologue creation code into its own helper function.

No functionality change.

rdar://13935163

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

10 years agoDebug Info Finder: add processScope to actually handle the Scope.
Manman Ren [Mon, 22 Jul 2013 20:28:53 +0000 (20:28 +0000)]
Debug Info Finder: add processScope to actually handle the Scope.

Instead of just adding the scope to the list, we actually handle the scope.

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

10 years agoRecommit r186217 with testcase fix:
Bill Wendling [Mon, 22 Jul 2013 20:15:21 +0000 (20:15 +0000)]
Recommit r186217 with testcase fix:

 Use the function attributes to pass along the stack protector buffer size.

 Now that we have robust function attributes, don't use a command line option to
 specify the stack protecto buffer size.

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

10 years ago[mips] Fix MipsAsmParser::parseCCRRegs.
Akira Hatanaka [Mon, 22 Jul 2013 19:30:38 +0000 (19:30 +0000)]
[mips] Fix MipsAsmParser::parseCCRRegs.

Enable parsing all 32 floating point control registers $0-31 and stop trying to
parse floating point condition code register $fcc0. Also, return ParseFail if
the operand being parsed is not in the expected format.

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

10 years agoMark ELF's first symbol as format specific so that llvm-nm ignores it.
Rafael Espindola [Mon, 22 Jul 2013 19:24:34 +0000 (19:24 +0000)]
Mark ELF's first symbol as format specific so that llvm-nm ignores it.

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

10 years agoFix spelling and grammar
Matt Arsenault [Mon, 22 Jul 2013 18:59:58 +0000 (18:59 +0000)]
Fix spelling and grammar

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

10 years agoFix missing const
Matt Arsenault [Mon, 22 Jul 2013 18:58:53 +0000 (18:58 +0000)]
Fix missing const

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

10 years ago[mips] Use ADDu instead of OR to copy general purpose registers. Also, delete
Akira Hatanaka [Mon, 22 Jul 2013 18:52:22 +0000 (18:52 +0000)]
[mips] Use ADDu instead of OR to copy general purpose registers. Also, delete
the InstAlias pattern which maps "move" to OR to resolve ambiguity in
MatchTable.

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

10 years agoAdding example source to support MCJIT/Kaleidoscope blog posts.
Andrew Kaylor [Mon, 22 Jul 2013 18:47:24 +0000 (18:47 +0000)]
Adding example source to support MCJIT/Kaleidoscope blog posts.

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

10 years agoInitialize/Register LTO passes to enable flags like -print-after=<lto-pass>
Shuxin Yang [Mon, 22 Jul 2013 18:40:34 +0000 (18:40 +0000)]
Initialize/Register LTO passes to enable flags like -print-after=<lto-pass>

There already have two "dead" functions, initialize{IPO|IPA}, defined for
similar purpose. I decide not to call these two functions for two reasons:
  o. they don't cover all LTO passes (which will soon be separated into IPO
     and post-IPO passes)
  o. We have not yet figured out the right passes and the ordering for IPO
     and post-IPO stages, meaning this change is only for the time being.

Since LTO passes are registered, we are now able to print IR before and
after particular point.

For OSX users:
--------------
  "...-Wl,-mllvm -Wl,-print-after=<pass-name>" will print IR after the
  specified pass.

For Other UNIX with GNU gold linker:
------------------------------------
  "-Wl,-plugin-opt=-print-after=<pass-name>" should work.
  (NOTE: no need for "-Wl,-mllvm")

  Strip "-Wl," if flags are fed directly to linker instead of clang/clang++.

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

10 years agoFix typo.
Eric Christopher [Mon, 22 Jul 2013 18:26:18 +0000 (18:26 +0000)]
Fix typo.

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

10 years agoFormatting.
Eric Christopher [Mon, 22 Jul 2013 18:26:15 +0000 (18:26 +0000)]
Formatting.

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

10 years agoMC: mayAffectControlFlow() handling for variadic instructions.
Jim Grosbach [Mon, 22 Jul 2013 17:45:55 +0000 (17:45 +0000)]
MC: mayAffectControlFlow() handling for variadic instructions.

Variadic MC instructions don't note whether the variable operands
are uses or defs, so mayAffectControlFlow() must conservatively
assume they are defs and return true if the PC is in the operand
list.

rdar://14488628

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

10 years agoFix an obvious typo in the loop vectorizer where the cost model uses the wrong variab...
Nadav Rotem [Mon, 22 Jul 2013 17:10:48 +0000 (17:10 +0000)]
Fix an obvious typo in the loop vectorizer where the cost model uses the wrong variable. The variable BlockCost is ignored.
We don't have tests for the effect of if-conversion loops because it requires a big test (that includes if-converted loops) and it is difficult to find and balance a loop to do the right thing.

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

10 years ago[NVPTX] Remove unused prototypes
Justin Holewinski [Mon, 22 Jul 2013 17:04:40 +0000 (17:04 +0000)]
[NVPTX] Remove unused prototypes

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

10 years agoOption parsing: allow aliases in groups
Hans Wennborg [Mon, 22 Jul 2013 16:18:13 +0000 (16:18 +0000)]
Option parsing: allow aliases in groups

Option aliases in option groups were previously disallowed by an assert.
As far as I can tell, there was no technical reason for this, and I would
like to be able to put cl.exe compatible options in their own group for Clang,
so let's change the assert.

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

10 years agoThis adds range checking for "ldr Rn, [pc, #imm]" Thumb
Mihai Popa [Mon, 22 Jul 2013 15:49:36 +0000 (15:49 +0000)]
This adds range checking for "ldr Rn, [pc, #imm]" Thumb
instructions. With this patch:

1. ldr.n is recognized as mnemonic for the short encoding
2. ldr.w is recognized as menmonic for the long encoding
3. ldr will map to either short or long encodings depending on the size of the offset

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

10 years agoReplace archive members in the old position.
Rafael Espindola [Mon, 22 Jul 2013 15:11:51 +0000 (15:11 +0000)]
Replace archive members in the old position.

This matches gnu archive behavior and since archive member order can change
which member is used, not changing the order on replacement looks like the
right thing to do.

This patch also refactors the logic for which archive member to keep and
whether to move it to a helper function (computeInsertAction). The
nesting in computeNewArchiveMembers was getting a bit confusing.

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

10 years agoDon't depend on a llvm-ar specific behavior.
Rafael Espindola [Mon, 22 Jul 2013 12:41:04 +0000 (12:41 +0000)]
Don't depend on a llvm-ar specific behavior.

GNU ar when not given the a or b modifiers replaces archive members in the
same location of the old ones. I am about to implement that in llvm-ar. For
now, just don't depend on the current llvm-ar behavior on this test.

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

10 years ago[NVPTX] Use approximate FP ops when unsafe-fp-math is used, and append
Justin Holewinski [Mon, 22 Jul 2013 12:18:04 +0000 (12:18 +0000)]
[NVPTX] Use approximate FP ops when unsafe-fp-math is used, and append
.ftz to instructions if the nvptx-f32ftz attribute is set to "true"

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

10 years agoRevert "More Intel syntax alias fixes."
Tim Northover [Mon, 22 Jul 2013 11:02:32 +0000 (11:02 +0000)]
Revert "More Intel syntax alias fixes."

This reverts commit r186813, which broke the bots.

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

10 years agoFix typo. Change %cl to CL in Intel pattern.
Craig Topper [Mon, 22 Jul 2013 10:07:26 +0000 (10:07 +0000)]
Fix typo. Change %cl to CL in Intel pattern.

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

10 years agoMore Intel syntax alias fixes.
Craig Topper [Mon, 22 Jul 2013 09:58:07 +0000 (09:58 +0000)]
More Intel syntax alias fixes.

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

10 years agoMore Intel syntax alias fixes.
Craig Topper [Mon, 22 Jul 2013 09:42:31 +0000 (09:42 +0000)]
More Intel syntax alias fixes.

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

10 years agoChange %xmm0 to XMM0 in Intel side of asm strings for PBLENDVB.
Craig Topper [Mon, 22 Jul 2013 09:22:49 +0000 (09:22 +0000)]
Change %xmm0 to XMM0 in Intel side of asm strings for PBLENDVB.

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

10 years agoAdd Intel variants to aliases for some FP instructions.
Craig Topper [Mon, 22 Jul 2013 09:18:43 +0000 (09:18 +0000)]
Add Intel variants to aliases for some FP instructions.

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

10 years agoARM: remove now unneeded custom Asm converters
Tim Northover [Mon, 22 Jul 2013 09:06:12 +0000 (09:06 +0000)]
ARM: remove now unneeded custom Asm converters

After Ulrich's r180677 (thanks!) TableGen is intelligent enough to
handle tied constraints involving complex operands properly, so
virtually all of the ARM custom converters are now unnecessary.

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

10 years agoReverse operands for Intel syntax form of 'bt' alias.
Craig Topper [Mon, 22 Jul 2013 07:47:51 +0000 (07:47 +0000)]
Reverse operands for Intel syntax form of 'bt' alias.

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

10 years agoDelete unused helper functions.
Nadav Rotem [Mon, 22 Jul 2013 05:19:22 +0000 (05:19 +0000)]
Delete unused helper functions.

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

10 years agoAdded missing - in the header of PrologEpilogInserter.h so that editors properly...
Michael Gottesman [Mon, 22 Jul 2013 00:52:55 +0000 (00:52 +0000)]
Added missing - in the header of PrologEpilogInserter.h so that editors properly realize it is a c++ header and not a c header.

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

10 years agoTreat nothrow forms of ::operator delete and ::operator delete[] as
Richard Smith [Sun, 21 Jul 2013 23:11:42 +0000 (23:11 +0000)]
Treat nothrow forms of ::operator delete and ::operator delete[] as
deallocation functions.

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

10 years agoHandle replacement into a position past the original member.
Rafael Espindola [Sun, 21 Jul 2013 12:58:07 +0000 (12:58 +0000)]
Handle replacement into a position past the original member.

We were incorrectly computing where to insert a member if it was replacing
a previous member that was before the insert point.

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

10 years agoRemove unused fields.
Rafael Espindola [Sun, 21 Jul 2013 12:42:16 +0000 (12:42 +0000)]
Remove unused fields.

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

10 years agomem2reg: Minor STL usage cleanup. No functionality change.
Benjamin Kramer [Sun, 21 Jul 2013 11:03:40 +0000 (11:03 +0000)]
mem2reg: Minor STL usage cleanup. No functionality change.

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

10 years agoMake the mem2reg interface use an ArrayRef as it keeps a copy of these
Chandler Carruth [Sun, 21 Jul 2013 08:37:58 +0000 (08:37 +0000)]
Make the mem2reg interface use an ArrayRef as it keeps a copy of these
to iterate over.

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

10 years agoMark that the _ftol2 function used by windows on x86 to handle fptoui modifies ECX.
Craig Topper [Sun, 21 Jul 2013 07:28:13 +0000 (07:28 +0000)]
Mark that the _ftol2 function used by windows on x86 to handle fptoui modifies ECX.

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

10 years agoRevert a part of r186420. Don't forbid multiple store chains that merge.
Nadav Rotem [Sun, 21 Jul 2013 06:12:57 +0000 (06:12 +0000)]
Revert a part of r186420. Don't forbid multiple store chains that merge.

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

10 years agoFix exception demo: Add mcjit to link component.
Logan Chien [Sun, 21 Jul 2013 03:46:55 +0000 (03:46 +0000)]
Fix exception demo: Add mcjit to link component.

Fix exception demo when we are building the examples with configure/make.
This commit updates the link components in the Makefile.

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

10 years agoHoist the rest of the logic for promoting single-store allocas into the
Chandler Carruth [Sun, 21 Jul 2013 01:52:33 +0000 (01:52 +0000)]
Hoist the rest of the logic for promoting single-store allocas into the
helper function. This leaves both trivial cases handled entirely in
helper functions and merely manages the list of allocas to process in
the run method.

The next step will be to handle all of the trivial promotion work prior
to even creating the core class and the subsequent simplifications that
enables.

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

10 years agoHoist the rest of the logic for fully promoting allocas with all uses in
Chandler Carruth [Sun, 21 Jul 2013 01:44:07 +0000 (01:44 +0000)]
Hoist the rest of the logic for fully promoting allocas with all uses in
a single block into the helper routine. This takes advantage of the fact
that we can directly replace uses prior to any store with undef to
simplify matters and unconditionally promote allocas only used within
one block.

I've removed the special handling for the case of no stores existing.
This has no semantic effect but might slow things down. I'll fix that in
a later patch when I refactor this entire thing to be easier to manage
the different cases.

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

10 years agoRemove a method made dead by the prior refactoring.
Chandler Carruth [Sun, 21 Jul 2013 00:01:34 +0000 (00:01 +0000)]
Remove a method made dead by the prior refactoring.

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

10 years agoHoist the two trivial promotion routines out of the big class that
Chandler Carruth [Sat, 20 Jul 2013 23:59:51 +0000 (23:59 +0000)]
Hoist the two trivial promotion routines out of the big class that
handles the general cases.

The hope is to refactor this so that we don't end up building the entire
class for the trivial cases. I also want to lift a lot of the early
pre-processing in the initial segment of run() into a separate routine,
and really none of it needs to happen inside the primary promotion
class.

These routines in particular used none of the actual state in the
promotion class, so they don't really make sense as members.

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

10 years agoHoist the AllocaInfo struct to the top of the file.
Chandler Carruth [Sat, 20 Jul 2013 23:39:26 +0000 (23:39 +0000)]
Hoist the AllocaInfo struct to the top of the file.

This struct is nicely independent of everything else, and we already
needed a foward declaration here. It's simpler to just define it
immediately.

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

10 years agoSink a typedef and comparator down to the function that actually uses them.
Chandler Carruth [Sat, 20 Jul 2013 23:36:19 +0000 (23:36 +0000)]
Sink a typedef and comparator down to the function that actually uses them.

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

10 years agoDon't crash when llvm.compiler.used becomes empty.
Rafael Espindola [Sat, 20 Jul 2013 23:33:15 +0000 (23:33 +0000)]
Don't crash when llvm.compiler.used becomes empty.

GlobalOpt simplifies llvm.compiler.used by removing any members that are also
in the more strict llvm.used. Handle the special case where llvm.compiler.used
becomes empty.

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

10 years agoDon't allocate the DIBuilder on the heap and remove all the complexity
Chandler Carruth [Sat, 20 Jul 2013 23:33:06 +0000 (23:33 +0000)]
Don't allocate the DIBuilder on the heap and remove all the complexity
that ensued from that.

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

10 years agoRename constructor parameters to follow the common member-shadowing
Chandler Carruth [Sat, 20 Jul 2013 23:23:47 +0000 (23:23 +0000)]
Rename constructor parameters to follow the common member-shadowing
pattern and conform to the naming conventions.

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

10 years agoReformat the implementation of mem2reg with clang-format so that my
Chandler Carruth [Sat, 20 Jul 2013 23:20:08 +0000 (23:20 +0000)]
Reformat the implementation of mem2reg with clang-format so that my
subsequent changes don't introduce inconsistencies.

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

10 years agoComment: try to clarify loop iteration order.
Andrew Trick [Sat, 20 Jul 2013 23:10:31 +0000 (23:10 +0000)]
Comment: try to clarify loop iteration order.

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

10 years agoRemove a DenseMapInfo specialization for std::pair -- we have one of
Chandler Carruth [Sat, 20 Jul 2013 23:09:05 +0000 (23:09 +0000)]
Remove a DenseMapInfo specialization for std::pair -- we have one of
those baked into DenseMap now.

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

10 years agoUpdate mem2reg's comments to conform to the new doxygen standards. No
Chandler Carruth [Sat, 20 Jul 2013 22:20:05 +0000 (22:20 +0000)]
Update mem2reg's comments to conform to the new doxygen standards. No
functionality changed.

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

10 years agoDisallow global aliases to bitcast between address spaces
Matt Arsenault [Sat, 20 Jul 2013 17:46:05 +0000 (17:46 +0000)]
Disallow global aliases to bitcast between address spaces

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

10 years agoRemove trailing whitespace, fix file path in comment
Matt Arsenault [Sat, 20 Jul 2013 17:46:00 +0000 (17:46 +0000)]
Remove trailing whitespace, fix file path in comment

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

10 years agoSROA: Microoptimization: Remove dead entries first, then sort.
Benjamin Kramer [Sat, 20 Jul 2013 08:38:34 +0000 (08:38 +0000)]
SROA: Microoptimization: Remove dead entries first, then sort.

While there replace an explicit struct with std::mem_fun.

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

10 years agoInstCombine: call FoldOpIntoSelect for all floating binops, not just fmul
Stephen Lin [Sat, 20 Jul 2013 07:13:13 +0000 (07:13 +0000)]
InstCombine: call FoldOpIntoSelect for all floating binops, not just fmul

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

10 years agoHave InlineCost check constant fcmps
Matt Arsenault [Sat, 20 Jul 2013 04:09:00 +0000 (04:09 +0000)]
Have InlineCost check constant fcmps

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

10 years agoAdd Option unit tests to the make build
Hans Wennborg [Sat, 20 Jul 2013 03:04:36 +0000 (03:04 +0000)]
Add Option unit tests to the make build

Previously, they were only built and run in the CMake build.

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

10 years agoDebug Info Verifier: simplify DIxxx::Verify
Manman Ren [Sat, 20 Jul 2013 00:38:46 +0000 (00:38 +0000)]
Debug Info Verifier: simplify DIxxx::Verify

Simplify DIxxx:Verify to not call Verify on an operand. Instead, we use
DebugInfoFinder to list all MDNodes that should be a DIScope and all MDNodes
that should be a DIType and we will call Verify on those lists.

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

10 years agoFix size_t -> uint warnings with MSVC 64-bit build
Matt Arsenault [Sat, 20 Jul 2013 00:20:10 +0000 (00:20 +0000)]
Fix size_t -> uint warnings with MSVC 64-bit build

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

10 years agoRefactor AnalyzeBranch on ARM. The previous version did not always analyze
Lang Hames [Fri, 19 Jul 2013 23:52:47 +0000 (23:52 +0000)]
Refactor AnalyzeBranch on ARM. The previous version did not always analyze
indirect branches correctly. Under some circumstances, this led to the deletion
of basic blocks that were the destination of indirect branches. In that case it
left indirect branches to nowhere in the code.

This patch replaces, and is more general than either of the previous fixes for
indirect-branch-analysis issues, r181161 and r186461.

For other branches (not indirect) this refactor should have *almost* identical
behavior to the previous version. There are some corner cases where this
refactor is able to analyze blocks that the previous version could not (e.g.
this necessitated the update to thumb2-ifcvt2.ll).

<rdar://problem/14464830>

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

10 years agoRetry submitting r186623: COFFDumper: Dump data directory entries.
Rui Ueyama [Fri, 19 Jul 2013 23:23:29 +0000 (23:23 +0000)]
Retry submitting r186623: COFFDumper: Dump data directory entries.

The original change was rolled back in r186627 because of test
failures on the big endian machine. I believe I fixed the issue
so re-submitting.

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

10 years agofix an 80-col line.
Nadav Rotem [Fri, 19 Jul 2013 23:14:01 +0000 (23:14 +0000)]
fix an 80-col line.

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

10 years agoUse LLVMs ADTs that improve the compile time of this pass.
Nadav Rotem [Fri, 19 Jul 2013 23:12:19 +0000 (23:12 +0000)]
Use LLVMs ADTs that improve the compile time of this pass.

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

10 years agoSLPVectorizer: Improve the compile time of isConsecutive by reordering the conditions...
Nadav Rotem [Fri, 19 Jul 2013 23:11:15 +0000 (23:11 +0000)]
SLPVectorizer: Improve the compile time of isConsecutive by reordering the conditions that check GEPs and eliminate two of the calls to accumulateConstantOffset.

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

10 years agoR600: Don't emit empty then clause and use alu_pop_after
Vincent Lejeune [Fri, 19 Jul 2013 21:45:15 +0000 (21:45 +0000)]
R600: Don't emit empty then clause and use alu_pop_after

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

10 years agoR600: Simplify AMDILCFGStructurize by removing templates and assuming single exit
Vincent Lejeune [Fri, 19 Jul 2013 21:45:06 +0000 (21:45 +0000)]
R600: Simplify AMDILCFGStructurize by removing templates and assuming single exit

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

10 years agoR600: Replace legacy debug code in AMDILCFGStructurizer.cpp
Vincent Lejeune [Fri, 19 Jul 2013 21:44:56 +0000 (21:44 +0000)]
R600: Replace legacy debug code in AMDILCFGStructurizer.cpp

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

10 years agoFix inserting new elements in a specified location.
Rafael Espindola [Fri, 19 Jul 2013 21:23:28 +0000 (21:23 +0000)]
Fix inserting new elements in a specified location.

We were only handling the 'a' and 'b' options during moves before.

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

10 years agos/compiler_used/compiler.used/.
Rafael Espindola [Fri, 19 Jul 2013 18:44:51 +0000 (18:44 +0000)]
s/compiler_used/compiler.used/.

We were incorrectly using compiler_used instead of compiler.used. Unfortunately
the passes using the broken name had tests also using the broken name.

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

10 years agoAdd some flag exclusion tests.
Reid Kleckner [Fri, 19 Jul 2013 18:05:13 +0000 (18:05 +0000)]
Add some flag exclusion tests.

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

10 years ago[Option] Add inclusion and exclusion flags to option parsing
Reid Kleckner [Fri, 19 Jul 2013 18:04:57 +0000 (18:04 +0000)]
[Option] Add inclusion and exclusion flags to option parsing

Summary:
This allows the clang driver to put MSVC compatible options in the same
enumerator space as its normal options but exclude them from normal
option parsing.

Also changes the standard ParseArgs() method to consider unknown
arguments with a leading slash as being inputs rather than flags.

High level discussion for clang-cl is here:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-June/030404.html

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1049

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

10 years agolit: Support cancellation on Windows
Nico Rieck [Fri, 19 Jul 2013 17:08:08 +0000 (17:08 +0000)]
lit: Support cancellation on Windows

The current machinery using KeyboardInterrupt for canceling doesn't work
with multiple threads on Windows as it just cancels the currently run tests
but the runners continue.

We install a handler for Ctrl-C which stops the provider from providing any
more tests to the runners. Together with aborting all currently running
tests, this brings lit to a halt.

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

10 years agoAdd a line that got missed off somehow. Sorry about that!
Joey Gouly [Fri, 19 Jul 2013 16:45:16 +0000 (16:45 +0000)]
Add a line that got missed off somehow. Sorry about that!

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

10 years ago[SystemZ] Add tests for ALHSIK and ALGHSIK
Richard Sandiford [Fri, 19 Jul 2013 16:44:32 +0000 (16:44 +0000)]
[SystemZ] Add tests for ALHSIK and ALGHSIK

The insn definitions themselves crept into r186689, sorry.
This should be the last of the distinct-ops instructions.

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

10 years ago[SystemZ] Add ALRK, AGLRK, SLRK and SGLRK
Richard Sandiford [Fri, 19 Jul 2013 16:37:00 +0000 (16:37 +0000)]
[SystemZ] Add ALRK, AGLRK, SLRK and SGLRK

Follows the same lines as r186686, but much more limited, since we only
use ADD LOGICAL for multi-i64 additions.

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

10 years ago[ARMv8] Implement the NEON instructions VRINT{N, X, A, Z, M, P}.
Joey Gouly [Fri, 19 Jul 2013 16:34:16 +0000 (16:34 +0000)]
[ARMv8] Implement the NEON instructions VRINT{N, X, A, Z, M, P}.

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

10 years ago[SystemZ] Add AHIK and AGHIK
Richard Sandiford [Fri, 19 Jul 2013 16:32:12 +0000 (16:32 +0000)]
[SystemZ] Add AHIK and AGHIK

I did these as a separate patch because it uses a slightly different
form of RIE layout.

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

10 years ago[SystemZ] Add ARK, AGRK, SRK and SGRK
Richard Sandiford [Fri, 19 Jul 2013 16:26:39 +0000 (16:26 +0000)]
[SystemZ] Add ARK, AGRK, SRK and SGRK

The testsuite changes follow the same lines as for r186683.

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

10 years ago[SystemZ] Add NGRK, OGRK and XGRK
Richard Sandiford [Fri, 19 Jul 2013 16:24:22 +0000 (16:24 +0000)]
[SystemZ] Add NGRK, OGRK and XGRK

Like r186683, but for 64 bits.

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

10 years agoInitialize TempFileHandle.
Serge Pavlov [Fri, 19 Jul 2013 16:23:54 +0000 (16:23 +0000)]
Initialize TempFileHandle.

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