oota-llvm.git
11 years agoUse FileCheck instead of grep.
Preston Gurd [Thu, 11 Apr 2013 21:39:01 +0000 (21:39 +0000)]
Use FileCheck instead of grep.

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

11 years agoFix undefined behavior in AArch64
David Majnemer [Thu, 11 Apr 2013 20:13:52 +0000 (20:13 +0000)]
Fix undefined behavior in AArch64

A64Imms::isLogicalImmBits and A64Imms::isLogicalImm will attempt to
execute shifts that perform undefined behavior. Instead of attempting
to perform the 64-bit rotation, treat it as a no-op.

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

11 years agoOptimize icmp involving addition better
David Majnemer [Thu, 11 Apr 2013 20:05:46 +0000 (20:05 +0000)]
Optimize icmp involving addition better

Allows LLVM to optimize sequences like the following:

%add = add nsw i32 %x, 1
%cmp = icmp sgt i32 %add, %y

into:

%cmp = icmp sge i32 %x, %y

as well as:

%add1 = add nsw i32 %x, 20
%add2 = add nsw i32 %y, 57
%cmp = icmp sge i32 %add1, %add2

into:

%add = add nsw i32 %y, 37
%cmp = icmp sle i32 %cmp, %x

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

11 years agoMips specific inline asm memory operand modifier test case
Jack Carter [Thu, 11 Apr 2013 19:39:19 +0000 (19:39 +0000)]
Mips specific inline asm memory operand modifier test case

These changes are based on commit responses for r179135.

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

11 years ago[mips] Custom-lower i64 MULHS and MULHU nodes. Remove the code which selects
Akira Hatanaka [Thu, 11 Apr 2013 19:29:26 +0000 (19:29 +0000)]
[mips] Custom-lower i64 MULHS and MULHU nodes. Remove the code which selects
multiply instructions in MipsSEDAGToDAGISel.

This patch was supposed to be part of r178403.

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

11 years ago[mips] Clean up MipsISelDAGToDAG.cpp and MipsISelLowering.cpp.
Akira Hatanaka [Thu, 11 Apr 2013 19:07:14 +0000 (19:07 +0000)]
[mips] Clean up MipsISelDAGToDAG.cpp and MipsISelLowering.cpp.

- Rename function.
- Pass iterator by value.
- Remove header include.

No functionality changes.

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

11 years agoRevert my last two commits while I debug what is wrong in a big endian host.
Rafael Espindola [Thu, 11 Apr 2013 17:46:10 +0000 (17:46 +0000)]
Revert my last two commits while I debug what is wrong in a big endian host.

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

11 years agoFix llvm-readobj tests on big endian hosts.
Rafael Espindola [Thu, 11 Apr 2013 17:23:23 +0000 (17:23 +0000)]
Fix llvm-readobj tests on big endian hosts.

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

11 years agoPrint more information about relocations.
Rafael Espindola [Thu, 11 Apr 2013 16:31:37 +0000 (16:31 +0000)]
Print more information about relocations.

With this patch llvm-readobj now prints if a relocation is pcrel, its length,
if it is extern and if it is scattered.

It also refactors the code a bit to use bit fields instead of shifts and
masks all over the place.

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

11 years agoFix for wrong instcombine on vector insert/extract
Benjamin Kramer [Thu, 11 Apr 2013 15:10:09 +0000 (15:10 +0000)]
Fix for wrong instcombine on vector insert/extract

When trying to collapse sequences of insertelement/extractelement
instructions into single shuffle instructions, there is one specific
case where the Instruction Combiner wrongly updates the resulting
Mask of shuffle indexes.

The problem is in function CollectShuffleElments.

If we have a sequence of insert/extract element instructions
like the one below:

  %tmp1 = extractelement <4 x float> %LHS, i32 0
  %tmp2 = insertelement <4 x float> %RHS, float %tmp1, i32 1
  %tmp3 = extractelement <4 x float> %RHS, i32 2
  %tmp4 = insertelement <4 x float> %tmp2, float %tmp3, i32 3

Where:
  . %RHS will have a mask of [4,5,6,7]
  . %LHS will have a mask of [0,1,2,3]

The Mask of shuffle indexes is wrongly computed to [4,1,6,7]
instead of [4,0,6,7].
When analyzing %tmp2 in order to compute the Mask for the
resulting shuffle instruction, the algorithm forgets to update
the mask index at position 1 with the index associated to the
element extracted from %LHS by instruction %tmp1.

Patch by Andrea DiBiagio!

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

11 years agoAdd a CHECK-NOT for a more faithful translation of the original grep | count 2.
Eli Bendersky [Thu, 11 Apr 2013 14:43:19 +0000 (14:43 +0000)]
Add a CHECK-NOT for a more faithful translation of the original grep | count 2.
Thanks to Reid Kleckner for catching this.

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

11 years agoAdd a function to check if an argument list is too long.
Rafael Espindola [Thu, 11 Apr 2013 14:06:34 +0000 (14:06 +0000)]
Add a function to check if an argument list is too long.

This will be used in clang to decide if it should create an @file or not. It
will be tested on the clang side.

Patch by Nathan Froyd.

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

11 years ago[ASan] Allow disabling init-order checks for globals by source file name.
Alexey Samsonov [Thu, 11 Apr 2013 13:20:00 +0000 (13:20 +0000)]
[ASan] Allow disabling init-order checks for globals by source file name.

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

11 years agoAdd myself in the CREDITS.TXT
Sylvestre Ledru [Thu, 11 Apr 2013 13:15:39 +0000 (13:15 +0000)]
Add myself in the CREDITS.TXT

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

11 years agoAdd missing colons to check lines.
Benjamin Kramer [Thu, 11 Apr 2013 12:41:41 +0000 (12:41 +0000)]
Add missing colons to check lines.

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

11 years agoFileCheckize a bunch of tests.
Benjamin Kramer [Thu, 11 Apr 2013 12:32:23 +0000 (12:32 +0000)]
FileCheckize a bunch of tests.

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

11 years agoAdd braces around || in && to pacify GCC.
Benjamin Kramer [Thu, 11 Apr 2013 11:57:01 +0000 (11:57 +0000)]
Add braces around || in && to pacify GCC.

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

11 years agoRename the C function to create a SLPVectorizerPass to something sane and expose...
Benjamin Kramer [Thu, 11 Apr 2013 11:36:36 +0000 (11:36 +0000)]
Rename the C function to create a SLPVectorizerPass to something sane and expose it in the header file.

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

11 years agoOptimize vector select from all 0s or all 1s
Michael Liao [Thu, 11 Apr 2013 05:15:54 +0000 (05:15 +0000)]
Optimize vector select from all 0s or all 1s

As packed comparisons in AVX/SSE produce all 0s or all 1s in each SIMD lane,
vector select could be simplified to AND/OR or removed if one or both values
being selected is all 0s or all 1s.

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

11 years agoAdd CLAC/STAC instruction encoding/decoding support
Michael Liao [Thu, 11 Apr 2013 04:52:28 +0000 (04:52 +0000)]
Add CLAC/STAC instruction encoding/decoding support

As these two instructions in AVX extension are privileged instructions for
special purpose, it's only expected to be used in inlined assembly.

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

11 years agoEnhance bool simplifcation in X86 to handle more cases
Michael Liao [Thu, 11 Apr 2013 04:43:09 +0000 (04:43 +0000)]
Enhance bool simplifcation in X86 to handle more cases

This patch is revised based on patch from Victor Umansky
<victor.umansky@intel.com>. More cases are handled in X86's bool
simplification, i.e.
- SETCC_CARRY
- value is truncated to i1 with AND

As a by-product, PR5443 is also fixed.

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

11 years agoR600ControlFlowFinalizer.cpp: Fix a warning. [-Wunused-variable]
NAKAMURA Takumi [Thu, 11 Apr 2013 04:16:27 +0000 (04:16 +0000)]
R600ControlFlowFinalizer.cpp: Fix a warning. [-Wunused-variable]

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

11 years agoWhitespace.
NAKAMURA Takumi [Thu, 11 Apr 2013 04:16:22 +0000 (04:16 +0000)]
Whitespace.

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

11 years agoSimplify the code. No functionality change.
Rafael Espindola [Thu, 11 Apr 2013 03:34:37 +0000 (03:34 +0000)]
Simplify the code. No functionality change.

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

11 years agoAdd MachO-x86-64 tests.
Rafael Espindola [Thu, 11 Apr 2013 02:52:29 +0000 (02:52 +0000)]
Add MachO-x86-64 tests.

The object was already checked in, but was not being tested.

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

11 years agoFix MachO's getRelocationAdditionalInfo.
Rafael Espindola [Thu, 11 Apr 2013 02:21:31 +0000 (02:21 +0000)]
Fix MachO's getRelocationAdditionalInfo.

It was returning the loaded address of the section containing the relocation,
which really doesn't seem to be the intent of this function.

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

11 years agoMake PPCInstrInfo::isPredicated always return false
Hal Finkel [Thu, 11 Apr 2013 01:23:34 +0000 (01:23 +0000)]
Make PPCInstrInfo::isPredicated always return false

Because of how predication in implemented on PPC (only for branches), I think
that this is the right thing to do.  No functionality change intended.

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

11 years agolit: Don't descend into .git directories during test discovery.
Daniel Dunbar [Thu, 11 Apr 2013 00:31:35 +0000 (00:31 +0000)]
lit: Don't descend into .git directories during test discovery.

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

11 years agolit: Shorten a metavar to make --help look nicer.
Daniel Dunbar [Thu, 11 Apr 2013 00:31:27 +0000 (00:31 +0000)]
lit: Shorten a metavar to make --help look nicer.

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

11 years agolit: Add a test for discovery when exact test names are given.
Daniel Dunbar [Thu, 11 Apr 2013 00:31:22 +0000 (00:31 +0000)]
lit: Add a test for discovery when exact test names are given.

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

11 years agoAdd man page for llvm-readobj
Nico Rieck [Thu, 11 Apr 2013 00:05:57 +0000 (00:05 +0000)]
Add man page for llvm-readobj

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

11 years agolit: Add a trivial test of the basic progress bar.
Daniel Dunbar [Thu, 11 Apr 2013 00:05:37 +0000 (00:05 +0000)]
lit: Add a trivial test of the basic progress bar.

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

11 years agoRewrite some of the test/CodeGen/X86 tests to use FileCheck instead of grep
Eli Bendersky [Wed, 10 Apr 2013 23:30:20 +0000 (23:30 +0000)]
Rewrite some of the test/CodeGen/X86 tests to use FileCheck instead of grep

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

11 years agoMC: Support COFF image-relative MCSymbolRefs
Nico Rieck [Wed, 10 Apr 2013 23:28:17 +0000 (23:28 +0000)]
MC: Support COFF image-relative MCSymbolRefs

Add support for the COFF relocation types IMAGE_REL_I386_DIR32NB and
IMAGE_REL_AMD64_ADDR32NB for 32- and 64-bit respectively. These are
similar to normal 4-byte relocations except that they do not include
the base address of the image.

Image-relative relocations are used for debug information (32-bit) and
SEH unwind tables (64-bit).

A new MCSymbolRef variant called 'VK_COFF_IMGREL32' is introduced to
specify such relocations. For AT&T assembly, this variant can be accessed
using the symbol suffix '@imgrel'.

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

11 years agoDelete the functions F1 and F2 to appease the valgrind bot.
Joey Gouly [Wed, 10 Apr 2013 23:21:26 +0000 (23:21 +0000)]
Delete the functions F1 and F2 to appease the valgrind bot.

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

11 years agoManually remove successors in if conversion when CopyAndPredicateBlock is used
Hal Finkel [Wed, 10 Apr 2013 22:05:25 +0000 (22:05 +0000)]
Manually remove successors in if conversion when CopyAndPredicateBlock is used

In the simple and triangle if-conversion cases, when CopyAndPredicateBlock is
used because the to-be-predicated block has other predecessors, we need to
explicitly remove the old copied block from the successors list. Normally if
conversion relies on TII->AnalyzeBranch combined with BB->CorrectExtraCFGEdges
to cleanup the successors list, but if the predicated block contained an
un-analyzable branch (such as a now-predicated return), then this will fail.

These extra successors were causing a problem on PPC because it was causing
later passes (such as PPCEarlyReturm) to leave dead return-only basic blocks in
the code.

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

11 years agoNo need to have this return a bool.
Bill Wendling [Wed, 10 Apr 2013 22:03:59 +0000 (22:03 +0000)]
No need to have this return a bool.

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

11 years agoMips specific inline asm memory operand modifier test case
Jack Carter [Wed, 10 Apr 2013 22:02:32 +0000 (22:02 +0000)]
Mips specific inline asm memory operand modifier test case

These changes are based on commit responses for r179135.

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

11 years agoMove info to CREDITS.TXT file.
Bill Wendling [Wed, 10 Apr 2013 21:56:52 +0000 (21:56 +0000)]
Move info to CREDITS.TXT file.

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

11 years agofixed xsave, xsaveopt, xrstor mnemonics with intel syntax; added test cases
Kay Tiong Khoo [Wed, 10 Apr 2013 21:52:25 +0000 (21:52 +0000)]
fixed xsave, xsaveopt, xrstor mnemonics with intel syntax; added test cases

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

11 years agoRevert "Update the version of dwarf we say we're emitting to at least 3."
Eric Christopher [Wed, 10 Apr 2013 21:45:07 +0000 (21:45 +0000)]
Revert "Update the version of dwarf we say we're emitting to at least 3."
temporarily while we work on plumbing through some changes to continue
supporting gdb on darwin.

This reverts commit r179122.

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

11 years agoTrack the compact unwind encoding for when we are unable to generate compact unwind...
Bill Wendling [Wed, 10 Apr 2013 21:42:06 +0000 (21:42 +0000)]
Track the compact unwind encoding for when we are unable to generate compact unwind information.

Compact unwind has an encoding for when we're not able to generate compact
unwind and must generate an EH frame instead. Track that, but still emit that CU
encoding.

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

11 years agofixed to disassemble with tab after mnemonic rather than space
Kay Tiong Khoo [Wed, 10 Apr 2013 21:17:58 +0000 (21:17 +0000)]
fixed to disassemble with tab after mnemonic rather than space

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

11 years agoUse a real union for IdentifyingPassPtr.
Benjamin Kramer [Wed, 10 Apr 2013 20:50:44 +0000 (20:50 +0000)]
Use a real union for IdentifyingPassPtr.

This avoids a nasty const correctness issue (AnalysisIDs are const, Pass* isn't).

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

11 years agoMarking myself as release manager.
Bill Wendling [Wed, 10 Apr 2013 20:13:28 +0000 (20:13 +0000)]
Marking myself as release manager.

If anyone objects please let me know.

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

11 years agoIn the X86 back end, getMemoryOperandNo() returns the offset
Preston Gurd [Wed, 10 Apr 2013 20:11:59 +0000 (20:11 +0000)]
In the X86 back end, getMemoryOperandNo() returns the offset
into the operand array of the start of the memory reference descriptor.

Additional code in EncodeInstruction provides an additional adjustment.

This patch places that additional code in a separate function,
called getOperandBias, so that any caller of getMemoryOperandNo
can also call getOperandBias.

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

11 years agoTidy up, fix and simplify a few of the SMLocs. Prior to r179109 the Start SMLoc
Chad Rosier [Wed, 10 Apr 2013 20:07:47 +0000 (20:07 +0000)]
Tidy up, fix and simplify a few of the SMLocs.  Prior to r179109 the Start SMLoc
wasn't always the start of the operand.  If there was a symbol reference, then
Start pointed to that token.  It's very likely there are other places that need
to be updated.

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

11 years agoAdd object-emission flag for lit tests. This flag is used
Jyotsna Verma [Wed, 10 Apr 2013 19:53:26 +0000 (19:53 +0000)]
Add object-emission flag for lit tests. This flag is used
to disable following tests for Hexagon that require direct object
generation support.

DebugInfo/dwarf-public-names.ll
DebugInfo/dwarf-version.ll
DebugInfo/member-pointers.ll
DebugInfo/namespace.ll
DebugInfo/two-cus-from-same-file.ll

Fixes bug 15616 - http://llvm.org/bugs/show_bug.cgi?id=15616

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

11 years agoMake the SLP store-merger less paranoid about function calls. We check for function...
Nadav Rotem [Wed, 10 Apr 2013 19:41:36 +0000 (19:41 +0000)]
Make the SLP store-merger less paranoid about function calls. We check for function calls when we check if it is safe to sink instructions.

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

11 years agoWe require DataLayout for analyzing the size of stores.
Nadav Rotem [Wed, 10 Apr 2013 18:57:27 +0000 (18:57 +0000)]
We require DataLayout for analyzing the size of stores.

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

11 years agoRemove unused variable.
Chad Rosier [Wed, 10 Apr 2013 18:46:58 +0000 (18:46 +0000)]
Remove unused variable.

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

11 years agoPPC: Don't predicate a diamond with two counter decrements
Hal Finkel [Wed, 10 Apr 2013 18:30:16 +0000 (18:30 +0000)]
PPC: Don't predicate a diamond with two counter decrements

I've not seen this happen in practice, and probably can't until we start
allowing decrement-counter-based conditional branches to be double predicated,
but just in case, don't allow predication of a diamond in which both sides have
ctr-defining branches. Even though the branching behavior of these can be
predicated, the counter-decrementing behavior cannot be.

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

11 years agoReapply r179115, but use parsePrimaryExpression a little more judiciously.
Chad Rosier [Wed, 10 Apr 2013 17:35:30 +0000 (17:35 +0000)]
Reapply r179115, but use parsePrimaryExpression a little more judiciously.
Test cases that regressed due to r179115, plus a few more, were added in
r179182.  Original commit message below:

[ms-inline asm] Use parsePrimaryExpr in lieu of parseExpression if we need to
parse an identifier.  Otherwise, parseExpression may parse multiple tokens,
which makes it impossible to properly compute an immediate displacement.
An example of such a case is the source operand (i.e., [Symbol + ImmDisp]) in
the below example:

 __asm mov eax, [Symbol + ImmDisp]

Part of rdar://13611297

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

11 years agoR600/SI: Add pattern for AMDGPUurecip
Michel Danzer [Wed, 10 Apr 2013 17:17:56 +0000 (17:17 +0000)]
R600/SI: Add pattern for AMDGPUurecip

21 more little piglits with radeonsi.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179186 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoThis is for an experimental option -mips-os16. The idea is to compile all
Reed Kotler [Wed, 10 Apr 2013 16:58:04 +0000 (16:58 +0000)]
This is for an experimental option -mips-os16. The idea is to compile all
Mips32 code as Mips16 unless it can't be compiled as Mips 16. For now this
would happen as long as floating point instructions are not needed.
Probably it would also make sense to compile as mips32 if atomic operations
are needed too. There may be other cases too.

A module pass prescans the IR and adds the mips16 or nomips16 attribute
to functions depending on the functions needs.

Mips 16 mode can result in a 40% code compression by utililizing 16 bit
encoding of many instructions.

The hope is for this to replace the traditional gcc way of dealing with
Mips16 code using floating point which involves essentially using soft float
but with a library implemented using mips32 floating point. This gcc
method also requires creating stubs so that Mips32 code can interact with
these Mips 16 functions that have floating point needs. My conjecture is
that in reality this traditional gcc method would never win over this
new method.

I will be implementing the traditional gcc method also. Some of it is already
done but I needed to do the stubs to finish the work and those required
this mips16/32 mixed mode capability.

I have more ideas for to make this new method much better and I think the old
method will just live in llvm for anyone that needs the backward compatibility
but I don't for what reason that would be needed.

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

11 years agoUse a scheme closer to that of GNU as when deciding the type of a
Peter Collingbourne [Wed, 10 Apr 2013 16:52:15 +0000 (16:52 +0000)]
Use a scheme closer to that of GNU as when deciding the type of a
symbol with multiple .type declarations.

Differential Revision: http://llvm-reviews.chandlerc.com/D607

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

11 years agoTemplate MachOObjectFile over endianness too.
Rafael Espindola [Wed, 10 Apr 2013 15:33:44 +0000 (15:33 +0000)]
Template MachOObjectFile over endianness too.

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

11 years agoSimplify the templating a bit.
Rafael Espindola [Wed, 10 Apr 2013 15:18:39 +0000 (15:18 +0000)]
Simplify the templating a bit.

Since we only ever instantiate with a type that is a MachOType instantiation,
we don't need to pass template argument.

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

11 years agoMove two methods out of line.
Rafael Espindola [Wed, 10 Apr 2013 14:57:48 +0000 (14:57 +0000)]
Move two methods out of line.

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

11 years agoR600: Add VTX_READ_* and RAT_WRITE_CACHELESS_* when computing cf addr
Vincent Lejeune [Wed, 10 Apr 2013 13:29:20 +0000 (13:29 +0000)]
R600: Add VTX_READ_* and RAT_WRITE_CACHELESS_* when computing cf addr

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

11 years ago[test] Use lit's shell test runner on Windows
Reid Kleckner [Wed, 10 Apr 2013 13:11:38 +0000 (13:11 +0000)]
[test] Use lit's shell test runner on Windows

Summary:
I did a local comparison between using bash and using lit's runner, and
more of the suite passes with lit than passes with bash.  Most of the
bash failures have to do with /dev/null, which is nonsensical on
Windows, but the lit runner handles it.

The lit shell runner is also much faster than bash, so I would expect
most Windows devs would want it by default.

The behavior can be overridden on any OS by setting
LIT_USE_INTERNAL_SHELL to 0 or 1 in the environment.

Reviewers: chapuni, ddunbar

CC: llvm-commits, timurrrr
Differential Revision: http://llvm-reviews.chandlerc.com/D559

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

11 years agoRevert "TMP"
Tim Northover [Wed, 10 Apr 2013 12:08:57 +0000 (12:08 +0000)]
Revert "TMP"

This reverts commit e652085eacbec62e4157d08d3f2f875e6e6d5bb4.

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

11 years agoARM: Make "SMC" instructions conditional on new TrustZone architecture feature.
Tim Northover [Wed, 10 Apr 2013 12:08:35 +0000 (12:08 +0000)]
ARM: Make "SMC" instructions conditional on new TrustZone architecture feature.

These instructions aren't universally available, but depend on a specific
extension to the normal ARM architecture (rather than, say, v6/v7/...) so a new
feature is appropriate.

This also enables the feature by default on A-class cores which usually have
these extensions, to avoid breaking existing code and act as a sensible
default.

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

11 years agoTMP
Tim Northover [Wed, 10 Apr 2013 12:08:25 +0000 (12:08 +0000)]
TMP

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

11 years agoChange CloneFunctionInto to always clone Argument attributes induvidually,
Joey Gouly [Wed, 10 Apr 2013 10:37:38 +0000 (10:37 +0000)]
Change CloneFunctionInto to always clone Argument attributes induvidually,
rather than checking if the source and destination have the same number of
arguments and copying the attributes over directly.

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

11 years agoR600/SI: dynamical figure out the reg class of MIMG
Christian Konig [Wed, 10 Apr 2013 08:39:16 +0000 (08:39 +0000)]
R600/SI: dynamical figure out the reg class of MIMG

Depending on the number of bits set in the writemask.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179166 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600/SI: adjust writemask to only the used components
Christian Konig [Wed, 10 Apr 2013 08:39:08 +0000 (08:39 +0000)]
R600/SI: adjust writemask to only the used components

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179165 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoR600/SI: remove image sample writemask
Christian Konig [Wed, 10 Apr 2013 08:39:01 +0000 (08:39 +0000)]
R600/SI: remove image sample writemask

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179164 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoCleanup PPCInstrInfo::DefinesPredicate
Hal Finkel [Wed, 10 Apr 2013 07:17:47 +0000 (07:17 +0000)]
Cleanup PPCInstrInfo::DefinesPredicate

Implement suggestions made by Bill Schmidt in post-commit review. Thanks!

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

11 years agoRegionInfo: Add helpers to replace entry/exit recursively
Tobias Grosser [Wed, 10 Apr 2013 06:54:49 +0000 (06:54 +0000)]
RegionInfo: Add helpers to replace entry/exit recursively

Contributed by: Star Tan <tanmx_star@yeah.net>

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

11 years agoPPC: Prep for if conversion of bctr[l]
Hal Finkel [Wed, 10 Apr 2013 06:42:34 +0000 (06:42 +0000)]
PPC: Prep for if conversion of bctr[l]

This adds in-principle support for if-converting the bctr[l] instructions.
These instructions are used for indirect branching. It seems, however, that the
current if converter will never actually predicate these. To do so, it would
need the ability to hoist a few setup insts. out of the conditionally-executed
block. For example, code like this:
  void foo(int a, int (*bar)()) { if (a != 0) bar(); }
becomes:
        ...
        beq 0, .LBB0_2
        std 2, 40(1)
        mr 12, 4
        ld 3, 0(4)
        ld 11, 16(4)
        ld 2, 8(4)
        mtctr 3
        bctrl
        ld 2, 40(1)
.LBB0_2:
        ...
and it would be safe to do all of this unconditionally with a predicated
beqctrl instruction.

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

11 years agoTemplate the MachO types over endianness.
Rafael Espindola [Wed, 10 Apr 2013 03:48:25 +0000 (03:48 +0000)]
Template the MachO types over endianness.

For now they are still only used as little endian.

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

11 years agoInclude the more specific header.
Rafael Espindola [Wed, 10 Apr 2013 01:58:26 +0000 (01:58 +0000)]
Include the more specific header.

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

11 years ago__sincosf_stret returns sinf / cosf in bits 0:31 and 32:63 of xmm0, not in
Evan Cheng [Wed, 10 Apr 2013 01:26:07 +0000 (01:26 +0000)]
__sincosf_stret returns sinf / cosf in bits 0:31 and 32:63 of xmm0, not in
xmm0 / xmm1.

rdar://13599493

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

11 years agoGeneralize the PassConfig API and remove addFinalizeRegAlloc().
Andrew Trick [Wed, 10 Apr 2013 01:06:56 +0000 (01:06 +0000)]
Generalize the PassConfig API and remove addFinalizeRegAlloc().

The target hooks are getting out of hand. What does it mean to run
before or after regalloc anyway? Allowing either Pass* or AnalysisID
pass identification should make it much easier for targets to use the
substitutePass and insertPass APIs, and create less need for badly
named target hooks.

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

11 years agoMips specific inline asm operand modifier 'D'
Jack Carter [Tue, 9 Apr 2013 23:19:50 +0000 (23:19 +0000)]
Mips specific inline asm operand modifier 'D'

Modifier 'D' is to use the second word of a double integer.

We had previously implemented the pure register varient of
the modifier and this patch implements the memory reference.

#include "stdio.h"

int b[8] = {0,1,2,3,4,5,6,7};
void main()
{
    int i;

    // The first word. Notice, no 'D'
    {asm (
    "lw    %0,%1;"
    : "=r" (i)
    : "m" (*(b+4))
    );}

    printf("%d\n",i);

    // The second word
    {asm (
    "lw    %0,%D1;"
    : "=r" (i)
    : "m" (*(b+4))
    );}

    printf("%d\n",i);
}

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

11 years agoAllow PPC B and BLR to be if-converted into some predicated forms
Hal Finkel [Tue, 9 Apr 2013 22:58:37 +0000 (22:58 +0000)]
Allow PPC B and BLR to be if-converted into some predicated forms

This enables us to form predicated branches (which are the same conditional
branches we had before) and also a larger set of predicated returns (including
instructions like bdnzlr which is a conditional return and loop-counter
decrement all in one).

At the moment, if conversion does not capture all possible opportunities. A
simple example is provided in early-ret2.ll, where if conversion forms one
predicated return, and then the PPCEarlyReturn pass picks up the other one. So,
at least for now, we'll keep both mechanisms.

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

11 years agoFix some comment typos.
Bob Wilson [Tue, 9 Apr 2013 22:15:51 +0000 (22:15 +0000)]
Fix some comment typos.

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

11 years agoCleanup. No functional change intended.
Chad Rosier [Tue, 9 Apr 2013 20:58:48 +0000 (20:58 +0000)]
Cleanup. No functional change intended.

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

11 years agoCleanup. No functional change intended.
Chad Rosier [Tue, 9 Apr 2013 20:44:09 +0000 (20:44 +0000)]
Cleanup. No functional change intended.

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

11 years agoRemove unused method and default values.
Rafael Espindola [Tue, 9 Apr 2013 20:35:08 +0000 (20:35 +0000)]
Remove unused method and default values.

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

11 years agoUpdate the version of dwarf we say we're emitting to at least 3.
Eric Christopher [Tue, 9 Apr 2013 20:22:47 +0000 (20:22 +0000)]
Update the version of dwarf we say we're emitting to at least 3.

Deals with a dwarf2 -> dwarf3 DW_FORM_ref_addr change.

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

11 years agoRevert r179115 as it looks to have killed the ASan tests.
Chad Rosier [Tue, 9 Apr 2013 19:59:12 +0000 (19:59 +0000)]
Revert r179115 as it looks to have killed the ASan tests.

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

11 years agoRationalize the formatting of these case labels. Having two sorted
Chandler Carruth [Tue, 9 Apr 2013 19:46:46 +0000 (19:46 +0000)]
Rationalize the formatting of these case labels. Having two sorted
columns is essentially impossible to edit.

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

11 years agoThis patch enables llvm to switch between compiling for mips32/mips64
Reed Kotler [Tue, 9 Apr 2013 19:46:01 +0000 (19:46 +0000)]
This patch enables llvm to switch between compiling for mips32/mips64
and mips16 on a per function basis.

Because this patch is somewhat involved I have provide an overview of the
key pieces of it.

The patch is written so as to not change the behavior of the non mixed
mode. We have tested this a lot but it is something new to switch subtargets
so we don't want any chance of regression in the mainline compiler until
we have more confidence in this.

Mips32/64 are very different from Mip16 as is the case of ARM vs Thumb1.
For that reason there are derived versions of the register info, frame info,
instruction info and instruction selection classes.

Now we register three separate passes for instruction selection.
One which is used to switch subtargets (MipsModuleISelDAGToDAG.cpp) and then
one for each of the current subtargets (Mips16ISelDAGToDAG.cpp and
MipsSEISelDAGToDAG.cpp).

When the ModuleISel pass runs, it determines if there is a need to switch
subtargets and if so, the owning pointers in MipsTargetMachine are
appropriately changed.

When 16Isel or SEIsel is run, they will return immediately without doing
any work if the current subtarget mode does not apply to them.

In addition, MipsAsmPrinter needs to be reset on a function basis.

The pass BasicTargetTransformInfo is substituted with a null pass since the
pass is immutable and really needs to be a function pass for it to be
used with changing subtargets. This will be fixed in a follow on patch.

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

11 years agoAdd support for bottom-up SLP vectorization infrastructure.
Nadav Rotem [Tue, 9 Apr 2013 19:44:35 +0000 (19:44 +0000)]
Add support for bottom-up SLP vectorization infrastructure.

This commit adds the infrastructure for performing bottom-up SLP vectorization (and other optimizations) on parallel computations.
The infrastructure has three potential users:

  1. The loop vectorizer needs to be able to vectorize AOS data structures such as (sum += A[i] + A[i+1]).

  2. The BB-vectorizer needs this infrastructure for bottom-up SLP vectorization, because bottom-up vectorization is faster to compute.

  3. A loop-roller needs to be able to analyze consecutive chains and roll them into a loop, in order to reduce code size. A loop roller does not need to create vector instructions, and this infrastructure separates the chain analysis from the vectorization.

This patch also includes a simple (100 LOC) bottom up SLP vectorizer that uses the infrastructure, and can vectorize this code:

void SAXPY(int *x, int *y, int a, int i) {
  x[i]   = a * x[i]   + y[i];
  x[i+1] = a * x[i+1] + y[i+1];
  x[i+2] = a * x[i+2] + y[i+2];
  x[i+3] = a * x[i+3] + y[i+3];
}

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

11 years agoMake check depend on all.
Eric Christopher [Tue, 9 Apr 2013 19:42:12 +0000 (19:42 +0000)]
Make check depend on all.

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

11 years ago[ms-inline asm] Use parsePrimaryExpr in lieu of parseExpression if we need to
Chad Rosier [Tue, 9 Apr 2013 19:34:59 +0000 (19:34 +0000)]
[ms-inline asm] Use parsePrimaryExpr in lieu of parseExpression if we need to
parse an identifier.  Otherwise, parseExpression may parse multiple tokens,
which makes it impossible to properly compute an immediate displacement.
An example of such a case is the source operand (i.e., [Symbol + ImmDisp]) in
the below example:

 __asm mov eax, [Symbol + ImmDisp]

The existing test cases exercise this patch.
rdar://13611297

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

11 years agoThe .dwo section shouldn't contain the unrelocated values (and
Eric Christopher [Tue, 9 Apr 2013 19:23:15 +0000 (19:23 +0000)]
The .dwo section shouldn't contain the unrelocated values (and
therefore not at all) of the pc or statement list. We also don't
need to emit the compilation dir so save so space and time
and don't bother.

Fix up the testcase accordingly and verify that we don't emit
the attributes or the items that they use.

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

11 years agoCleanup PPCEarlyReturn
Hal Finkel [Tue, 9 Apr 2013 18:25:18 +0000 (18:25 +0000)]
Cleanup PPCEarlyReturn

Some general cleanup and only scan the end of a BB for branches (once we're
done with the terminators and debug values, then there should not be any other
branches). These address post-commit review suggestions by Bill Schmidt.

No functionality change intended.

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

11 years agoRevert r176408 and r176407 to address PR15540.
Nadav Rotem [Tue, 9 Apr 2013 18:16:05 +0000 (18:16 +0000)]
Revert r176408 and r176407 to address PR15540.

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

11 years ago[ms-inline asm] Maintain a StringRef to reference a symbol in a parsed operand,
Chad Rosier [Tue, 9 Apr 2013 17:53:49 +0000 (17:53 +0000)]
[ms-inline asm] Maintain a StringRef to reference a symbol in a parsed operand,
rather than deriving the StringRef from the Start and End SMLocs.

Using the Start and End SMLocs works fine for operands such as [Symbol], but
not for operands such as [Symbol + ImmDisp].  All existing test cases that
reference a variable exercise this patch.
rdar://13602265

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

11 years agoDAGCombiner: Fold a shuffle on CONCAT_VECTORS into a new CONCAT_VECTORS if possible.
Benjamin Kramer [Tue, 9 Apr 2013 17:41:43 +0000 (17:41 +0000)]
DAGCombiner: Fold a shuffle on CONCAT_VECTORS into a new CONCAT_VECTORS if possible.

This pattern occurs in SROA output due to the way vector arguments are lowered
on ARM.

The testcase from PR15525 now compiles into this, which is better than the code
we got with the old scalarrepl:
_Store:
ldr.w r9, [sp]
vmov d17, r3, r9
vmov d16, r1, r2
vst1.8 {d16, d17}, [r0]
bx lr

Differential Revision: http://llvm-reviews.chandlerc.com/D647

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

11 years agoUse virtual base registers on PPC
Hal Finkel [Tue, 9 Apr 2013 17:27:09 +0000 (17:27 +0000)]
Use virtual base registers on PPC

On PowerPC, non-vector loads and stores have r+i forms; however, in functions
with large stack frames these were not being used to access slots far from the
stack pointer because such slots were out of range for the signed 16-bit
immediate offset field. This increases register pressure because we need a
separate register for each offset (when the r+r form is used). By enabling
virtual base registers, we can deal with large stack frames without unduly
increasing register pressure.

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

11 years agoConvert test PowerPC/2007-09-07-LoadStoreIdxForms to FileCheck
Hal Finkel [Tue, 9 Apr 2013 17:26:55 +0000 (17:26 +0000)]
Convert test PowerPC/2007-09-07-LoadStoreIdxForms to FileCheck

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

11 years agoRewrite test/Linker tests to use FileCheck instead of grep.
Eli Bendersky [Tue, 9 Apr 2013 16:51:13 +0000 (16:51 +0000)]
Rewrite test/Linker tests to use FileCheck instead of grep.

Some translations here are not 1x1 because there are grep|grep
chains that are non-trivial to implement in terms of FileCheck features. I
made an effort for the tests to remain as similar as possible; do let me know
if you notice anything fishy. The good news are that some buggy tests were
fixed (grep | not grep - a bug waiting to happen).

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

11 years agoConvert MachOObjectFile to a template.
Rafael Espindola [Tue, 9 Apr 2013 14:49:08 +0000 (14:49 +0000)]
Convert MachOObjectFile to a template.

For now it is templated only on being 64 or 32 bits. I will add little/big
endian next.

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

11 years agoDWARF parser: Fix DWARF-2/3 incompatibility: size of DW_FORM_ref_addr is the same...
Alexey Samsonov [Tue, 9 Apr 2013 14:09:42 +0000 (14:09 +0000)]
DWARF parser: Fix DWARF-2/3 incompatibility: size of DW_FORM_ref_addr is the same as DW_FORM_addr in DWARF2, and is 4/8 bytes on 32/64-bit DWARF starting from DWARF3. Adding a test for this is a huge pain - generating and uploading pre-built binary with DWARF3 debug info is way too ugly, and writing fine-grained unittests for DebugInfo is impossible, as it doesn't expose any headers in include/llvm. That said, I'm going to choose the second approach and submit the patch exposing DebugInfo headers for review soon enough.

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

11 years agoConverted 8x tests of SimplifyCFG to use FileCheck instead of grep.
Michael Gottesman [Tue, 9 Apr 2013 05:18:53 +0000 (05:18 +0000)]
Converted 8x tests of SimplifyCFG to use FileCheck instead of grep.

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

11 years agoExtract a function.
Jakob Stoklund Olesen [Tue, 9 Apr 2013 05:11:52 +0000 (05:11 +0000)]
Extract a function.

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