1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

18194 Commits

Author SHA1 Message Date
Rafael Espindola
845bfd3735 Move lib/Archive to tools/llvm-ar.
llvm-ar is the only tool that needs to write archive files. Every other tool
should be able to use the lib/Object interface.

llvm-svn: 184083
2013-06-17 15:47:20 +00:00
Tim Northover
3231ab74d4 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.

llvm-svn: 184072
2013-06-17 03:03:06 +00:00
David Blaikie
813e6b3974 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.

llvm-svn: 184067
2013-06-16 20:34:27 +00:00
David Blaikie
dafb933a3d 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).

llvm-svn: 184065
2013-06-16 20:34:09 +00:00
Dmitri Gribenko
2c062d2c5f Put back variable names because they are referenced in the documentation
comment.

llvm-svn: 184051
2013-06-16 03:22:56 +00:00
Benjamin Kramer
ac23976335 APInt: Add a fast case for isAllOnesValue.
llvm-svn: 184042
2013-06-15 11:32:09 +00:00
Andrew Trick
768a74cb96 Support BufferSize on ProcResGroup for unified MOp schedulers.
And add Sandybridge/Haswell resource buffers.

llvm-svn: 184034
2013-06-15 04:50:06 +00:00
Andrew Trick
5d13fe97ed 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.

llvm-svn: 184032
2013-06-15 04:49:57 +00:00
Sean Silva
7dafd05c2e [yaml2obj] Add support for sh_link via Link key.
llvm-svn: 184022
2013-06-15 00:25:26 +00:00
Rafael Espindola
daa7f712a2 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".

llvm-svn: 184019
2013-06-14 23:25:53 +00:00
Matt Arsenault
3cc00ba7e7 Add getSelect helper function
Patch by Micah Villmow from last year that was reviewed, but never committed

llvm-svn: 184011
2013-06-14 22:04:32 +00:00
Rafael Espindola
61f7e167f2 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?

llvm-svn: 184009
2013-06-14 21:41:33 +00:00
Rafael Espindola
9534308a00 Replace use of PathV1.h in MCContext.cpp.
GetCurrentDirectory is now unused. Remove it.

llvm-svn: 184003
2013-06-14 20:26:58 +00:00
Rafael Espindola
109393c56d Replace use of PathV1.h in Program.cpp.
llvm-svn: 183996
2013-06-14 19:38:45 +00:00
Rafael Espindola
4430795d30 Convert a use of sys::Path::GetTemporaryDirectory.
llvm-svn: 183987
2013-06-14 16:43:15 +00:00
Derek Schuff
4c429cad03 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.

llvm-svn: 183984
2013-06-14 16:15:29 +00:00
Rafael Espindola
703b03a992 Move PrependMainExecutablePath next to its only user.
llvm-svn: 183980
2013-06-14 15:12:13 +00:00
Sean Silva
221b8835d3 [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.

llvm-svn: 183962
2013-06-14 00:38:02 +00:00
Jakub Staszak
578a445162 Move #include from .h to .cpp file.
llvm-svn: 183960
2013-06-14 00:00:13 +00:00
Jakub Staszak
720d04cf91 Remove forward declaration of MachineBasicBlock. It is #included anyway.
llvm-svn: 183958
2013-06-13 23:53:13 +00:00
Jakub Staszak
bd36771f2d #include <climits> instead of <limits.h> in C++ header file.
llvm-svn: 183957
2013-06-13 23:49:09 +00:00
Sean Silva
51f6318c1e [yaml2obj] Add support for specifying raw section content.
llvm-svn: 183955
2013-06-13 22:20:01 +00:00
Sean Silva
a31cf66d83 [yaml2obj] Add sh_addr via Address key.
llvm-svn: 183954
2013-06-13 22:19:54 +00:00
Sean Silva
c72d9620ea [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.

llvm-svn: 183953
2013-06-13 22:19:48 +00:00
Rafael Espindola
6c0ca078e2 Don't use PathV1.h in Signals.h.
llvm-svn: 183947
2013-06-13 21:16:58 +00:00
Rafael Espindola
d94cf8dd17 Add a RemoveFileOnSignal that takes a StringRef.
llvm-svn: 183943
2013-06-13 21:01:17 +00:00
Rafael Espindola
1cc376fe6a Don't use PathV1.h in FileUtilities.h.
llvm-svn: 183941
2013-06-13 20:41:00 +00:00
Rafael Espindola
ef0d0d8b0b Avoid using PathV1.h in Program.h.
llvm-svn: 183940
2013-06-13 20:25:38 +00:00
Rafael Espindola
eed3b256ab Add a version of sys::ExecuteAndWait that takes StringRefs.
llvm-svn: 183934
2013-06-13 20:06:28 +00:00
Rafael Espindola
332b3ad6f7 Have sys::FindProgramByName return a std::string.
llvm-svn: 183928
2013-06-13 19:25:37 +00:00
Reid Kleckner
cd4d94dfeb 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

llvm-svn: 183925
2013-06-13 18:12:12 +00:00
Rafael Espindola
df08289cf9 Reduce usage of sys::Path in the graph writer.
Now PathV1.h is not needed in GraphWriter.h.

llvm-svn: 183919
2013-06-13 17:20:48 +00:00
Rafael Espindola
a01a0af557 Add a version of DisplayGraph that takes a StringRef.
llvm-svn: 183915
2013-06-13 16:56:13 +00:00
Rafael Espindola
5b921b1aa1 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.

llvm-svn: 183864
2013-06-12 20:58:35 +00:00
Rafael Espindola
c2d993a144 Add global versions of some Program static methods.
This is a temporary stepping stone for moving them out of Program.

llvm-svn: 183860
2013-06-12 20:42:59 +00:00
Rui Ueyama
9fac39d7e4 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

llvm-svn: 183852
2013-06-12 19:10:33 +00:00
Rafael Espindola
7690460b6c Inline Path::isBitcodeFile into only use and remove it.
llvm-svn: 183840
2013-06-12 15:13:57 +00:00
Rafael Espindola
eda0643880 Remove Path::getMagicNumber.
llvm-svn: 183839
2013-06-12 15:07:11 +00:00
Rafael Espindola
21dc9d4207 Remove Path::hasMagicNumber.
llvm-svn: 183838
2013-06-12 15:04:59 +00:00
Rafael Espindola
f2b87aba29 Remove Path::isAbsolute.
llvm-svn: 183836
2013-06-12 15:02:39 +00:00
Rafael Espindola
800537be0d Remove Path::isAbsolute().
llvm-svn: 183835
2013-06-12 14:47:33 +00:00
Ulrich Weigand
2666834190 [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.

llvm-svn: 183834
2013-06-12 14:46:54 +00:00
Rafael Espindola
0aa6ee2d41 Remove Path::getSuffix.
llvm-svn: 183833
2013-06-12 14:32:51 +00:00
Rafael Espindola
89d2e1921d Remove sys::CopyFile.
llvm-svn: 183831
2013-06-12 14:16:52 +00:00
Patrik Hagglund
2c2535b8d0 Fix 'gcc -flto' builds for unittest binaries (undefined reference to
`typeinfo for llvm:🆑:GenericOptionValue').

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

llvm-svn: 183830
2013-06-12 14:15:21 +00:00
Rafael Espindola
528e53f9f1 Remove the old file memory mapping functions.
llvm-svn: 183828
2013-06-12 14:11:15 +00:00
Rafael Espindola
072d5a2178 Remove Path::createFileOnDisk.
llvm-svn: 183827
2013-06-12 13:59:17 +00:00
Rafael Espindola
dc7cb4d0c4 Remove Path::makeExecutableOnDisk.
llvm-svn: 183826
2013-06-12 13:55:07 +00:00
Rafael Espindola
191f66d683 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.

llvm-svn: 183801
2013-06-11 22:21:28 +00:00
Rui Ueyama
f9939fdb3c [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

llvm-svn: 183788
2013-06-11 21:39:48 +00:00