Commit Graph

92914 Commits

Author SHA1 Message Date
Rafael Espindola
c65aba032e Move PrependMainExecutablePath next to its only user.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183980 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 15:12:13 +00:00
Rafael Espindola
d86dd4a29d Remove a use of sys::Path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183979 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 13:59:21 +00:00
Amaury de la Vieuville
a768a49548 ARM: fix thumb coprocessor instruction with pre-writeback disassembly
was        stc2 p0, c0, [r0]!
instead of stc2 p0, c0, [r0,#0]!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183975 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 11:21:35 +00:00
Benjamin Kramer
d25ec760cb X86: cvtpi2ps is just an SSE instruction with MMX operands. It has no AVX equivalent.
Give it the right register format so we can also emit it when AVX is enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183971 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 09:31:41 +00:00
Rafael Espindola
ea3e57d0a1 Remove unused header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183968 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 04:31:19 +00:00
JF Bastien
fe532ad6d6 Enable FastISel on ARM for Linux and NaCl, not MCJIT
This is a resubmit of r182877, which was reverted because it broken
MCJIT tests on ARM. The patch leaves MCJIT on ARM as it was before: only
enabled for iOS. I've CC'ed people from the original review and revert.

FastISel was only enabled for iOS ARM and Thumb2, this patch enables it
for ARM (not Thumb2) on Linux and NaCl, but not MCJIT.

Thumb2 support needs a bit more work, mainly around register class
restrictions.

The patch punts to SelectionDAG when doing TLS relocation on non-Darwin
targets. I will fix this and other FastISel-to-SelectionDAG failures in
a separate patch.

The patch also forces FastISel to retain frame pointers: iOS always
keeps them for backtracking (so emitted code won't change because of
this), but Linux was getting much worse code that was incorrect when
using big frames (such as test-suite's lencod). I'll also fix this in a
later patch, it will probably require a peephole so that FastISel
doesn't rematerialize frame pointers back-to-back.

The test changes are straightforward, similar to:
  http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130513/174279.html
They also add a vararg test that got dropped in that change.

I ran all of lnt test-suite on A15 hardware with --optimize-option=-O0
and all the tests pass. All the tests also pass on x86 make check-all. I
also re-ran the check-all tests that failed on ARM, and they all seem to
pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183966 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 02:49:43 +00:00
Sean Silva
97d37e8181 [yaml2obj] Add support for sh_addralign via AddressAlign key.
For consistency, change the address in the test case from 0xDEADBEEF to
0xCAFEBABE since 0xCAFEBABE that actually has a 2-byte alignment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183962 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 00:38:02 +00:00
Jakub Staszak
38084db681 Move #include from .h to .cpp file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183960 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 00:00:13 +00:00
Jakub Staszak
474ee461da Remove forward declaration of MachineBasicBlock. It is #included anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183958 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 23:53:13 +00:00
Jakub Staszak
b7eb5c0406 #include <climits> instead of <limits.h> in C++ header file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183957 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 23:49:09 +00:00
Sean Silva
2a7e79a30f [yaml2obj] Add support for specifying raw section content.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183955 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 22:20:01 +00:00
Sean Silva
45b812d1a7 [yaml2obj] Add sh_addr via Address key.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183954 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 22:19:54 +00:00
Sean Silva
274264ce2b [yaml2obj] Initial ELF section support.
The current functionality is extremely basic and a bit rough around the
edges, but it will flesh out in future commits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183953 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 22:19:48 +00:00
Rafael Espindola
26d36ab0cc Try to fix the windows build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183950 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 21:38:21 +00:00
Rafael Espindola
b7e2188f7f Don't use PathV1.h in Signals.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183947 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 21:16:58 +00:00
Rafael Espindola
6c3df8e93e Add a RemoveFileOnSignal that takes a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183943 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 21:01:17 +00:00
Rafael Espindola
bbf97ea7d5 Don't use PathV1.h in FileUtilities.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183941 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 20:41:00 +00:00
Rafael Espindola
675e0ac0bf Avoid using PathV1.h in Program.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183940 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 20:25:38 +00:00
Bill Schmidt
11729224bf [PowerPC] Disable fast-isel for existing -O0 tests for PowerPC.
This is a preliminary patch for fast instruction selection on
PowerPC.  Code generation can differ between DAG isel and fast isel.
Existing tests that specify -O0 were written to expect DAG isel.  Make
this explicit by adding -fast-isel=false to the tests.

In some cases specifying -fast-isel=false produces different code even
when there isn't a fast instruction selector specified.  This is
because TM.Options.EnableFastISel = 1 at -O0 whether or not a FastISel
object exists.  Thus disabling fast isel can actually produce less
conservative code.  Because of this, some of the expected code
generation in the -O0 tests needs to be adjusted.

In particular, handling of function arguments is less conservative
with -fast-isel=false (see isOnlyUsedInEntryBlock() in
SelectionDAGBuilder.cpp).  This results in fewer stack accesses and,
in some cases, reduced stack size as uselessly loaded values are no
longer stored back to spill locations in the stack.

No functional change with this patch; test case adjustments only.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183939 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 20:23:34 +00:00
Tom Stellard
2948e693cb R600: Don't try to fix reg class when copying IMPLICIT_DEF to a register
The test case for this is way too complex to be useful as a lit test,
and I was unable to reduce it.

https://bugs.freedesktop.org/show_bug.cgi?id=65438

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183937 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 20:14:00 +00:00
Rafael Espindola
a29ece1693 Add a version of sys::ExecuteAndWait that takes StringRefs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183934 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 20:06:28 +00:00
Derek Schuff
c06e5cf2e3 Fix DeleteDeadVarargs not to crash on functions referenced by BlockAddresses
This pass was assuming that if hasAddressTaken() returns false for a
function, the function's only uses are call sites.  That's not true
because there can be references by BlockAddresses too.

Fix the pass to handle this case.  Fix
BlockAddress::replaceUsesOfWithOnConstant() to allow a function's type
to be changed by RAUW'ing the function with a bitcast of the recreated
function.

Patch by Mark Seaborn.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183933 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 19:51:17 +00:00
Rafael Espindola
6585b388cb Have sys::FindProgramByName return a std::string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183928 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 19:25:37 +00:00
Benjamin Kramer
90cd06e90b Mips: Remove global set.
Backends shouldn't retain any global state. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183927 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 19:06:52 +00:00
Reid Kleckner
1ee21dc1e1 Merge changes to clang's Driver code into LLVM's Option library
This is in preparation for switching the clang driver over to using LLVM's
Option library.  Richard Smith introduced most of these changes to the clang
driver in r167638.

Reviewers: espindola on IRC

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183925 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 18:12:12 +00:00
Rafael Espindola
a65ee83ea9 Covert remaining graph viewers from sys::Path to std::string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183921 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 17:32:16 +00:00
Rafael Espindola
aaf4c1e2ee Update code for other graph viewing programs too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183920 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 17:27:45 +00:00
Rafael Espindola
4d39727eae Reduce usage of sys::Path in the graph writer.
Now PathV1.h is not needed in GraphWriter.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183919 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 17:20:48 +00:00
Rafael Espindola
ba0e380ea9 Add a version of DisplayGraph that takes a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183915 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 16:56:13 +00:00
Amaury de la Vieuville
8117ac555d ARM: fix B decoding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183914 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 16:41:55 +00:00
Amaury de la Vieuville
1290ce00a3 ARM: fix t2am_imm8_offset operand printing for imm=#-0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183913 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 16:40:51 +00:00
Rafael Espindola
13f17ea6c0 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
2013-06-13 16:22:26 +00:00
Rafael Espindola
f37802859f 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
2013-06-13 15:52:54 +00:00
Rafael Espindola
a4b504abc9 Reduce sys::Path usage in bugpoint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183908 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 15:47:11 +00:00
Benjamin Kramer
19b30d56b2 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
2013-06-13 15:45:24 +00:00
Reid Kleckner
62d124a1fa [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
2013-06-13 15:27:17 +00:00
Aaron Ballman
0db5f0f07e 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
2013-06-13 14:39:07 +00:00
Dan Gohman
e5682816b7 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
2013-06-12 22:19:19 +00:00
Rafael Espindola
a03a80f3ce [Win] Put ChangeStdinToBinary ChangeStdoutToBinary ChangeStderrToBinary in sys.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183868 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-12 21:25:04 +00:00
Rafael Espindola
e4f7e3109e s/Void/void.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183866 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-12 21:16:07 +00:00
Rafael Espindola
42f756f39e Attempt at fixing the windows build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183865 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-12 21:11:50 +00:00
Rafael Espindola
9f1d9fd196 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
2013-06-12 20:58:35 +00:00
David Blaikie
7e17024400 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
2013-06-12 20:57:32 +00:00
Rafael Espindola
609baa376a 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
2013-06-12 20:42:59 +00:00
Bill Schmidt
6289533853 [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
2013-06-12 20:22:24 +00:00
Bill Schmidt
dab366bf25 [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
2013-06-12 19:20:32 +00:00
Rui Ueyama
4bf771b4e6 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
2013-06-12 19:10:33 +00:00
Rafael Espindola
100fbdd06b 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
2013-06-12 16:45:47 +00:00
Bill Schmidt
d3f7766f23 [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
2013-06-12 16:39:22 +00:00
Rafael Espindola
6d6cbe3a3a Convert test to FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183843 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-12 16:35:53 +00:00