Commit Graph

84871 Commits

Author SHA1 Message Date
Michael Ilseman
06b9690463 whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163518 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10 16:56:31 +00:00
Michael Liao
7fdc66bf73 Add boolean simplification support from CMOV
- If a boolean value is generated from CMOV and tested as boolean value,
  simplify the use of test result by referencing the original condition.
  RDRAND intrinisc is one of such cases.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163516 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10 16:36:16 +00:00
James Molloy
8cd08bf4ac Fix an assertion failure when optimising a shufflevector incorrectly into concat_vectors, and a followup bug with SelectionDAG::getNode() creating nodes with invalid types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163511 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10 14:01:21 +00:00
Nadav Rotem
ff1b63172d Minor cleanup. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163510 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10 13:20:00 +00:00
Nadav Rotem
9438d1e351 Stack Coloring: Debug prints to print the slot number and not the array index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163509 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10 13:17:58 +00:00
Nadav Rotem
a7de8a61df Stack Coloring: When searching for disjoint regions, do not compare intervals twice or to theirself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163508 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10 12:47:38 +00:00
Nadav Rotem
e47feeb823 Stack Coloring: Add support for multiple regions of the same slot, within a single basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163507 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10 12:39:35 +00:00
Elena Demikhovsky
8100d244ff The VPSHUFB 256-bit instruction may be generated when one of input vector is undefined or zeroinitializer.
I've added the "zeroinitializer" case in this patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163506 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10 12:13:11 +00:00
Benjamin Kramer
1ac4587eb3 Make helper function static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163504 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10 11:52:14 +00:00
Benjamin Kramer
04142bc845 Move bypassSlowDivision into the llvm namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163503 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10 11:52:08 +00:00
Benjamin Kramer
c1cbfa805b c bindings: revert LLVMConstInlineAsm to always use the default asm dialect.
- The C API should be stable
- InlineAsm::AsmDialect is not exposed to C
- The function didn't match the prototype so this was unreachable code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163502 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10 11:52:00 +00:00
Evgeniy Stepanov
4fbaa509eb GTest on Android needs a custom tmpdir path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163501 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10 10:32:29 +00:00
Nadav Rotem
8cc1494905 Fix a typo in the comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163496 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10 08:51:46 +00:00
Nadav Rotem
0aa52ee04e Add an assertion that the frame index is indeed inside the declared lifetime region.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163495 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10 08:44:15 +00:00
Nadav Rotem
9a2ae00c85 Teach the DAGBuilder about lifetime markers which are generated from PHINodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163494 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10 08:43:23 +00:00
Hans Wennborg
2f9fc761d2 Fix style issues from r163302 pointed out by Evan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163491 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10 07:44:22 +00:00
Nick Lewycky
35aec959e9 Move spaces to the right places. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163485 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-09 23:41:11 +00:00
Nick Lewycky
74eab5ab9e Add missing space before {. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163484 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-09 23:40:55 +00:00
Craig Topper
956342b210 Teach DAG combiner to constant fold fneg of a BUILD_VECTOR of constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163483 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-09 22:58:45 +00:00
Aaron Ballman
236bcf1fcd Fixing a type width warning with MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163481 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-09 20:34:25 +00:00
Benjamin Kramer
3be7584f40 DSE: Poking holes into a SetVector is expensive, avoid it if possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163480 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-09 16:44:05 +00:00
Benjamin Kramer
11b4505899 LiveVariables: Compute a set of defs and kills to speed up updating LV during critical edge splitting.
Previously we checked if the register is def'd in a block via the def/use list a
nd walked the list of kills to check if the register is killed in a block. Both
of these checks can be made much cheaper by walking the block first and
recording all defs and kills.

This reduces the compile time of the test case from PR13651 from 40s to 15s at
-O2. The compile time is still dominated by LV updating but now the main culprit
is SparseBitVector's slowness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163478 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-09 11:56:14 +00:00
Craig Topper
12fb5c667f Add instruction selection for ffloor of vectors when SSE4.1 or AVX is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163473 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-08 17:42:27 +00:00
NAKAMURA Takumi
46b4b112d2 lit: Util.which(): Use os.path.isfile() instead of os.path.exists(), or it hits to the directory.
For example, which('loop-convert') returns 'loop-convert' when the directory 'loop-convert' exists.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163469 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-08 12:07:24 +00:00
Craig Topper
cacd9d6f79 Use 256-bit alignment for constant pool value for 256-bit vector FNEG lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163463 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-08 07:46:05 +00:00
Craig Topper
4362067d7c Add support for lowering FABS of vector types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163461 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-08 07:31:51 +00:00
Craig Topper
a1fb1d2ed7 Set operation action for FFLOOR to Expand for all vector types for X86. Set FFLOOR of v4f32 to Expand for ARM. v2f64 was already correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163458 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-08 04:58:43 +00:00
Ted Kremenek
4f50517577 Revert "Add -exact-match option to FileCheck to allow clients to do exact matches without using regular expressions."
Turns out I did not need it after all.  If we find a use for it in the future, we
can resurrect it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163457 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-08 04:32:13 +00:00
Ted Kremenek
0d651e0c9d Add operator< for FoldingSetNodeID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163454 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-08 04:25:29 +00:00
Andrew Trick
a344341849 Remove an incorrect assert during branch weight propagation.
Patch and test case by Alastair Murray!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163437 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-08 00:07:26 +00:00
Anshuman Dasgupta
3adf3b0ac0 Refactored DFA generator. Merged transition class into state class.
Patch by Ivan Llopard!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163424 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 21:35:43 +00:00
Alex Rosenberg
a4e87b78ca Add IRC handle entry to CREDITS.TXT as a test commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163423 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 21:34:50 +00:00
Sandeep Patel
d2f43b017c Correct an unfortunately necessary typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163422 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 21:20:20 +00:00
Benjamin Kramer
a9e37c5eaf Fix alignment of .comm and .lcomm on mingw32.
For some reason .lcomm uses byte alignment and .comm log2 alignment so we can't
use the same setting for both. Fix this by reintroducing the LCOMM enum.
I verified this against mingw's gcc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163420 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 21:08:01 +00:00
Jack Carter
b72a90e05b Initial relocations test for the Mips standalone assembler.
This is not an exhaustive set, but something we can build on.

Contributer: Vladimir Medic


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163419 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 20:38:18 +00:00
Chad Rosier
26c5d5f0a9 Fix indent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163416 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 20:23:29 +00:00
Benjamin Kramer
1a005cec5a Contrary to what the documentation says, .lcomm alignment on COFF is in bytes, not power of 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163405 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 18:56:10 +00:00
Chad Rosier
c53ade2889 Update function names to conform to guidelines. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163401 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 18:16:38 +00:00
Jakob Stoklund Olesen
a7390fadba Custom DAGCombine for and/or/xor are for all ARMs.
The 'select' transformations apply to all ARM architectures and don't
require hasV6T2Ops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163396 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 17:34:15 +00:00
Benjamin Kramer
39646d96e7 MC: Overhaul handling of .lcomm
- Darwin lied about not supporting .lcomm and turned it into zerofill in the
  asm parser. Push the zerofill-conversion down into macho-specific code.
- This makes the tri-state LCOMMType enum superfluous, there are no targets
  without .lcomm.
- Do proper error reporting when trying to use .lcomm with alignment on a target
  that doesn't support it.
- .comm and .lcomm alignment was parsed in bytes on COFF, should be power of 2.
- Fixes PR13755 (.lcomm crashes on ELF).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163395 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 17:25:13 +00:00
Benjamin Kramer
8e70b5506e PR13754: llvm-mc/x86 crashes on .cfi directives without the % prefix for registers.
gas accepts this and it seems to be common enough to be worth supporting. This
doesn't affect the parsing of reg operands outside of .cfi directives.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163390 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 14:51:35 +00:00
Benjamin Kramer
38539ebc2b MipsAsmParser: Fix a couple of string use-after-frees and misuses of classof.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163383 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 09:47:42 +00:00
Nuno Lopes
c37290e578 yet another attempt at fixing @OCAMLOPT@ for sed.
Patch by Rick Foos.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163380 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 09:24:13 +00:00
Hans Wennborg
bf01582165 SimplifyCFG: ValidLookupTableConstant should be static
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163378 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 08:22:57 +00:00
Ted Kremenek
2e578388ab Add -exact-match option to FileCheck to allow clients to do exact matches without using regular expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163371 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 06:47:16 +00:00
Michael Liao
1fdaee9995 Stop emitting lifetime region info when stack coloring is not enabled in O0
- this should fix PR13780



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163370 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 05:13:00 +00:00
Jack Carter
04376ebe9f The Mips standalone assembler aliased instruction support.
The assembler can alias one instruction into another based
on the operands. For example the jump instruction "J" takes
and immediate operand, but if the operand is a register the
assembler will change it into a jump register "JR" instruction.

These changes are in the instruction td file.

Test cases included

Contributer: Vladimir Medic


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163368 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 01:42:38 +00:00
Jack Carter
acbea45573 The Mips standalone assembler intial directive support.
Actually these are just stubs for parsing the directives.
Semantic support will come later.

Test cases included

Contributer: Vladimir Medic


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163364 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 00:48:02 +00:00
Jack Carter
f740d6e328 The Mips standalone assembler fpu instruction support.
Test cases included

Contributer: Vladimir Medic


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163363 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 00:23:42 +00:00
Michael Liao
307525cd24 Re-work bit/bits value resolving in tblgen
- This patch is inspired by the failure of the following code snippet
  which is used to convert enumerable values into encoding bits to
  improve the readability of td files.

  class S<int s> {
    bits<2> V = !if(!eq(s, 8),  {0, 0},
                !if(!eq(s, 16), {0, 1},
                !if(!eq(s, 32), {1, 0},
                !if(!eq(s, 64), {1, 1}, {?, ?}))));
  }

  Later, PR8330 is found to report not exactly the same bug relevant
  issue to bit/bits values.

- Instead of resolving bit/bits values separately through
  resolveBitReference(), this patch adds getBit() for all Inits and
  resolves bit value by resolving plus getting the specified bit. This
  unifies the resolving of bit with other values and removes redundant
  logic for resolving bit only. In addition,
  BitsInit::resolveReferences() is optimized to take advantage of this
  origanization by resolving VarBitInit's variable reference first and
  then getting bits from it.

- The type interference in '!if' operator is revised to support possible
  combinations of int and bits/bit in MHS and RHS.

- As there may be illegal assignments from integer value to bit, says
  assign 2 to a bit, but we only check this during instantiation in some
  cases, e.g.

  bit V = !if(!eq(x, 17), 0, 2);

  Verbose diagnostic message is generated when invalid value is
  resolveed to help locating the error.

- PR8330 is fixed as well.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163360 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-06 23:32:48 +00:00