Commit Graph

92936 Commits

Author SHA1 Message Date
Tom Stellard
d6055262d2 R600: Use correct encoding for Vertex Fetch instructions on Cayman
Reviewed-by: Vincent Lejeune<vljn at ovi.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184016 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 22:12:30 +00:00
Tom Stellard
4efccd0fb1 R600: Use EXPORT_RAT_INST_STORE_DWORD for stores on Cayman
We were using RAT_INST_STORE_RAW, which seemed to work, but the docs
say this instruction doesn't exist for Cayman, so it's probably safer
to use a documented instruction instead.

Reviewed-by: Vincent Lejeune<vljn at ovi.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184015 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 22:12:24 +00:00
Tom Stellard
c30b232349 R600: Factor the instruction encoding out the RAT_WRITE_CACHELESS_eg class
Reviewed-by: Vincent Lejeune<vljn at ovi.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184014 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 22:12:19 +00:00
Tom Stellard
2def95fc1e R600: Move instruction encoding definitions into a separate .td file
Reviewed-by: Vincent Lejeune<vljn at ovi.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184013 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 22:12:09 +00:00
Matt Arsenault
b05e4778f0 Introduce getSelect usage and use more getSelectCC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184012 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 22:04:37 +00:00
Matt Arsenault
85cc4d8402 Add getSelect helper function
Patch by Micah Villmow from last year that was reviewed, but never committed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184011 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 22:04:32 +00:00
Rafael Espindola
9e89fe77ce Add GetCurrentDirectory back.
It looks like clang-tools-extra/unittests/cpp11-migrate/TransformTest.cpp
depends on the behaviour of the old one on Windows. Maybe a difference
between GetCurrentDirectoryA and GetCurrentDirectoryW?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184009 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 21:41:33 +00:00
Stephen Lin
a553bede23 SelectionDAG: minor fix to order of operands in comments to match the code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184008 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 21:33:58 +00:00
Rafael Espindola
76858a7abd Replace use of PathV1.h in MCContext.cpp.
GetCurrentDirectory is now unused. Remove it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184003 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 20:26:58 +00:00
Tim Northover
89dbe97442 Mark rematerialized super/sub registers as dead.
When we're rematerializing into a not-quite-right register we already add the
real definition as an imp-def, but we should also be marking the "official"
register as dead, since nothing else is going to use it as a result of this
remat.

Not doing this can affect pressure tracking.

rdar://problem/14158833

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184002 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 20:22:21 +00:00
JF Bastien
d5d7410982 Fix frame pointer debug information test
Run the test at O1 instead of O0: ARM FastISel keeps frame pointers around and ignores the flag. The test should now pass on ARM and still passes on x86.See: http://llvm.org/bugs/show_bug.cgi?id=16322

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183999 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 19:55:26 +00:00
Rafael Espindola
d132ce7a75 Revert "Cmake: add compiler option in a more idiomatic way"
This reverts commit 183995.

It broke the bots:
http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/9730/steps/build_clang/logs/stdio

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183997 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 19:41:05 +00:00
Rafael Espindola
fcba9c56a2 Replace use of PathV1.h in Program.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183996 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 19:38:45 +00:00
Arnaud A. de Grandmaison
4ebf543b93 Cmake: add compiler option in a more idiomatic way
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183995 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 19:26:57 +00:00
Eli Bendersky
dafd1a6311 Do not to perform RUN line substitution of llc if that's prefixed by a hypnen
(-llc), similarly to the way it was done for clang and llvmc. 

This doesn't affect the upstream llvm tests but helps when developing custom
LLVM-based tools and testing them within the LLVM regression framework.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183994 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 19:14:52 +00:00
Stephen Lin
38103d1012 SelectionDAG: Fix incorrect condition checks in some cases of folding FADD/FMUL combinations; also improve accuracy of comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183993 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 18:17:35 +00:00
Rafael Espindola
f3fa6837bf Remove unused argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183992 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 18:12:13 +00:00
Rafael Espindola
2ebb97792d Don't use PathV1.h in GraphWriter.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183988 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 17:11:14 +00:00
Rafael Espindola
a54ba12ae7 Convert a use of sys::Path::GetTemporaryDirectory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183987 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 16:43:15 +00:00
Rafael Espindola
bb40b3e957 Remove a use of PathV1.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183985 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 16:20:18 +00:00
Derek Schuff
8a0d41e1a6 Make PrologEpilogInserter save/restore all callee saved registers
in functions which call __builtin_unwind_init()

__builtin_unwind_init() is an undocumented gcc intrinsic which has this effect,
and is used in libgcc_eh.

Goes part of the way toward fixing PR8541.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183984 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 16:15:29 +00:00
Rafael Espindola
80cecc8c60 Remove a use of PathV1.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183982 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 15:24:56 +00:00
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