oota-llvm.git
11 years agoDon't expose symbols of lle_ functions.
Benjamin Kramer [Wed, 11 Sep 2013 12:42:39 +0000 (12:42 +0000)]
Don't expose symbols of lle_ functions.

+ formatting fixes.

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

11 years ago[mips][msa] Added test cases that were supposed to be part of r190507, r190509, r1905...
Daniel Sanders [Wed, 11 Sep 2013 12:39:25 +0000 (12:39 +0000)]
[mips][msa] Added test cases that were supposed to be part of r190507, r190509, r190512, and r190518.

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

11 years ago[mips][msa] Added support for matching mulv, nlzc, sll, sra, srl, and subv from norma...
Daniel Sanders [Wed, 11 Sep 2013 11:58:30 +0000 (11:58 +0000)]
[mips][msa] Added support for matching mulv, nlzc, sll, sra, srl, and subv from normal IR (i.e. not intrinsics)

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

11 years agollvm-tblgen: Stabilize subreg index tables.
Benjamin Kramer [Wed, 11 Sep 2013 11:22:26 +0000 (11:22 +0000)]
llvm-tblgen: Stabilize subreg index tables.

Otherwise SequenceToOffsetTable will sort by pointer and becomes non-deterministic.

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

11 years ago[mips][msa] Added support for matching fadd, fdiv, flog2, fmul, frint, fsqrt, and...
Daniel Sanders [Wed, 11 Sep 2013 10:51:30 +0000 (10:51 +0000)]
[mips][msa] Added support for matching fadd, fdiv, flog2, fmul, frint, fsqrt, and fsub from normal IR (i.e. not intrinsics)

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

11 years agoPath: Add an in-place version of path::native.
Benjamin Kramer [Wed, 11 Sep 2013 10:45:21 +0000 (10:45 +0000)]
Path: Add an in-place version of path::native.

This reflects the common use case of nativizing a prepared path. The existing
version invokes undefined behavior if input = output, add an assert to catch
that case.

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

11 years ago[mips][msa] Added support for matching div_[su] from normal IR (i.e. not intrinsics)
Daniel Sanders [Wed, 11 Sep 2013 10:38:58 +0000 (10:38 +0000)]
[mips][msa] Added support for matching div_[su] from normal IR (i.e. not intrinsics)

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

11 years ago[mips][msa] Added support for matching addv from normal IR (i.e. not intrinsics)
Daniel Sanders [Wed, 11 Sep 2013 10:28:16 +0000 (10:28 +0000)]
[mips][msa] Added support for matching addv from normal IR (i.e. not intrinsics)

The corresponding intrinsic is now lowered into equivalent IR (ISD::ADD) before instruction selection.

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

11 years ago[mips][msa] Separate the configuration of int/float vector types since they will...
Daniel Sanders [Wed, 11 Sep 2013 10:15:48 +0000 (10:15 +0000)]
[mips][msa] Separate the configuration of int/float vector types since they will diverge soon

No functional change

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

11 years ago[mips][msa] Corrected the definition of the dotp_[su].[hwd] intrinsics
Daniel Sanders [Wed, 11 Sep 2013 09:59:17 +0000 (09:59 +0000)]
[mips][msa] Corrected the definition of the dotp_[su].[hwd] intrinsics

The elements of the operands should be half the width of the elements of
the result.

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

11 years agoconfig-ix.cmake: Tweak stray endif(...) to suppress a warning in CMake.
NAKAMURA Takumi [Wed, 11 Sep 2013 09:42:03 +0000 (09:42 +0000)]
config-ix.cmake: Tweak stray endif(...) to suppress a warning in CMake.

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

11 years agoSimplify the checking of function attributes by using the simple methods.
Bill Wendling [Wed, 11 Sep 2013 08:35:09 +0000 (08:35 +0000)]
Simplify the checking of function attributes by using the simple methods.

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

11 years agoUse type form of getIntPtrType
Matt Arsenault [Wed, 11 Sep 2013 07:29:40 +0000 (07:29 +0000)]
Use type form of getIntPtrType

This doesn't change anything since malloc always returns
address space 0.

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

11 years agoFix typo
Rui Ueyama [Wed, 11 Sep 2013 05:22:01 +0000 (05:22 +0000)]
Fix typo

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

11 years agoTeach loop-idiom about address space pointer sizes
Matt Arsenault [Wed, 11 Sep 2013 05:09:42 +0000 (05:09 +0000)]
Teach loop-idiom about address space pointer sizes

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

11 years agoAdd braces
Matt Arsenault [Wed, 11 Sep 2013 05:09:35 +0000 (05:09 +0000)]
Add braces

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

11 years agoRe-submit r190469: YAMLIO: Fix string quoting logic.
Rui Ueyama [Wed, 11 Sep 2013 04:00:08 +0000 (04:00 +0000)]
Re-submit r190469: YAMLIO: Fix string quoting logic.

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

11 years agoRevert "YAMLIO: Fix string quoting logic." (r190469)
Hans Wennborg [Wed, 11 Sep 2013 01:59:32 +0000 (01:59 +0000)]
Revert "YAMLIO: Fix string quoting logic." (r190469)

It was turning the buildbots red.

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

11 years ago[python-bindings] Added support for getting/setting operands of values and getting...
Michael Gottesman [Wed, 11 Sep 2013 01:38:12 +0000 (01:38 +0000)]
[python-bindings] Added support for getting/setting operands of values and getting the number of operands of a value.

Also in the process did some cleanups for BasicBlock.

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

11 years ago[python-bindings] Added support for iterating over a basic blocks instructions, getti...
Michael Gottesman [Wed, 11 Sep 2013 01:17:38 +0000 (01:17 +0000)]
[python-bindings] Added support for iterating over a basic blocks instructions, getting their name/dumping them, f/b iteration.

Tests are included.

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

11 years ago[python-bindings] Added support for iterating over a function's basic blocks, dumping...
Michael Gottesman [Wed, 11 Sep 2013 01:01:40 +0000 (01:01 +0000)]
[python-bindings] Added support for iterating over a function's basic blocks, dumping/getting names of those bb, f/w iteration.

Tests are included.

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

11 years agoRemove trailing whitespace
Rui Ueyama [Wed, 11 Sep 2013 00:53:07 +0000 (00:53 +0000)]
Remove trailing whitespace

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

11 years ago[python-bindings] Added support for getting a module's functions, iterating f/b over...
Michael Gottesman [Wed, 11 Sep 2013 00:52:47 +0000 (00:52 +0000)]
[python-bindings] Added support for getting a module's functions, iterating f/b over said functions, dumping/print name of functions.

Tests are included as well.

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

11 years agoYAMLIO: Fix string quoting logic.
Rui Ueyama [Wed, 11 Sep 2013 00:45:48 +0000 (00:45 +0000)]
YAMLIO: Fix string quoting logic.

YAMLIO printed a string as is without quotes unless it contains a newline
character. That did not suffice. We also need to quote a string if it starts
with a backquote, quote, double quote or atsign, or it's the empty string.

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

11 years ago[python-bindings] Export OpCode from core.py.
Michael Gottesman [Wed, 11 Sep 2013 00:41:07 +0000 (00:41 +0000)]
[python-bindings] Export OpCode from core.py.

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

11 years ago[python-bindings] Added test for reading a module from bitcode.
Michael Gottesman [Wed, 11 Sep 2013 00:41:05 +0000 (00:41 +0000)]
[python-bindings] Added test for reading a module from bitcode.

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

11 years agoRename variables for consistency.
Eli Friedman [Wed, 11 Sep 2013 00:41:02 +0000 (00:41 +0000)]
Rename variables for consistency.

No functional change.

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

11 years ago[python-bindings] Fixed 3 test failures caused by typos.
Michael Gottesman [Wed, 11 Sep 2013 00:41:02 +0000 (00:41 +0000)]
[python-bindings] Fixed 3 test failures caused by typos.

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

11 years agoGet rid of unused isPodLike definitions.
Eli Friedman [Wed, 11 Sep 2013 00:36:54 +0000 (00:36 +0000)]
Get rid of unused isPodLike definitions.

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

11 years agoSupport ANSI escape code on Windows
Nico Rieck [Wed, 11 Sep 2013 00:36:48 +0000 (00:36 +0000)]
Support ANSI escape code on Windows

In some cases (e.g. when a build system pipes stderr) the Windows console
API cannot be used to color output. For these, provide a way to switch to
ANSI escape codes. This is required for Clang's -fansi-escape-codes option.

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

11 years agoFixed typo.
Michael Gottesman [Wed, 11 Sep 2013 00:27:23 +0000 (00:27 +0000)]
Fixed typo.

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

11 years ago[python-bindings] Added code for loading a module from bitcode, getset its datalayout...
Michael Gottesman [Wed, 11 Sep 2013 00:23:14 +0000 (00:23 +0000)]
[python-bindings] Added code for loading a module from bitcode, getset its datalayout, getset its target, dump it, print it to a file.

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

11 years ago[python-bindings] Added bindings for LLVMContextRef and a test for creating a new...
Michael Gottesman [Wed, 11 Sep 2013 00:23:10 +0000 (00:23 +0000)]
[python-bindings] Added bindings for LLVMContextRef and a test for creating a new context or getting the global context.

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

11 years ago[python-bindings] Implemented the PassRegistry class and the calls to initialize...
Michael Gottesman [Wed, 11 Sep 2013 00:23:08 +0000 (00:23 +0000)]
[python-bindings] Implemented the PassRegistry class and the calls to initialize/shutdown llvm. Also included an initialize_llvm declaration.

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

11 years ago[python-bindings] Removed unused import byref from llvm/disassembler.py.
Michael Gottesman [Wed, 11 Sep 2013 00:23:05 +0000 (00:23 +0000)]
[python-bindings] Removed unused import byref from llvm/disassembler.py.

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

11 years agoDon't assert on invalid loop vectorization hint.
Eli Friedman [Tue, 10 Sep 2013 23:45:25 +0000 (23:45 +0000)]
Don't assert on invalid loop vectorization hint.

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

11 years agoFix another mistake in r190442.
Eli Friedman [Tue, 10 Sep 2013 23:22:56 +0000 (23:22 +0000)]
Fix another mistake in r190442.

Sorry about that; I'll try to be more careful about DEBUG mode.

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

11 years agoFix unused variables.
Eli Friedman [Tue, 10 Sep 2013 23:18:14 +0000 (23:18 +0000)]
Fix unused variables.

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

11 years agoFix mistake in r190442.
Eli Friedman [Tue, 10 Sep 2013 23:09:24 +0000 (23:09 +0000)]
Fix mistake in r190442.

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

11 years agoRemove unused functions.
Eli Friedman [Tue, 10 Sep 2013 22:42:31 +0000 (22:42 +0000)]
Remove unused functions.

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

11 years agoHoist section call out of loop.
Eric Christopher [Tue, 10 Sep 2013 21:49:37 +0000 (21:49 +0000)]
Hoist section call out of loop.

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

11 years agoTry to unbreak mingw32 buildbot.
Rui Ueyama [Tue, 10 Sep 2013 21:32:42 +0000 (21:32 +0000)]
Try to unbreak mingw32 buildbot.

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

11 years agoFix missing CHECK-LABELs
Matt Arsenault [Tue, 10 Sep 2013 19:57:05 +0000 (19:57 +0000)]
Fix missing CHECK-LABELs

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

11 years agoTeach ScalarEvolution about pointer address spaces
Matt Arsenault [Tue, 10 Sep 2013 19:55:24 +0000 (19:55 +0000)]
Teach ScalarEvolution about pointer address spaces

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

11 years agoFix typo
Matt Arsenault [Tue, 10 Sep 2013 19:54:54 +0000 (19:54 +0000)]
Fix typo

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

11 years agoAdd getenv() wrapper that works on multibyte environment variable.
Rui Ueyama [Tue, 10 Sep 2013 19:45:51 +0000 (19:45 +0000)]
Add getenv() wrapper that works on multibyte environment variable.

On Windows, character encoding of multibyte environment variable varies
depending on settings. The only reliable way to handle it I think is to use
GetEnvironmentVariableW().

GetEnvironmentVariableW() works on wchar_t string, which is on Windows UTF16
string. That's not ideal because we use UTF-8 as the internal encoding in LLVM.
This patch defines a wrapper function which takes and returns UTF-8 string for
GetEnvironmentVariableW().

The wrapper function does not do any conversion and just forwards the argument
to getenv() on Unix.

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

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

11 years agoLoopVectorize: PHI nodes are always at the beginning of a block, no need to scan...
Benjamin Kramer [Tue, 10 Sep 2013 18:46:15 +0000 (18:46 +0000)]
LoopVectorize: PHI nodes are always at the beginning of a block, no need to scan the whole block.

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

11 years agoDebug Info: create scope children DIEs when the scope DIE is not null.
Manman Ren [Tue, 10 Sep 2013 18:40:41 +0000 (18:40 +0000)]
Debug Info: create scope children DIEs when the scope DIE is not null.

We try to create the scope children DIEs after we create the scope DIE. But
to avoid emitting empty lexical block DIE, we first check whether a scope
DIE is going to be null, then create the scope children if it is not null.
From the number of children, we decide whether to actually create the scope DIE.

This patch also removes an early exit which checks for a special condition.
It also removes deletion of un-used children DIEs that are generated
because we used to generate children DIEs before the scope DIE.

Deletion of un-used children DIEs may cause problem because we sometimes keep
created DIEs in a member variable of a CU.

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

11 years agocmake: Install llvm-tblgen again
Hans Wennborg [Tue, 10 Sep 2013 18:35:14 +0000 (18:35 +0000)]
cmake: Install llvm-tblgen again

It was removed in r189130, but it turns out this makes life hard for
folks packaging LLVM and Clang and building the latter based on the
LLVM package.

Note that this only adds back the LLVM tblgen, and it's obviously
not included when LLVM_INSTALL_TOOLCHAIN_ONLY is set.

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

11 years agoDebug Info: define a DIRef template.
Manman Ren [Tue, 10 Sep 2013 18:30:07 +0000 (18:30 +0000)]
Debug Info: define a DIRef template.

Specialize the constructors for DIRef<DIScope> and DIRef<DIType> to make sure
the Value is indeed a scope ref and a type ref.

Use DIScopeRef for DIScope::getContext and DIType::getContext and use DITypeRef
for getContainingType and getClassType.

DIScope::generateRef now returns a DIScopeRef instead of a "Value *" for
readability and type safety.

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

11 years agoARM: Use the PICADD opcode calculated.
Jim Grosbach [Tue, 10 Sep 2013 17:21:39 +0000 (17:21 +0000)]
ARM: Use the PICADD opcode calculated.

We were figuring out whether to use tPICADD or PICADD, then just using
tPICADD unconditionally anyway. Oops.

A testcase from someone familiar enough with ELF to produce one would
be appreciated. The existing PIC testcase correctly verifies the .s
generated, but that doesn't catch this bug, which only showed up in
direct-to-object mode.

http://llvm.org/bugs/show_bug.cgi?id=17180

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

11 years agoRemove unused private member in ARMAsmPrinter.cpp.
Logan Chien [Tue, 10 Sep 2013 15:10:02 +0000 (15:10 +0000)]
Remove unused private member in ARMAsmPrinter.cpp.

This commit removes the unused "AttributeItem" from
ObjectAttributeEmitter.

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

11 years agoAdding LZMA as dep for XML2 on 2.8.0 or higher
Renato Golin [Tue, 10 Sep 2013 14:24:17 +0000 (14:24 +0000)]
Adding LZMA as dep for XML2 on 2.8.0 or higher

LibXML2 config doesn't specify lzma as a dependency, which breaks
cross-compilation builds using new linkers (ld 2.21 or higher).

There is a bug on libxml2 to fix that, but since it's going to take
a while for things to go round and back, so we should have a harmless
addition of the library until then.

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

11 years ago[asan] refactor the use-after-return API so that the size class is computed at compil...
Kostya Serebryany [Tue, 10 Sep 2013 13:16:56 +0000 (13:16 +0000)]
[asan] refactor the use-after-return API so that the size class is computed at compile time instead of at run-time. llvm part

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

11 years ago[SystemZ] Update README.
Richard Sandiford [Tue, 10 Sep 2013 12:22:45 +0000 (12:22 +0000)]
[SystemZ] Update README.

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

11 years ago[SystemZ] Add TM and TMY
Richard Sandiford [Tue, 10 Sep 2013 10:20:32 +0000 (10:20 +0000)]
[SystemZ] Add TM and TMY

The main complication here is that TM and TMY (the memory forms) set
CC differently from the register forms.  When the tested bits contain
some 0s and some 1s, the register forms set CC to 1 or 2 based on the
value the uppermost bit.  The memory forms instead set CC to 1
regardless of the uppermost bit.

Until now, I've tried to make it so that a branch never tests for an
impossible CC value.  E.g. NR only sets CC to 0 or 1, so branches on the
result will only test for 0 or 1.  Originally I'd tried to do the same
thing for TM and TMY by using custom matching code in ISelDAGToDAG.
That ended up being very ugly though, and would have meant duplicating
some of the chain checks that the common isel code does.

I've therefore gone for the simpler alternative of adding an extra
operand to the TM DAG opcode to say whether a memory form would be OK.
This means that the inverse of a "TM;JE" is "TM;JNE" rather than the
more precise "TM;JNLE", just like the inverse of "TMLL;JE" is "TMLL;JNE".
I suppose that's arguably less confusing though...

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

11 years ago[mips][msa] Removed unsupported dot product instructions (dotp_[su].b)
Daniel Sanders [Tue, 10 Sep 2013 09:51:43 +0000 (09:51 +0000)]
[mips][msa] Removed unsupported dot product instructions (dotp_[su].b)

The dotp_[su].b instructions never existed in any revision of the MSA spec.

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

11 years agoAdd test cases for Mips mthc1/mfhc1 instructions. Add check for odd value of register...
Vladimir Medic [Tue, 10 Sep 2013 09:50:01 +0000 (09:50 +0000)]
Add test cases for Mips mthc1/mfhc1 instructions. Add check for odd value of register when PFU is 32 bit.

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

11 years agoRemove obsolete code from MipsAsmParser.cpp.
Vladimir Medic [Tue, 10 Sep 2013 09:39:55 +0000 (09:39 +0000)]
Remove obsolete code from MipsAsmParser.cpp.

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

11 years ago[python-bindings] Changed test_memory_buffer_create_from_file to just use the generic...
Michael Gottesman [Tue, 10 Sep 2013 06:58:00 +0000 (06:58 +0000)]
[python-bindings] Changed test_memory_buffer_create_from_file to just use the generic provided test_file instead of a binary.

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

11 years ago[python bindings] Added code to get the length of a memory buffer. Tests are included.
Michael Gottesman [Tue, 10 Sep 2013 06:57:57 +0000 (06:57 +0000)]
[python bindings] Added code to get the length of a memory buffer. Tests are included.

This is a part of a series of patches that have been sitting fallow on a
personal branch that I have been messing with for a bit.

The patches start to flesh out the python llvm-c wrapper to the point where you can:

1. Load Modules from Bitcode/Dump/Print them.
2. Iterate over Functions from those modules/get their names/dump them.
3. Iterate over the BasicBlocks from said function/get the BB's name/dump it.
4. Iterate over the Instructions in said BasicBlocks/get the instructions
   name/dump the instruction.

My main interest in developing this was to be able to gather statistics about
LLVM IR using python scripts to speed up statistical profiling of different IR
level transformations (hence the focus on printing/dumping/getting names).

This is a gift from me to the LLVM community = ).

I am going to be committing the patches slowly over the next bit as I have time
to prepare the patches.

The overall organization follows the c-api like the bindings that are already
implemented.

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

11 years agoMCObjectFileInfo.cpp: Fix a couple of possible typo(s), s/DwarfPub/DwarfGnuPub/,...
NAKAMURA Takumi [Tue, 10 Sep 2013 06:01:56 +0000 (06:01 +0000)]
MCObjectFileInfo.cpp: Fix a couple of possible typo(s), s/DwarfPub/DwarfGnuPub/, in r190344.

XFAIL can be removed. (in r190374)

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

11 years agoDon't use getSetCCResultType for creating a vselect
Matt Arsenault [Tue, 10 Sep 2013 00:41:56 +0000 (00:41 +0000)]
Don't use getSetCCResultType for creating a vselect

The vselect mask isn't a setcc.

This breaks in the case when the result of getSetCCResultType
is larger than the vector operands

e.g. %tmp = select i1 %cmp <2 x i8> %a, <2 x i8> %b
when getSetCCResultType returns <2 x i32>, the assertion
that the (MaskTy.getSizeInBits() == Op1.getValueType().getSizeInBits())
is hit.

No test since I don't think I can hit this with any of the current
targets. The R600/SI implementation would break, since it returns a
vector of i1 for this, but it doesn't reach ExpandSELECT for other
reasons.

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

11 years agoUse StringRef::npos for StringRef instead of std::string one
Matt Arsenault [Tue, 10 Sep 2013 00:41:53 +0000 (00:41 +0000)]
Use StringRef::npos for StringRef instead of std::string one

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

11 years agollvm/test/DebugInfo/dwarf-public-names.ll: Mark it as XFAIL for PECOFF targets, for...
NAKAMURA Takumi [Tue, 10 Sep 2013 00:28:23 +0000 (00:28 +0000)]
llvm/test/DebugInfo/dwarf-public-names.ll: Mark it as XFAIL for PECOFF targets, for now. Investigating.

FIXME: llvm-dwarfdump doesn't handle PECOFF.

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

11 years agoRevert r190366. It was breaking build bots.
Bill Wendling [Tue, 10 Sep 2013 00:20:27 +0000 (00:20 +0000)]
Revert r190366. It was breaking build bots.

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

11 years agoEnable -misched-cyclicpath by default.
Andrew Trick [Mon, 9 Sep 2013 23:31:14 +0000 (23:31 +0000)]
Enable -misched-cyclicpath by default.

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

11 years agoUse a default value for the prologue's debug location.
Bill Wendling [Mon, 9 Sep 2013 23:28:15 +0000 (23:28 +0000)]
Use a default value for the prologue's debug location.

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

11 years agoDebug Info: In DIBuilder, the context fields of a TAG_inheritance and a
Manman Ren [Mon, 9 Sep 2013 23:07:58 +0000 (23:07 +0000)]
Debug Info: In DIBuilder, the context fields of a TAG_inheritance and a
TAG_friend are updated to use scope reference.

Added testing cases to verify that class with inheritance can be uniqued.

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

11 years agoDebug Info: move DIScope::getContext back from DwarfDebug.
Manman Ren [Mon, 9 Sep 2013 22:35:23 +0000 (22:35 +0000)]
Debug Info: move DIScope::getContext back from DwarfDebug.

This partially reverts r190330. DIScope::getContext now returns DIScopeRef
instead of DIScope. We construct a DIScopeRef from DIScope when we are
dealing with subprogram, lexical block or name space.

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

11 years agomi-sched: smooth out the cyclicpath heuristic.
Andrew Trick [Mon, 9 Sep 2013 22:28:08 +0000 (22:28 +0000)]
mi-sched: smooth out the cyclicpath heuristic.

Arnold's idea.

I generally try to avoid stateful heuristics because it can make
debugging harder. However, we need a way to prevent the latency
priority from dominating, and it somewhat makes sense to schedule
aggressively for latency only within an issue group.

Swift in particular likes this, and it doesn't hurt anyone else:
| Benchmarks/MiBench/consumer-lame              |  10.39% |
| Benchmarks/Misc/himenobmtxpa                  |   9.63% |

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

11 years agowhite spaces and long lines
Jack Carter [Mon, 9 Sep 2013 22:02:08 +0000 (22:02 +0000)]
white spaces and long lines

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

11 years agoDon't shrink atomic ops to bool in GlobalOpt.
Eli Friedman [Mon, 9 Sep 2013 22:00:13 +0000 (22:00 +0000)]
Don't shrink atomic ops to bool in GlobalOpt.

LLVM IR doesn't currently allow atomic bool load/store operations, and the
transformation is dubious anyway because it isn't profitable on all platforms.

PR17163.

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

11 years agoSet the encoding to '0' if we don't have an MAB.
Bill Wendling [Mon, 9 Sep 2013 21:22:44 +0000 (21:22 +0000)]
Set the encoding to '0' if we don't have an MAB.

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

11 years ago[InstCombiner] Expose opportunities to merge subtract and comparison.
Quentin Colombet [Mon, 9 Sep 2013 20:56:48 +0000 (20:56 +0000)]
[InstCombiner] Expose opportunities to merge subtract and comparison.

Several architectures use the same instruction to perform both a comparison and
a subtract. The instruction selection framework does not allow to consider
different basic blocks to expose such fusion opportunities.

Therefore, these instructions are “merged” by CSE at MI IR level.

To increase the likelihood of CSE to apply in such situation, we reorder the
operands of the comparison, when they have the same complexity, so that they
matches the order of the most frequent subtract.
E.g.,

icmp A, B
...
sub B, A

<rdar://problem/14514580>

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

11 years agoDebug Info Testing: remove a commented out line.
Manman Ren [Mon, 9 Sep 2013 20:45:34 +0000 (20:45 +0000)]
Debug Info Testing: remove a commented out line.

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

11 years agoAnother attempt to fix windows buildbots.
Bill Wendling [Mon, 9 Sep 2013 20:29:32 +0000 (20:29 +0000)]
Another attempt to fix windows buildbots.

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

11 years agoAttempt to fix buildbots by giving an explicit output to the llvm-mc command.
Bill Wendling [Mon, 9 Sep 2013 20:22:38 +0000 (20:22 +0000)]
Attempt to fix buildbots by giving an explicit output to the llvm-mc command.

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

11 years agoExpand test to make sure that we can generate compact unwind from an ASM file.
Bill Wendling [Mon, 9 Sep 2013 20:12:36 +0000 (20:12 +0000)]
Expand test to make sure that we can generate compact unwind from an ASM file.

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

11 years agoExpand test to make sure that we can generate compact unwind from an ASM file.
Bill Wendling [Mon, 9 Sep 2013 20:10:54 +0000 (20:10 +0000)]
Expand test to make sure that we can generate compact unwind from an ASM file.

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

11 years agoAlways add global names. We're adding them in the rest of the code
Eric Christopher [Mon, 9 Sep 2013 20:03:20 +0000 (20:03 +0000)]
Always add global names. We're adding them in the rest of the code
as well as types.

No functional change as they're not emitted unless the option
is true anyhow.

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

11 years agoRename for consistency.
Eric Christopher [Mon, 9 Sep 2013 20:03:17 +0000 (20:03 +0000)]
Rename for consistency.

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

11 years agoAdd the gnu pubnames and pubtypes sections to the mc object file
Eric Christopher [Mon, 9 Sep 2013 20:03:14 +0000 (20:03 +0000)]
Add the gnu pubnames and pubtypes sections to the mc object file
handling.

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

11 years agoAdd constant defines for gnu pubnames and gnu pubtypes - they're used
Eric Christopher [Mon, 9 Sep 2013 20:03:11 +0000 (20:03 +0000)]
Add constant defines for gnu pubnames and gnu pubtypes - they're used
for the gdb index as the names convey.

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

11 years agoFormatting.
Eric Christopher [Mon, 9 Sep 2013 20:03:08 +0000 (20:03 +0000)]
Formatting.

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

11 years agoCall generateCompactUnwindEncodings() right before we need to output the frame inform...
Bill Wendling [Mon, 9 Sep 2013 19:48:37 +0000 (19:48 +0000)]
Call generateCompactUnwindEncodings() right before we need to output the frame information.

There are more than one paths to where the frame information is emitted. Place
the call to generateCompactUnwindEncodings() into the method which outputs the
frame information, thus ensuring that the encoding is there for every path. This
involved threading the MCAsmBackend object through to this method.

<rdar://problem/13623355>

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

11 years agoDebug Info: Use DIScopeRef for DIType::getContext.
Manman Ren [Mon, 9 Sep 2013 19:47:11 +0000 (19:47 +0000)]
Debug Info: Use DIScopeRef for DIType::getContext.

In DIBuilder, the context field of a TAG_member is updated to use the
scope reference. Verifier is updated accordingly.

DebugInfoFinder now needs to generate a type identifier map to have
access to the actual scope. Same applies for BreakpointPrinter.

processModule of DebugInfoFinder is called during initialization phase
of the verifier to make sure the type identifier map is constructed early
enough.

We are now able to unique a simple class as demonstrated by the added
testing case.

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

11 years agoUpdate CMake file to fix buildbots.
Bob Wilson [Mon, 9 Sep 2013 19:25:11 +0000 (19:25 +0000)]
Update CMake file to fix buildbots.

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

11 years agoDebug Info: move DIScope::getContext to DwarfDebug.
Manman Ren [Mon, 9 Sep 2013 19:23:58 +0000 (19:23 +0000)]
Debug Info: move DIScope::getContext to DwarfDebug.

DIScope::getContext is a wrapper function that calls the specific getContext
method on each subclass. When we switch DIType::getContext to return DIScopeRef
instead of DIScope, DIScope::getContext can no longer return a DIScope without
a type identifier map.

DIScope::getContext is only used by DwarfDebug, so we move it to DwarfDebug
to have easy access to the type identifier map.

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

11 years agoRevert patches to add case-range support for PR1255.
Bob Wilson [Mon, 9 Sep 2013 19:14:35 +0000 (19:14 +0000)]
Revert patches to add case-range support for PR1255.

The work on this project was left in an unfinished and inconsistent state.
Hopefully someone will eventually get a chance to implement this feature, but
in the meantime, it is better to put things back the way the were.  I have
left support in the bitcode reader to handle the case-range bitcode format,
so that we do not lose bitcode compatibility with the llvm 3.3 release.

This reverts the following commits: 155464, 156374, 156377, 156613, 156704,
156757, 156804 156808, 156985, 157046, 157112, 157183, 157315, 157384, 157575,
157576, 157586, 157612, 157810, 157814, 157815, 157880, 157881, 157882, 157884,
157887, 157901, 158979, 157987, 157989, 158986, 158997, 159076, 159101, 159100,
159200, 159201, 159207, 159527, 159532, 159540, 159583, 159618, 159658, 159659,
159660, 159661, 159703, 159704, 160076, 167356, 172025, 186736

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

11 years ago[docs] Fix Sphinx warning.
Sean Silva [Mon, 9 Sep 2013 19:13:28 +0000 (19:13 +0000)]
[docs] Fix Sphinx warning.

Adornments need to be at least as long as the thing they adorn.

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

11 years ago[docs] Fix some Sphinx toctree warnings.
Sean Silva [Mon, 9 Sep 2013 19:09:00 +0000 (19:09 +0000)]
[docs] Fix some Sphinx toctree warnings.

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

11 years agoDebug Info: Move isSubprogramContext from DebugInfo to DwarfDebug.
Manman Ren [Mon, 9 Sep 2013 19:05:21 +0000 (19:05 +0000)]
Debug Info: Move isSubprogramContext from DebugInfo to DwarfDebug.

This helper function needs the type identifier map when we switch
DIType::getContext to return DIScopeRef instead of DIScope.

Since isSubprogramContext is used by DwarfDebug only, We move it to DwarfDebug
to have easy access to the map.

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

11 years ago[docs] Some typographical fixes.
Sean Silva [Mon, 9 Sep 2013 19:05:03 +0000 (19:05 +0000)]
[docs] Some typographical fixes.

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

11 years agoDebug Info: Rename DITypeRef to DIScopeRef.
Manman Ren [Mon, 9 Sep 2013 19:03:51 +0000 (19:03 +0000)]
Debug Info: Rename DITypeRef to DIScopeRef.

A reference to a scope is more general than a reference to a type since
DIType is a subclass of DIScope.

A reference to a type can be either an identifier for the type or
the DIType itself, while a reference to a scope can be either an
identifier for the type (when the scope is indeed a type) or the
DIScope itself. A reference to a type and a reference to a scope
will be resolved in the same way. The only difference is in the
verifier when a field is a reference to a type (i.e. the containing
type field of a DICompositeType) or a field is a reference to a scope
(i.e. the context field of a DIType).

This is to get ready for switching DIType::getContext to return
DIScopeRef instead of DIScope.

Tighten up isTypeRef and isScopeRef to make sure the identifier is not
empty and the MDNode is DIType for TypeRef and DIScope for ScopeRef.

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

11 years agoDebug Info: Update isScope to make sure DIType is a scope and
Manman Ren [Mon, 9 Sep 2013 19:00:55 +0000 (19:00 +0000)]
Debug Info: Update isScope to make sure DIType is a scope and
TAG_file_type is also a scope.

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

11 years ago[mips] When double precision loads and stores are split into two i32 loads and
Akira Hatanaka [Mon, 9 Sep 2013 17:59:32 +0000 (17:59 +0000)]
[mips] When double precision loads and stores are split into two i32 loads and
stores, make sure the load or store that accesses the higher half does not have
an alignment that is larger than the offset from the original address.

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

11 years ago[stackprotector] Modernize code with IRBuilder
Benjamin Kramer [Mon, 9 Sep 2013 17:38:01 +0000 (17:38 +0000)]
[stackprotector] Modernize code with IRBuilder

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

11 years ago[ARMv8] Prevent generation of deprecated IT blocks on ARMv8 in Thumb mode.
Joey Gouly [Mon, 9 Sep 2013 14:21:49 +0000 (14:21 +0000)]
[ARMv8] Prevent generation of deprecated IT blocks on ARMv8 in Thumb mode.
IT blocks can only be one instruction lonf, and can only contain a subset of
the 16 instructions.

Patch by Artyom Skrobov!

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

11 years agoA better way to silence the warning in MSVC (replaces r190304).
Aaron Ballman [Mon, 9 Sep 2013 14:17:30 +0000 (14:17 +0000)]
A better way to silence the warning in MSVC (replaces r190304).

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