Tim Northover [Mon, 17 Jun 2013 03:03:06 +0000 (03:03 +0000)]
AArch64: print relocation addends if present on AArch64
llvm-objdump should provide some way of printing out the addends present in the
.rela sections for debugging purposes if nothing else.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184072
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 16 Jun 2013 20:34:27 +0000 (20:34 +0000)]
DebugInfo: remove target-specific Frame Index handling for DBG_VALUE MachineInstrs
Frame index handling is now target-agnostic, so delete the target hooks
for creation & asm printing of target-specific addressing in DBG_VALUEs
and any related functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184067
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 16 Jun 2013 20:34:15 +0000 (20:34 +0000)]
Debug Info: Simplify Frame Index handling in DBG_VALUE Machine Instructions
Rather than using the full power of target-specific addressing modes in
DBG_VALUEs with Frame Indicies, simply use Frame Index + Offset. This
reduces the complexity of debug info handling down to two
representations of values (reg+offset and frame index+offset) rather
than three or four.
Ideally we could ensure that frame indicies had been eliminated by the
time we reached an assembly or dwarf generation, but I haven't spent the
time to figure out where the FIs are leaking through into that & whether
there's a good place to convert them. Some FI+offset=>reg+offset
conversion is done (see PrologEpilogInserter, for example) which is
necessary for some SelectionDAG assumptions about registers, I believe,
but it might be possible to make this a more thorough conversion &
ensure there are no remaining FIs no matter how instruction selection
is performed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184066
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 16 Jun 2013 20:34:09 +0000 (20:34 +0000)]
MachineOperand::setIsDebug should ensure the register is /not/ a definition
This currently unused function appeared to be asserting in the wrong
direction - DebugValues are never definitions of registers, only uses.
Curiously we don't perform any of these checks for the more common (&
actually used) case of MachineOperand::CreateReg (or other Create
functions).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184065
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 16 Jun 2013 11:29:48 +0000 (11:29 +0000)]
Silence warning in Release builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184059
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Sun, 16 Jun 2013 03:22:56 +0000 (03:22 +0000)]
Put back variable names because they are referenced in the documentation
comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184051
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sat, 15 Jun 2013 16:02:44 +0000 (16:02 +0000)]
DebugInfo: follow up to 184045 to constrain the tests further to ensure they don't contain +0 offsets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184046
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sat, 15 Jun 2013 15:52:58 +0000 (15:52 +0000)]
DebugInfo: print DBG_VALUE MachineInstrs with [] for deref and drop the offset when it's zero
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184045
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Sat, 15 Jun 2013 12:20:44 +0000 (12:20 +0000)]
Use 0 instead of NULL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184044
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 15 Jun 2013 11:32:09 +0000 (11:32 +0000)]
APInt: Add a fast case for isAllOnesValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184042
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 15 Jun 2013 10:55:39 +0000 (10:55 +0000)]
PruneEH: Only merge attribute sets when used. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184041
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 15 Jun 2013 05:46:47 +0000 (05:46 +0000)]
Missing NDEBUGs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184039
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 15 Jun 2013 05:39:19 +0000 (05:39 +0000)]
MI-Sched: heuristics using the new latency and machine model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184038
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 15 Jun 2013 04:50:06 +0000 (04:50 +0000)]
Support BufferSize on ProcResGroup for unified MOp schedulers.
And add Sandybridge/Haswell resource buffers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184034
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 15 Jun 2013 04:50:02 +0000 (04:50 +0000)]
Update machine models. Specify buffer sizes for OOO processors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184033
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 15 Jun 2013 04:49:57 +0000 (04:49 +0000)]
Machine Model: Add MicroOpBufferSize and resource BufferSize.
Replace the ill-defined MinLatency and ILPWindow properties with
with straightforward buffer sizes:
MCSchedMode::MicroOpBufferSize
MCProcResourceDesc::BufferSize
These can be used to more precisely model instruction execution if desired.
Disabled some misched tests temporarily. They'll be reenabled in a few commits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184032
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 15 Jun 2013 04:49:49 +0000 (04:49 +0000)]
MI-Sched: Rename IssueCount to CurrMOps.
"Counts" refer to scaled resource counts within a region. CurrMOps is
simply the number of micro-ops to be issue in the current cycle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184031
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 15 Jun 2013 04:49:46 +0000 (04:49 +0000)]
MI-Sched: Remove the temporary EnableCopyConstrain flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184030
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 15 Jun 2013 04:49:44 +0000 (04:49 +0000)]
MI-Sched: added tracking of dependent latency for better heuristics.
Heuristics compare the critical path in the scheduled code, called
ExpectedLatency, with the latency of instructions remaining to be
scheduled. There are two ways to look at remaining latency:
(1) Dependent latency includes the latency between unscheduled and
scheduled instructions.
(2) Independent latency is simply the height (bottom-up) or depth
(top-down) of instructions currently in the ready Q.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184029
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 15 Jun 2013 04:49:42 +0000 (04:49 +0000)]
MI-Sched: DEBUG: print critical resource.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184028
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Sat, 15 Jun 2013 04:03:33 +0000 (04:03 +0000)]
SelectionDAG: slightly refactor DAGCombiner::visitSELECT_CC to avoid redudant checks...
This doesn't really effect performance due to all the relevant calls being transparent but is clearer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184027
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sat, 15 Jun 2013 00:33:47 +0000 (00:33 +0000)]
Debug Info: Don't print the display name and colon prefix for DEBUG_VALUE comments if the display name is empty
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184026
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Sat, 15 Jun 2013 00:31:46 +0000 (00:31 +0000)]
[yaml2obj] Move some classes into anonymous namespaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184025
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Sat, 15 Jun 2013 00:25:26 +0000 (00:25 +0000)]
[yaml2obj] Add support for sh_link via `Link` key.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184022
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Sat, 15 Jun 2013 00:09:31 +0000 (00:09 +0000)]
R600: Add SI load support for v[24]i32 and store for v2i32
Also add a seperate vector lit test file, since r600 doesn't seem to handle
v2i32 load/store yet, but we can test both for SI.
Patch by: Aaron Watry
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Aaron Watry <awatry@gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184021
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 14 Jun 2013 23:27:04 +0000 (23:27 +0000)]
Remove empty directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184020
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 14 Jun 2013 23:25:53 +0000 (23:25 +0000)]
Remove the LLVM specific archive index.
Archive files (.a) can have a symbol table indicating which object
files in them define which symbols. The purpose of this symbol table
is to speed up linking by allowing the linker the read only the .o
files it is actually going to use instead of having to parse every
object's symbol table.
LLVM's archive library currently supports a LLVM specific format for
such table. It is hard to see any value in that now that llvm-ld is
gone:
* System linkers don't use it: GNU ar uses the same plugin as the
linker to create archive files with a regular index. The OS X ar
creates no symbol table for IL files, I assume the linker just parses
all IL files.
* It doesn't interact well with archives having both IL and native objects.
* We probably don't want to be responsible for yet another archive
format variant.
This patch then:
* Removes support for creating and reading such index from lib/Archive.
* Remove llvm-ranlib, since there is nothing left for it to do.
We should in the future add support for regular indexes to llvm-ar for
both native and IL objects. When we do that, llvm-ranlib should be
reimplemented as a symlink to llvm-ar, as it is equivalent to "ar s".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184019
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 14 Jun 2013 22:12:30 +0000 (22:12 +0000)]
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
Tom Stellard [Fri, 14 Jun 2013 22:12:24 +0000 (22:12 +0000)]
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
Tom Stellard [Fri, 14 Jun 2013 22:12:19 +0000 (22:12 +0000)]
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
Tom Stellard [Fri, 14 Jun 2013 22:12:09 +0000 (22:12 +0000)]
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
Matt Arsenault [Fri, 14 Jun 2013 22:04:37 +0000 (22:04 +0000)]
Introduce getSelect usage and use more getSelectCC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184012
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 14 Jun 2013 22:04:32 +0000 (22:04 +0000)]
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
Rafael Espindola [Fri, 14 Jun 2013 21:41:33 +0000 (21:41 +0000)]
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
Stephen Lin [Fri, 14 Jun 2013 21:33:58 +0000 (21:33 +0000)]
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
Rafael Espindola [Fri, 14 Jun 2013 20:26:58 +0000 (20:26 +0000)]
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
Tim Northover [Fri, 14 Jun 2013 20:22:21 +0000 (20:22 +0000)]
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
JF Bastien [Fri, 14 Jun 2013 19:55:26 +0000 (19:55 +0000)]
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
Rafael Espindola [Fri, 14 Jun 2013 19:41:05 +0000 (19:41 +0000)]
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
Rafael Espindola [Fri, 14 Jun 2013 19:38:45 +0000 (19:38 +0000)]
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
Arnaud A. de Grandmaison [Fri, 14 Jun 2013 19:26:57 +0000 (19:26 +0000)]
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
Eli Bendersky [Fri, 14 Jun 2013 19:14:52 +0000 (19:14 +0000)]
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
Stephen Lin [Fri, 14 Jun 2013 18:17:35 +0000 (18:17 +0000)]
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
Rafael Espindola [Fri, 14 Jun 2013 18:12:13 +0000 (18:12 +0000)]
Remove unused argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183992
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 14 Jun 2013 17:11:14 +0000 (17:11 +0000)]
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
Rafael Espindola [Fri, 14 Jun 2013 16:43:15 +0000 (16:43 +0000)]
Convert a use of sys::Path::GetTemporaryDirectory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183987
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 14 Jun 2013 16:20:18 +0000 (16:20 +0000)]
Remove a use of PathV1.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183985
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Fri, 14 Jun 2013 16:15:29 +0000 (16:15 +0000)]
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
Rafael Espindola [Fri, 14 Jun 2013 15:24:56 +0000 (15:24 +0000)]
Remove a use of PathV1.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183982
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 14 Jun 2013 15:12:13 +0000 (15:12 +0000)]
Move PrependMainExecutablePath next to its only user.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183980
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 14 Jun 2013 13:59:21 +0000 (13:59 +0000)]
Remove a use of sys::Path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183979
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury de la Vieuville [Fri, 14 Jun 2013 11:21:35 +0000 (11:21 +0000)]
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
Benjamin Kramer [Fri, 14 Jun 2013 09:31:41 +0000 (09:31 +0000)]
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
Rafael Espindola [Fri, 14 Jun 2013 04:31:19 +0000 (04:31 +0000)]
Remove unused header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183968
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Fri, 14 Jun 2013 02:49:43 +0000 (02:49 +0000)]
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
Sean Silva [Fri, 14 Jun 2013 00:38:02 +0000 (00:38 +0000)]
[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
Jakub Staszak [Fri, 14 Jun 2013 00:00:13 +0000 (00:00 +0000)]
Move #include from .h to .cpp file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183960
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Thu, 13 Jun 2013 23:53:13 +0000 (23:53 +0000)]
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
Jakub Staszak [Thu, 13 Jun 2013 23:49:09 +0000 (23:49 +0000)]
#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
Sean Silva [Thu, 13 Jun 2013 22:20:01 +0000 (22:20 +0000)]
[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
Sean Silva [Thu, 13 Jun 2013 22:19:54 +0000 (22:19 +0000)]
[yaml2obj] Add sh_addr via `Address` key.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183954
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Thu, 13 Jun 2013 22:19:48 +0000 (22:19 +0000)]
[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
Rafael Espindola [Thu, 13 Jun 2013 21:38:21 +0000 (21:38 +0000)]
Try to fix the windows build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183950
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 13 Jun 2013 21:16:58 +0000 (21:16 +0000)]
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
Rafael Espindola [Thu, 13 Jun 2013 21:01:17 +0000 (21:01 +0000)]
Add a RemoveFileOnSignal that takes a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183943
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 13 Jun 2013 20:41:00 +0000 (20:41 +0000)]
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
Rafael Espindola [Thu, 13 Jun 2013 20:25:38 +0000 (20:25 +0000)]
Avoid using PathV1.h in Program.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183940
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Thu, 13 Jun 2013 20:23:34 +0000 (20:23 +0000)]
[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
Tom Stellard [Thu, 13 Jun 2013 20:14:00 +0000 (20:14 +0000)]
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
Rafael Espindola [Thu, 13 Jun 2013 20:06:28 +0000 (20:06 +0000)]
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
Derek Schuff [Thu, 13 Jun 2013 19:51:17 +0000 (19:51 +0000)]
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
Rafael Espindola [Thu, 13 Jun 2013 19:25:37 +0000 (19:25 +0000)]
Have sys::FindProgramByName return a std::string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183928
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 13 Jun 2013 19:06:52 +0000 (19:06 +0000)]
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
Reid Kleckner [Thu, 13 Jun 2013 18:12:12 +0000 (18:12 +0000)]
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
Rafael Espindola [Thu, 13 Jun 2013 17:32:16 +0000 (17:32 +0000)]
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
Rafael Espindola [Thu, 13 Jun 2013 17:27:45 +0000 (17:27 +0000)]
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
Rafael Espindola [Thu, 13 Jun 2013 17:20:48 +0000 (17:20 +0000)]
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
Rafael Espindola [Thu, 13 Jun 2013 16:56:13 +0000 (16:56 +0000)]
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
Amaury de la Vieuville [Thu, 13 Jun 2013 16:41:55 +0000 (16:41 +0000)]
ARM: fix B decoding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183914
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury de la Vieuville [Thu, 13 Jun 2013 16:40:51 +0000 (16:40 +0000)]
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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