Commit Graph

14698 Commits

Author SHA1 Message Date
Michael J. Spencer d3b7b12618 Object: Add archive support.
llvm-svn: 140626
2011-09-27 19:36:55 +00:00
Nadav Rotem 38b3b83362 Cleanup PromoteIntOp_EXTRACT_VECTOR_ELT and PromoteIntRes_SETCC.
Add a new method: getAnyExtOrTrunc and use it to replace the manual check.

llvm-svn: 140603
2011-09-27 11:16:47 +00:00
Eli Friedman 5c91891cf3 Enhance alias analysis for atomic instructions a bit. Upgrade a couple alias-analysis tests to the new atomic instructions.
llvm-svn: 140557
2011-09-26 20:15:28 +00:00
James Molloy 0ceb8cadd2 Fix emission of debug data for global variables. getContext() on DIGlobalVariables is not valid any more.
llvm-svn: 140539
2011-09-26 17:40:42 +00:00
Jakob Stoklund Olesen df977fedb6 Add target hook for pseudo instruction expansion.
Many targets use pseudo instructions to help register allocation.  Like
the COPY instruction, these pseudos can be expanded after register
allocation.  The early expansion can make life easier for PEI and the
post-ra scheduler.

This patch adds a hook that is called for all remaining pseudo
instructions from the ExpandPostRAPseudos pass.

llvm-svn: 140472
2011-09-25 19:21:35 +00:00
Jakob Stoklund Olesen fd719d184e Clean up code after renaming LowerSubregs -> ExpandPostRAPseudos.
No functional change intended.

llvm-svn: 140470
2011-09-25 16:46:08 +00:00
Daniel Dunbar 9b92e2be30 sys::Process: Add a SetWorkingDirectory method.
llvm-svn: 140433
2011-09-23 23:23:36 +00:00
Anna Zaks 632bf5f084 Add getTreeFactory() to ImmutableSet to allow construction of ImmutableSetRef from an ImmutableSet object.
llvm-svn: 140402
2011-09-23 19:10:26 +00:00
Eric Christopher b9a11322b1 We're no longer going to bother supporting platforms that don't
support C89.

We probably didn't support them anyways.

llvm-svn: 140361
2011-09-23 00:53:10 +00:00
Owen Anderson 6cca67fc4a Start stubbing out MCModule and MCAtom, which provide an API for accessing the rich disassembly of a complete object or executable.
These are very much a work in progress, and not really useful yet.

llvm-svn: 140345
2011-09-22 22:32:22 +00:00
Jakob Stoklund Olesen 0f36544c08 Add a MinNumRegs argument to MRI::constrainRegClass().
The function will refuse to use a register class with fewer registers
than MinNumRegs.  This can be used by clients to avoid accidentally
increase register pressure too much.

The default value of MinNumRegs=0 doesn't affect how constrainRegClass()
works.

llvm-svn: 140339
2011-09-22 21:39:31 +00:00
Andrew Trick 924123acb3 Lower ARM adds/subs to add/sub after adding optional CPSR operand.
This is still a hack until we can teach tblgen to generate the
optional CPSR operand rather than an implicit CPSR def. But the
strangeness is now limited to the selection DAG. ADD/SUB MI's no
longer have implicit CPSR defs, nor do we allow flag setting variants
of these opcodes in machine code. There are several corner cases to
consider, and getting one wrong would previously lead to nasty
miscompilation. It's not the first time I've debugged one, so this
time I added enough verification to ensure it won't happen again.

llvm-svn: 140228
2011-09-21 02:20:46 +00:00
Benjamin Kramer aec423d526 DebugInfo: Add equality operators and default constructor to DILineInfo.
llvm-svn: 140223
2011-09-21 01:13:16 +00:00
Bill Wendling fc1176e061 Use ArrayRef instead of an explicit 'const std::vector &'.
llvm-svn: 140172
2011-09-20 19:05:04 +00:00
Andrew Trick 52363bdbeb Restore hasPostISelHook tblgen flag.
No functionality change. The hook makes it explicit which patterns
require "special" handling. i.e. it self-documents tblgen
deficiencies. I plan to add verification in ExpandISelPseudos and
Thumb2SizeReduce to catch any missing hasPostISelHooks. Otherwise it's
too fragile.

llvm-svn: 140160
2011-09-20 18:22:31 +00:00
Akira Hatanaka 6c3ad65288 Add mips64 & mips64el to Triple. Patch by Liu with modifications.
llvm-svn: 140157
2011-09-20 18:09:37 +00:00
NAKAMURA Takumi 5ac1b3ada8 include/llvm/Config/llvm-config.h.in: Add the entry LLVM_PATH_XDOT_PY, for consistency against llvm-config.h.cmake.
llvm-svn: 140137
2011-09-20 03:54:11 +00:00
NAKAMURA Takumi df43e00609 include/llvm/Config: Reorder LLVM_HAS_ATOMICS along config.h.in for consistency.
llvm-svn: 140136
2011-09-20 03:54:05 +00:00
NAKAMURA Takumi 3b2b3be960 include/llvm/Config/config.h.cmake: Unbreak CMake build to tweak LLVM_HAS_ATOMICS.
llvm-svn: 140135
2011-09-20 03:53:57 +00:00
Andrew Trick 8586e62d91 ARM isel bug fix for adds/subs operands.
Modified ARMISelLowering::AdjustInstrPostInstrSelection to handle the
full gamut of CPSR defs/uses including instructins whose "optional"
cc_out operand is not really optional. This allowed removal of the
hasPostISelHook to simplify the .td files and make the implementation
more robust.
Fixes rdar://10137436: sqlite3 miscompile

llvm-svn: 140134
2011-09-20 03:17:40 +00:00
Eric Christopher 69c02e9476 Remove more of llvmc and dependencies.
llvm-svn: 140121
2011-09-20 00:34:27 +00:00
Eric Christopher 66ad57b04e Regenerate configure.
llvm-svn: 140065
2011-09-19 20:46:12 +00:00
Eric Christopher 4418a60272 Rename LLVM_MULTITHREADED define and fix build without threads.
Patch by Arrowdodger.

llvm-svn: 140064
2011-09-19 20:43:23 +00:00
Ted Kremenek 502848ceda Add ImmutableMapRef and ImmutableSetRef, which consolidate Immutable[Map,Set] and its Factory. This may eventually replace Immtuable[Map,Set].
llvm-svn: 139967
2011-09-16 23:01:25 +00:00
Owen Anderson a0c3b97221 Don't attach annotations to MCInst's. Instead, have the disassembler return, and the printer accept, an annotation string which can be passed through if the client cares about annotations.
llvm-svn: 139876
2011-09-15 23:38:46 +00:00
Ivan Krasin 639222d090 use 64-bit types instead of off_t/size_t to avoid the issue when
gold plugin is built with Large File Support (sizeof(off_t) == 64 on i686)
and the rest of LLVM is built w/o Large File Support
(sizeof(off_t) == 32 on i686) which corrupts the stack.

llvm-svn: 139873
2011-09-15 23:13:00 +00:00
Benjamin Kramer 7215c58744 Unbreak the build for compilers that don't include cstdint everywhere.
llvm-svn: 139868
2011-09-15 22:26:16 +00:00
Benjamin Kramer 49fc9ddae6 CommandLine: Add support for 64 bit unsigned integer options.
llvm-svn: 139848
2011-09-15 21:17:37 +00:00
Benjamin Kramer 2602ca67e8 DWARF: Put all the pieces we have together and provide a single accessor to DIContext that provides line information when given an address.
llvm-svn: 139836
2011-09-15 20:43:22 +00:00
Owen Anderson d1814791ad Add support for stored annotations to MCInst, and provide facilities for MC-based InstPrinters to print them out. Enhance the ARM and X86 InstPrinter's to do so in verbose mode.
llvm-svn: 139820
2011-09-15 18:36:29 +00:00
Jakob Stoklund Olesen ae4471af1b Use getPrevSlot() instead of getPrevIndex().
The getPrevIndex() function moves to the same slot in the previous
instruction.  For getVNInfoBefore(), we just need the previous slot in
the same instruction.

llvm-svn: 139793
2011-09-15 15:31:49 +00:00
Nick Lewycky e8cdaddcf8 Despite what the GCC wiki says, a quick search shows that
DW_AT_GNU_template_name = 0x2110, not 0x2108. That would explain those 
attr #0x2110 under the DW_TAG_GNU_template_template_param I'm seeing. Migrate
from documented values to reality.

llvm-svn: 139785
2011-09-15 05:30:55 +00:00
Nick Lewycky ee674b3e3b Add some more DWARF extensions from:
1. http://gcc.gnu.org/wiki/TemplateParmsDwarf
2. ftp://ftp.software.ibm.com/software/os390/czos/dwarf/mips_extensions.pdf

llvm-svn: 139784
2011-09-15 05:21:03 +00:00
Jakob Stoklund Olesen 4c099551f9 Stop verifying hasPHIKill() flags.
There is only one legitimate use remaining, in addIntervalsForSpills().
All other calls to hasPHIKill() are only used to update PHIKill flags.

The addIntervalsForSpills() function is part of the old spilling
framework, only used by linearscan.

llvm-svn: 139783
2011-09-15 05:16:30 +00:00
Jakob Stoklund Olesen e7ca8ecd92 Leave hasPHIKill flags alone in LiveInterval::RenumberValues.
It is conservatively correct to keep the hasPHIKill flags, even after
deleting PHI-defs.

The calculation can be very expensive after taildup has created a
quadratic number of indirectbr edges in the CFG, and the hasPHIKill flag
isn't used for anything after RenumberValues().

llvm-svn: 139780
2011-09-15 04:37:18 +00:00
Nick Lewycky 34368124aa Update Dwarf enums list for DWARF 4.
Note that DW_TAG_rvalue_reference_type is officially 0x42, not 0x41.

llvm-svn: 139779
2011-09-15 04:23:44 +00:00
Andrew Trick 76a86d3d4c [regcoalescing] bug fix for RegistersDefinedFromSameValue.
An improper SlotIndex->VNInfo lookup was leading to unsafe copy removal.
Fixes PR10920 401.bzip2 miscompile with no IV rewrite.

llvm-svn: 139765
2011-09-15 01:09:33 +00:00
Douglas Gregor 8b74454619 Update the comment for system_temp_directory() to indicate when it
will ignore the erasedOnReboot option, and properly escape the
backslash in "C:\TEMP". Thanks to Aaron and Francois.

llvm-svn: 139755
2011-09-14 23:21:47 +00:00
Devang Patel 04d6d47865 Add support to emit debug info for C++0x nullptr type.
llvm-svn: 139751
2011-09-14 23:13:28 +00:00
Douglas Gregor 123dc70c50 Add a simple routine to determine the typical system directory for
temporary data. 

llvm-svn: 139725
2011-09-14 20:27:01 +00:00
Jim Grosbach 1daf07338c Move state var to private class member.
llvm-svn: 139697
2011-09-14 16:37:04 +00:00
Douglas Gregor 663c068d46 Add APInt support for converting to/from hexatridecimal strings
llvm-svn: 139695
2011-09-14 15:54:46 +00:00
Benjamin Kramer 75d1cf3391 Object: make the following changes into SymbolRef
- Add enum SymbolType and function getSymbolType()
- Add function isGlobal() - it's returns true for symbols that can be used in another objects, such as library functions.
- Rename function getAddress() to getOffset() and add new function getAddress(), because currently getAddress() returns section offset of symbol first byte. new getAddress() return symbol address.
- Change usage SymbolRef::getAddress() to getOffset() in tools/llvm-nm and tools/llvm-objdump.

Patch by Danil Malyshev!

llvm-svn: 139683
2011-09-14 01:22:52 +00:00
Benjamin Kramer 91ead3c1f5 Remove unimplemented function prototypes from PathV2. They can be readded when someone cares enough.
Patch by Aaron Ballman!

llvm-svn: 139682
2011-09-14 01:14:36 +00:00
Benjamin Kramer 557a81e9d7 ObjectFile: Add support for mach-o-style dSYM companion files.
llvm-svn: 139676
2011-09-14 00:39:22 +00:00
Eric Christopher 97095d68a6 Fix indenting.
llvm-svn: 139670
2011-09-13 23:45:39 +00:00
Kevin Enderby 7255361320 First step in supporting #line directives in assembler. This step parses the
#line directives with the needed support in the lexer.  Next will be to build
a simple file/line# table mapping source SMLoc's for later use by diagnostics.
And the last step will be to get the diagnostics to use the mapping for file
and line numbers.

llvm-svn: 139669
2011-09-13 23:45:18 +00:00
Benjamin Kramer 297ee072bf Remove include of header that doesn't exist (yet).
llvm-svn: 139629
2011-09-13 19:55:32 +00:00
Benjamin Kramer aa2f78f5e6 Sketch out a DWARF parser.
This introduces a new library to LLVM: libDebugInfo. It will provide debug information
parsing to LLVM. Much of the design and some of the code is taken from the LLDB project.

It also contains an llvm-dwarfdump tool that can dump the abbrevs and DIEs from an
object file. It can be used to write tests for DWARF input and output easily.

llvm-svn: 139627
2011-09-13 19:42:23 +00:00
Benjamin Kramer 88a1d9fc00 Add the DataExtractor utility class.
It is an endian-aware helper that can read data from a StringRef. It will
come in handy for DWARF parsing. This class is inspired by LLDB's
DataExtractor, but is stripped down to the bare minimum needed for DWARF.

Comes with unit tests!

llvm-svn: 139626
2011-09-13 19:42:16 +00:00