oota-llvm.git
11 years agoFurther reduce usage of sys::Path in bugpoint.
Rafael Espindola [Thu, 13 Jun 2013 16:22:26 +0000 (16:22 +0000)]
Further reduce usage of sys::Path in bugpoint.

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

11 years agoTry to fix the build with libstdc++ 4.4.
Rafael Espindola [Thu, 13 Jun 2013 15:52:54 +0000 (15:52 +0000)]
Try to fix the build with libstdc++ 4.4.

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

11 years agoReduce sys::Path usage in bugpoint.
Rafael Espindola [Thu, 13 Jun 2013 15:47:11 +0000 (15:47 +0000)]
Reduce sys::Path usage in bugpoint.

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

11 years agoX86: Make the cmov aliases work with intel syntax too.
Benjamin Kramer [Thu, 13 Jun 2013 15:45:24 +0000 (15:45 +0000)]
X86: Make the cmov aliases work with intel syntax too.

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

11 years ago[Support] Fix handle and memory leak for processes that are not waited for
Reid Kleckner [Thu, 13 Jun 2013 15:27:17 +0000 (15:27 +0000)]
[Support] Fix handle and memory leak for processes that are not waited for

Execute's Data parameter is now optional, so we won't allocate memory
for it on Windows and we'll close the process handle.

The Unix code should probably do something similar to avoid accumulation
of zombie children that haven't been waited on.

Tested on Linux and Windows.

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

11 years agoZero-initializing variables; fixes a build breakage introduced in r183864.
Aaron Ballman [Thu, 13 Jun 2013 14:39:07 +0000 (14:39 +0000)]
Zero-initializing variables; fixes a build breakage introduced in r183864.

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

11 years agoPrint ConstantPool entries initialized to Values with WriteAsOperand instead of
Dan Gohman [Wed, 12 Jun 2013 22:19:19 +0000 (22:19 +0000)]
Print ConstantPool entries initialized to Values with WriteAsOperand instead of
operator<< so that functions are printed as just their name instead of as their
entire definition, which is excessively verbose in this context.

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

11 years ago[Win] Put ChangeStdinToBinary ChangeStdoutToBinary ChangeStderrToBinary in sys.
Rafael Espindola [Wed, 12 Jun 2013 21:25:04 +0000 (21:25 +0000)]
[Win] Put ChangeStdinToBinary ChangeStdoutToBinary ChangeStderrToBinary in sys.

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

11 years agos/Void/void.
Rafael Espindola [Wed, 12 Jun 2013 21:16:07 +0000 (21:16 +0000)]
s/Void/void.

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

11 years agoAttempt at fixing the windows build.
Rafael Espindola [Wed, 12 Jun 2013 21:11:50 +0000 (21:11 +0000)]
Attempt at fixing the windows build.

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

11 years agoRemove the program class.
Rafael Espindola [Wed, 12 Jun 2013 20:58:35 +0000 (20:58 +0000)]
Remove the program class.

It was only used to implement ExecuteAndWait and ExecuteNoWait. Expose just
those two functions and make Execute and Wait implementations details.

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

11 years agoRevert r183854 (PPC: Fix switch warnings from r183841)
David Blaikie [Wed, 12 Jun 2013 20:57:32 +0000 (20:57 +0000)]
Revert r183854 (PPC: Fix switch warnings from r183841)

Now that the PRED_BAD has been removed, this is failing the Clang
-Werror build due to -Wcovered-switch-default.

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

11 years agoAdd global versions of some Program static methods.
Rafael Espindola [Wed, 12 Jun 2013 20:42:59 +0000 (20:42 +0000)]
Add global versions of some Program static methods.

This is a temporary stepping stone for moving them out of Program.

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

11 years ago[PowerPC] Remove PRED_BAD from PPC::Predicate enumeration.
Bill Schmidt [Wed, 12 Jun 2013 20:22:24 +0000 (20:22 +0000)]
[PowerPC] Remove PRED_BAD from PPC::Predicate enumeration.

I'm taking David Blaikie's suggestion to use an
Optional<PPC::Predicate> return value instead.  That's the right
solution for this problem.  Thanks for pointing out that possibility!

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

11 years ago[PowerPC] Fix switch warnings from r183841.
Bill Schmidt [Wed, 12 Jun 2013 19:20:32 +0000 (19:20 +0000)]
[PowerPC] Fix switch warnings from r183841.

Introducing PRED_BAD caused some unexpected warnings that are now
suppressed.

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

11 years agoreadobj: Dump PE/COFF optional records.
Rui Ueyama [Wed, 12 Jun 2013 19:10:33 +0000 (19:10 +0000)]
readobj: Dump PE/COFF optional records.

These records are mandatory for executables and are used by the loader.

Reviewers: rafael

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

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

11 years agoAlways remove an alias when we rename the target.
Rafael Espindola [Wed, 12 Jun 2013 16:45:47 +0000 (16:45 +0000)]
Always remove an alias when we rename the target.

Should fix the dragonegg build bots.

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

11 years ago[PowerPC] Expose some calling convention functions in PPCISelLowering.h.
Bill Schmidt [Wed, 12 Jun 2013 16:39:22 +0000 (16:39 +0000)]
[PowerPC] Expose some calling convention functions in PPCISelLowering.h.

This is a preparatory patch for fast-isel support.  The instruction
selector will need to access some functions in PPCGenCallingConv.inc,
which in turn requires several helper functions to be defined.  These
are currently defined near the only use of PCCGenCallingConv.inc,
inside PPCISelLowering.cpp.  This patch moves the declaration of the
functions into the associated header file to provide the needed
visibility.

No functional change intended.

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

11 years agoConvert test to FileCheck.
Rafael Espindola [Wed, 12 Jun 2013 16:35:53 +0000 (16:35 +0000)]
Convert test to FileCheck.

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

11 years agoDon't use PathV1 in CommandLine.cpp.
Rafael Espindola [Wed, 12 Jun 2013 15:37:27 +0000 (15:37 +0000)]
Don't use PathV1 in CommandLine.cpp.

No functionality change.

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

11 years agoAdd artificial PRED_BAD to PPC::Predicate enumeration.
Bill Schmidt [Wed, 12 Jun 2013 15:14:42 +0000 (15:14 +0000)]
Add artificial PRED_BAD to PPC::Predicate enumeration.

Allows returning a PPC::Predicate from a function with a no-predicate
value possible.  Preparatory patch for fast-isel on PPC64 ELF.  No
behavioral change intended.

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

11 years agoInline Path::isBitcodeFile into only use and remove it.
Rafael Espindola [Wed, 12 Jun 2013 15:13:57 +0000 (15:13 +0000)]
Inline Path::isBitcodeFile into only use and remove it.

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

11 years agoRemove Path::getMagicNumber.
Rafael Espindola [Wed, 12 Jun 2013 15:07:11 +0000 (15:07 +0000)]
Remove Path::getMagicNumber.

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

11 years agoRemove Path::hasMagicNumber.
Rafael Espindola [Wed, 12 Jun 2013 15:04:59 +0000 (15:04 +0000)]
Remove Path::hasMagicNumber.

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

11 years agoRemove Path::isAbsolute.
Rafael Espindola [Wed, 12 Jun 2013 15:02:39 +0000 (15:02 +0000)]
Remove Path::isAbsolute.

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

11 years agoRemove Path::isAbsolute().
Rafael Espindola [Wed, 12 Jun 2013 14:47:33 +0000 (14:47 +0000)]
Remove Path::isAbsolute().

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

11 years ago[MC/DWARF] Support .debug_frame / .debug_line code alignment factors
Ulrich Weigand [Wed, 12 Jun 2013 14:46:54 +0000 (14:46 +0000)]
[MC/DWARF] Support .debug_frame / .debug_line code alignment factors

I've been comparing the object file output of LLVM's integrated
assembler against the external assembler on PowerPC, and one
area where differences still remain are in DWARF sections.

In particular, the GNU assembler generates .debug_frame and
.debug_line sections using a code alignment factor of 4, since
all PowerPC instructions have size 4 and must be aligned to a
multiple of 4.  However, current MC code hard-codes a code
alignment factor of 1.

This patch changes this by adding a "minimum instruction alignment"
data element to MCAsmInfo and using this as code alignment factor.

This requires passing a MCContext into MCDwarfLineAddr::Encode
and MCDwarfLineAddr::EncodeAdvanceLoc.  Note that one caller,
MCDwarfLineAddr::Write, didn't actually have that information
available.  However, it turns out that this routine is in fact
never used in the whole code base, so the patch simply removes
it.  If it turns out to be needed again at a later time, it
could be re-added with an updated interface.

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

11 years agoRemove Path::getSuffix.
Rafael Espindola [Wed, 12 Jun 2013 14:32:51 +0000 (14:32 +0000)]
Remove Path::getSuffix.

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

11 years agoRemove sys::CopyFile.
Rafael Espindola [Wed, 12 Jun 2013 14:16:52 +0000 (14:16 +0000)]
Remove sys::CopyFile.

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

11 years agoFix 'gcc -flto' builds for unittest binaries (undefined reference to
Patrik Hagglund [Wed, 12 Jun 2013 14:15:21 +0000 (14:15 +0000)]
Fix 'gcc -flto' builds for unittest binaries (undefined reference to
`typeinfo for llvm::cl::GenericOptionValue').

Remove an "anchor" method for an abstract class. (This does not
increase the number of vtables.)

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

11 years ago[PowerPC] Use assembler source in MC tests
Ulrich Weigand [Wed, 12 Jun 2013 14:14:18 +0000 (14:14 +0000)]
[PowerPC] Use assembler source in MC tests

A couple of old test cases in test/MC/PowerPC were still using
LLVM IR.  Now that we have a working assembler, we can move
them to assembler tests instead:
  ppc64-initial-cfa.ll
  ppc64-relocs-01.ll
  ppc64-tls-relocs-01.ll

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

11 years agoRemove the old file memory mapping functions.
Rafael Espindola [Wed, 12 Jun 2013 14:11:15 +0000 (14:11 +0000)]
Remove the old file memory mapping functions.

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

11 years agoRemove Path::createFileOnDisk.
Rafael Espindola [Wed, 12 Jun 2013 13:59:17 +0000 (13:59 +0000)]
Remove Path::createFileOnDisk.

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

11 years agoRemove Path::makeExecutableOnDisk.
Rafael Espindola [Wed, 12 Jun 2013 13:55:07 +0000 (13:55 +0000)]
Remove Path::makeExecutableOnDisk.

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

11 years agoUpdate Release Process doc
Renato Golin [Wed, 12 Jun 2013 11:35:33 +0000 (11:35 +0000)]
Update Release Process doc

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

11 years agoFix gcc -flto build, by adding LLVM_ATTRIBUTE_USED to
Patrik Hagglund [Wed, 12 Jun 2013 08:45:39 +0000 (08:45 +0000)]
Fix gcc -flto build, by adding LLVM_ATTRIBUTE_USED to
LLVMX86CompilationCallback2, called from inline asm.

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

11 years ago[yaml2obj] Remove fragile test case.
Sean Silva [Wed, 12 Jun 2013 00:01:26 +0000 (00:01 +0000)]
[yaml2obj] Remove fragile test case.

This test case was a "sanity check"/"breathing" test case at first, but
is really fragile, which impairs changes to yaml2obj.

`test/Object/yaml2obj-elf-bits-endian.test` is much more robust and
serves as an adequate sanity check.

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

11 years ago80-cols
Sean Silva [Wed, 12 Jun 2013 00:01:22 +0000 (00:01 +0000)]
80-cols

This slipped in during a hasty renaming.

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

11 years agoCorrect the def registers for the 8bit x86 divide instructions to
Eric Christopher [Tue, 11 Jun 2013 23:41:44 +0000 (23:41 +0000)]
Correct the def registers for the 8bit x86 divide instructions to
match the comments and what the instruction actually does. Noticed
on inspection.

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

11 years agoUse the Copy we defined above here.
Eric Christopher [Tue, 11 Jun 2013 23:41:41 +0000 (23:41 +0000)]
Use the Copy we defined above here.

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

11 years agoFormatting.
Eric Christopher [Tue, 11 Jun 2013 23:41:38 +0000 (23:41 +0000)]
Formatting.

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

11 years agoFix CMakeLists.
Akira Hatanaka [Tue, 11 Jun 2013 22:36:30 +0000 (22:36 +0000)]
Fix CMakeLists.

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

11 years ago[mips] Add an IR transformation pass that optimizes calls to sqrt.
Akira Hatanaka [Tue, 11 Jun 2013 22:21:44 +0000 (22:21 +0000)]
[mips] Add an IR transformation pass that optimizes calls to sqrt.

The pass emits a call to sqrt that has attribute "read-none". This call will be
converted to an ISD::FSQRT node during DAG construction, which will turn into
a mips native sqrt instruction.

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

11 years agoMove PathV2.h to Path.h
Rafael Espindola [Tue, 11 Jun 2013 22:21:28 +0000 (22:21 +0000)]
Move PathV2.h to Path.h

Most clients have already been moved from Path V1 to V2. The ones using V1
now include PathV1.h explicitly.

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

11 years agoARM FastISel fix sext/zext fold
JF Bastien [Tue, 11 Jun 2013 22:13:46 +0000 (22:13 +0000)]
ARM FastISel fix sext/zext fold

Sign- and zero-extension folding was slightly incorrect because it wasn't checking that the shift on extensions was zero. Further, I recently added AND rd, rn, #255 as a form of 8-bit zero extension, and failed to add the folding code for it.

This patch fixes both issues.

This patch fixes both, and the test should remain the same:
  test/CodeGen/ARM/fast-isel-fold.ll

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

11 years agoMake host ARM CPU feature detection independent of the vendor
Tobias Grosser [Tue, 11 Jun 2013 21:45:01 +0000 (21:45 +0000)]
Make host ARM CPU feature detection independent of the vendor

For ARM on linux we use /proc/cpuinfo to detect the host CPU's features.
Linux derives these values without ever looking at the vendor of the
specific CPU implementation. Hence, it adds little value, if we parse
the output of /proc/cpuinfo only for certain vendors.

This patch enables us to derive the correct feature flags e.g. for Qualcomm
CPUs.

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

11 years ago[PECOFF] Remove COFF header from PE header for simplicity.
Rui Ueyama [Tue, 11 Jun 2013 21:39:48 +0000 (21:39 +0000)]
[PECOFF] Remove COFF header from PE header for simplicity.

COFF header is always present both in executable and in object file. PE header
is present only in executable. So the natural way to handle PE/COFF file is
treating COFF is mandatory header and PE is optional. Current data structre
does not allow it, because PE header includes COFF header. Removing COFF
header will simplify the code to handle PE/COFF files.

Reviewers: Bigcheese

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

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

11 years agoInclude PathV1.h in files that use it.
Rafael Espindola [Tue, 11 Jun 2013 20:00:56 +0000 (20:00 +0000)]
Include PathV1.h in files that use it.

This is preparation for replacing Path.h with PathV2.h.

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

11 years agoRemove Path::getDirname.
Rafael Espindola [Tue, 11 Jun 2013 19:32:57 +0000 (19:32 +0000)]
Remove Path::getDirname.

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

11 years agoRemove Path::getBasename.
Rafael Espindola [Tue, 11 Jun 2013 19:29:48 +0000 (19:29 +0000)]
Remove Path::getBasename.

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

11 years agoRemove Path::getLast.
Rafael Espindola [Tue, 11 Jun 2013 19:25:17 +0000 (19:25 +0000)]
Remove Path::getLast.

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

11 years agoRemove GetDLLSuffix.
Rafael Espindola [Tue, 11 Jun 2013 19:18:05 +0000 (19:18 +0000)]
Remove GetDLLSuffix.

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

11 years agoRemove GetRootDirectory.
Rafael Espindola [Tue, 11 Jun 2013 19:13:52 +0000 (19:13 +0000)]
Remove GetRootDirectory.

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

11 years agoRemove GetUserHomeDirectory.
Rafael Espindola [Tue, 11 Jun 2013 19:08:15 +0000 (19:08 +0000)]
Remove GetUserHomeDirectory.

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

11 years agoDon't define LTDL_SHLIBPATH_VAR.
Rafael Espindola [Tue, 11 Jun 2013 19:04:13 +0000 (19:04 +0000)]
Don't define LTDL_SHLIBPATH_VAR.

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

11 years agoRemove GetSystemLibraryPaths.
Rafael Espindola [Tue, 11 Jun 2013 18:58:47 +0000 (18:58 +0000)]
Remove GetSystemLibraryPaths.

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

11 years agoDon't define LLVM_LIBDIR, it is not used anymore.
Rafael Espindola [Tue, 11 Jun 2013 18:52:11 +0000 (18:52 +0000)]
Don't define LLVM_LIBDIR, it is not used anymore.

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

11 years ago[mips] Use function TargetInstrInfo::getRegClass.
Akira Hatanaka [Tue, 11 Jun 2013 18:48:16 +0000 (18:48 +0000)]
[mips] Use function TargetInstrInfo::getRegClass.

No functionality changes.

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

11 years agoRemove Path::GetBitcodeLibraryPaths.
Rafael Espindola [Tue, 11 Jun 2013 18:45:35 +0000 (18:45 +0000)]
Remove Path::GetBitcodeLibraryPaths.

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

11 years agoRemove unused FindLibrary function.
Rafael Espindola [Tue, 11 Jun 2013 18:41:07 +0000 (18:41 +0000)]
Remove unused FindLibrary function.

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

11 years agoRemove sys::identifyFileType.
Rafael Espindola [Tue, 11 Jun 2013 18:18:02 +0000 (18:18 +0000)]
Remove sys::identifyFileType.

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

11 years agoFix documentation on the path to Bitcode reader/writer
Michael Liao [Tue, 11 Jun 2013 18:09:21 +0000 (18:09 +0000)]
Fix documentation on the path to Bitcode reader/writer

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

11 years agoConvert another use of sys::identifyFileType.
Rafael Espindola [Tue, 11 Jun 2013 18:05:26 +0000 (18:05 +0000)]
Convert another use of sys::identifyFileType.

No functionality change.

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

11 years agoConvert another use of sys::identifyFileType.
Rafael Espindola [Tue, 11 Jun 2013 18:01:14 +0000 (18:01 +0000)]
Convert another use of sys::identifyFileType.

No functionality change.

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

11 years agoChange how globalopt handles aliases in llvm.used.
Rafael Espindola [Tue, 11 Jun 2013 17:48:06 +0000 (17:48 +0000)]
Change how globalopt handles aliases in llvm.used.

Instead of a custom implementation of replaceAllUsesWith, we just call
replaceAllUsesWith and recreate llvm.used and llvm.compiler-used.

This change is particularity interesting because it makes llvm see
through what clang is doing with static used functions in extern "C"
contexts. With this change, running clang -O2 in

extern "C" {
  __attribute__((used)) static void foo() {}
}

produces

@llvm.used = appending global [1 x i8*] [i8* bitcast (void ()* @foo to
i8*)], section "llvm.metadata"
define internal void @foo() #0 {
entry:
  ret void
}

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

11 years agoConvert another use of sys::identifyFileType.
Rafael Espindola [Tue, 11 Jun 2013 17:28:56 +0000 (17:28 +0000)]
Convert another use of sys::identifyFileType.

No functionality change.

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

11 years agoPort r183666 to identify_magic.
Rafael Espindola [Tue, 11 Jun 2013 17:25:45 +0000 (17:25 +0000)]
Port r183666 to identify_magic.

It will be tested in the next commit which moves another user to identify_magic.

Original message:

Fix an out of bounds array access.

We were looking at Magic[5] without checking Length. Since this path would not
return unless Length >= 18 anyway, just move the >= 18 check up.

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

11 years agoFix variable name.
Rafael Espindola [Tue, 11 Jun 2013 17:22:12 +0000 (17:22 +0000)]
Fix variable name.

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

11 years agoFix variable name style. Don't cast to and from int.
Rafael Espindola [Tue, 11 Jun 2013 15:29:10 +0000 (15:29 +0000)]
Fix variable name style. Don't cast to and from int.

This enables the compiler to see the enum and produce warnings about a switch
not being fully covered. Fix one of these warnings.

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

11 years agoConvert another use of sys::identifyFileType.
Rafael Espindola [Tue, 11 Jun 2013 15:19:04 +0000 (15:19 +0000)]
Convert another use of sys::identifyFileType.

No functionality change.

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

11 years agoConvert another use of sys::identifyFileType.
Rafael Espindola [Tue, 11 Jun 2013 15:09:43 +0000 (15:09 +0000)]
Convert another use of sys::identifyFileType.

No functionality change.

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

11 years agoConvert a use of sys::identifyFileType to sys::fs::identify_magic.
Rafael Espindola [Tue, 11 Jun 2013 14:39:59 +0000 (14:39 +0000)]
Convert a use of sys::identifyFileType to sys::fs::identify_magic.

No functionality change.

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

11 years agoR600: Make helper functions static.
Benjamin Kramer [Tue, 11 Jun 2013 13:32:25 +0000 (13:32 +0000)]
R600: Make helper functions static.

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

11 years agoRequire members of llvm.used to be named.
Rafael Espindola [Tue, 11 Jun 2013 13:18:13 +0000 (13:18 +0000)]
Require members of llvm.used to be named.

The effect of llvm.used is to introduce an invisible reference, so this seems
a reasonable restriction. It will be used to provide an easy ordering of
the entries in llvm.used.

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

11 years agoRework r183728, suppress assert(0) for now. Its behavior depends on assertions on...
NAKAMURA Takumi [Tue, 11 Jun 2013 10:01:42 +0000 (10:01 +0000)]
Rework r183728, suppress assert(0) for now. Its behavior depends on assertions on win32 hosts.

FIXME: Introduce yet another checker but assert(0).

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

11 years agoIt adds support for negative zero offsets for loads and stores.
Mihai Popa [Tue, 11 Jun 2013 09:48:35 +0000 (09:48 +0000)]
It adds support for negative zero offsets for loads and stores.
Negative zero is returned by the primary expression parser as INT32_MIN, so all that the method needs to do is to accept this value.
Behavior already present for Thumb2.

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

11 years agoThis patch adds support for FPINST/FPINST2 as operands to vmsr/vmrs. These are option...
Mihai Popa [Tue, 11 Jun 2013 09:39:51 +0000 (09:39 +0000)]
This patch adds support for FPINST/FPINST2 as operands to vmsr/vmrs. These are optional registers that may be supported some ARM implementations to aid with resolution of floating point exceptions. The manual pages for vmsr and vmrs do not detail their use. Encodings and other information can be found in ARM Architecture Reference Manual section F, chapter 6, paragraph 3.

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

11 years agoARM: Enforce decoding rules for VLDn instructions
Amaury de la Vieuville [Tue, 11 Jun 2013 08:14:14 +0000 (08:14 +0000)]
ARM: Enforce decoding rules for VLDn instructions

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

11 years agoARM: Fix STREX/LDREX reecoding
Amaury de la Vieuville [Tue, 11 Jun 2013 08:03:20 +0000 (08:03 +0000)]
ARM: Fix STREX/LDREX reecoding

The decoded MCInst wasn't reencoded as the same instruction

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

11 years agoTweak a couple of tests on win32 hosts with +Asserts.
NAKAMURA Takumi [Tue, 11 Jun 2013 06:52:58 +0000 (06:52 +0000)]
Tweak a couple of tests on win32 hosts with +Asserts.

  - Don't use assert(0), or tests may pass or fail according to assertions.
  - For now, The tests are marked as XFAIL for win32 hosts.

FIXME: Could we avoid XFAIL to specify triple in the RUN lines?

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

11 years agoARMAsmBackend.cpp: Use Triple::isOSBinFormatCOFF() instead of isOSWindows().
NAKAMURA Takumi [Tue, 11 Jun 2013 06:52:43 +0000 (06:52 +0000)]
ARMAsmBackend.cpp: Use Triple::isOSBinFormatCOFF() instead of isOSWindows().

FYI, isOSBinFormatCOFF() is as same as isOSWindows(), on trunk.

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

11 years agoWhitespace.
NAKAMURA Takumi [Tue, 11 Jun 2013 06:52:36 +0000 (06:52 +0000)]
Whitespace.

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

11 years agoFix dubious type name similar to member name.
Sean Silva [Tue, 11 Jun 2013 00:13:52 +0000 (00:13 +0000)]
Fix dubious type name similar to member name.

Should bring bots back to life.

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

11 years agoFix spurious semicolons.
Sean Silva [Mon, 10 Jun 2013 23:48:38 +0000 (23:48 +0000)]
Fix spurious semicolons.

Apparently these macros have semicolons inside of them already.

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

11 years ago[yaml2obj] Initial ELF support.
Sean Silva [Mon, 10 Jun 2013 23:44:15 +0000 (23:44 +0000)]
[yaml2obj] Initial ELF support.

Currently, only emitting the ELF header is supported (no sections or
segments).

The ELFYAML code organization is broadly similar to the COFFYAML code.

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

11 years agoARM: diagnose ARM/Thumb assembly switches on CPUs only supporting one.
Tim Northover [Mon, 10 Jun 2013 23:20:58 +0000 (23:20 +0000)]
ARM: diagnose ARM/Thumb assembly switches on CPUs only supporting one.

Some ARM CPUs only support ARM mode (ancient v4 ones, for example) and some
only support Thumb mode (M-class ones currently). This makes sure such CPUs
default to the correct mode and makes the AsmParser diagnose an attempt to
switch modes incorrectly.

rdar://14024354

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

11 years agoFix xemacs mode line, don't put them in .cpp files (just header files). No
Nick Lewycky [Mon, 10 Jun 2013 23:10:59 +0000 (23:10 +0000)]
Fix xemacs mode line, don't put them in .cpp files (just header files). No
functionality change.

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

11 years agoRemove a few fixmes, the only work we're doing is getting the string
Eric Christopher [Mon, 10 Jun 2013 22:24:10 +0000 (22:24 +0000)]
Remove a few fixmes, the only work we're doing is getting the string
to return and this is done all over.

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

11 years agoFix up comment.
Eric Christopher [Mon, 10 Jun 2013 22:24:07 +0000 (22:24 +0000)]
Fix up comment.

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

11 years agoRemove unused function.
Eric Christopher [Mon, 10 Jun 2013 21:59:28 +0000 (21:59 +0000)]
Remove unused function.

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

11 years agoIndentCount is only used within NDEBUG code.
Eric Christopher [Mon, 10 Jun 2013 20:58:53 +0000 (20:58 +0000)]
IndentCount is only used within NDEBUG code.

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

11 years agoX86: Stop LEA64_32r doing unspeakable things to its arguments.
Tim Northover [Mon, 10 Jun 2013 20:43:49 +0000 (20:43 +0000)]
X86: Stop LEA64_32r doing unspeakable things to its arguments.

Previously LEA64_32r went through virtually the entire backend thinking it was
using 32-bit registers until its blissful illusions were cruelly snatched away
by MCInstLower and 64-bit equivalents were substituted at the last minute.

This patch makes it behave normally, and take 64-bit registers as sources all
the way through. Previous uses (for 32-bit arithmetic) are accommodated via
SUBREG_TO_REG instructions which make the types and classes agree properly.

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

11 years agoAdd a missing 'e'.
Rafael Espindola [Mon, 10 Jun 2013 20:32:27 +0000 (20:32 +0000)]
Add a missing 'e'.

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

11 years agotblgen: Assert that InstRWs doesn't grows when we don't expect it.
Benjamin Kramer [Mon, 10 Jun 2013 20:19:35 +0000 (20:19 +0000)]
tblgen: Assert that InstRWs doesn't grows when we don't expect it.

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

11 years ago[PowerPC] Support extended sc mnemonic
Ulrich Weigand [Mon, 10 Jun 2013 17:19:43 +0000 (17:19 +0000)]
[PowerPC] Support extended sc mnemonic

A plain "sc" without argument is supposed to be treated like "sc 0"
by the assembler.  This patch adds a corresponding alias.

Problem reported by Joerg Sonnenberger.

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

11 years ago[PowerPC] Support branch mnemonics with implied CR0
Ulrich Weigand [Mon, 10 Jun 2013 17:19:15 +0000 (17:19 +0000)]
[PowerPC] Support branch mnemonics with implied CR0

The extended branch mnemonics are supposed to use an implied CR0
if there is no explicit condition register specified.  This patch
adds extra variants of the mnemonics to this effect.

Problem reported by Joerg Sonnenberger.

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

11 years ago[PowerPC] Use multiclass to generate extended branch mnemonics
Ulrich Weigand [Mon, 10 Jun 2013 17:18:29 +0000 (17:18 +0000)]
[PowerPC] Use multiclass to generate extended branch mnemonics

This patch removes some redundancy by generating the extended branch
mnemonics via a multiclass.

No change in behaviour expected.

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

11 years agoSilencing an MSVC warning about comparing signed and unsigned values.
Aaron Ballman [Mon, 10 Jun 2013 16:45:40 +0000 (16:45 +0000)]
Silencing an MSVC warning about comparing signed and unsigned values.

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

11 years agoRemove the old IdentifyFileType now that lld was updated.
Rafael Espindola [Mon, 10 Jun 2013 15:37:29 +0000 (15:37 +0000)]
Remove the old IdentifyFileType now that lld was updated.

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

11 years agoPass a StringRef to sys::identifyFileType.
Rafael Espindola [Mon, 10 Jun 2013 15:27:39 +0000 (15:27 +0000)]
Pass a StringRef to sys::identifyFileType.

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