Commit Graph

14723 Commits

Author SHA1 Message Date
Eric Christopher
776d99342b Regenerate configure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140065 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-19 20:46:12 +00:00
Eric Christopher
627445f3e6 Rename LLVM_MULTITHREADED define and fix build without threads.
Patch by Arrowdodger.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140064 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-19 20:43:23 +00:00
Ted Kremenek
166e0539c9 Add ImmutableMapRef and ImmutableSetRef, which consolidate Immutable[Map,Set] and its Factory. This may eventually replace Immtuable[Map,Set].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139967 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-16 23:01:25 +00:00
Owen Anderson
98c5ddabca 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139876 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-15 23:38:46 +00:00
Ivan Krasin
71280b55a3 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139873 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-15 23:13:00 +00:00
Benjamin Kramer
c9935f378e Unbreak the build for compilers that don't include cstdint everywhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139868 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-15 22:26:16 +00:00
Benjamin Kramer
b3514569d0 CommandLine: Add support for 64 bit unsigned integer options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139848 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-15 21:17:37 +00:00
Benjamin Kramer
101b1c5ff1 DWARF: Put all the pieces we have together and provide a single accessor to DIContext that provides line information when given an address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139836 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-15 20:43:22 +00:00
Owen Anderson
ede042dc8d 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139820 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-15 18:36:29 +00:00
Jakob Stoklund Olesen
a1dd30553d 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139793 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-15 15:31:49 +00:00
Nick Lewycky
2460f32a8a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139785 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-15 05:30:55 +00:00
Nick Lewycky
3a4178ea13 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139784 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-15 05:21:03 +00:00
Jakob Stoklund Olesen
df8412c4c1 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139783 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-15 05:16:30 +00:00
Jakob Stoklund Olesen
573a32d487 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().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139780 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-15 04:37:18 +00:00
Nick Lewycky
f59c532cfd Update Dwarf enums list for DWARF 4.
Note that DW_TAG_rvalue_reference_type is officially 0x42, not 0x41.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139779 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-15 04:23:44 +00:00
Andrew Trick
b1afbac64b [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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139765 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-15 01:09:33 +00:00
Douglas Gregor
d26d6b68dd 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139755 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-14 23:21:47 +00:00
Devang Patel
734a67cda5 Add support to emit debug info for C++0x nullptr type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139751 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-14 23:13:28 +00:00
Douglas Gregor
55cf815e19 Add a simple routine to determine the typical system directory for
temporary data. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139725 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-14 20:27:01 +00:00
Jim Grosbach
6148225b95 Move state var to private class member.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139697 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-14 16:37:04 +00:00
Douglas Gregor
dcd9996241 Add APInt support for converting to/from hexatridecimal strings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139695 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-14 15:54:46 +00:00
Benjamin Kramer
ac241fe9f0 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!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139683 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-14 01:22:52 +00:00
Benjamin Kramer
357b571841 Remove unimplemented function prototypes from PathV2. They can be readded when someone cares enough.
Patch by Aaron Ballman!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139682 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-14 01:14:36 +00:00
Benjamin Kramer
836623420d ObjectFile: Add support for mach-o-style dSYM companion files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139676 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-14 00:39:22 +00:00
Eric Christopher
e640a228f6 Fix indenting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139670 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-13 23:45:39 +00:00
Kevin Enderby
f1c21a8da6 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139669 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-13 23:45:18 +00:00
Benjamin Kramer
edca044ab8 Remove include of header that doesn't exist (yet).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139629 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-13 19:55:32 +00:00
Benjamin Kramer
72c0d7fdd3 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139627 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-13 19:42:23 +00:00
Benjamin Kramer
8c74f7f299 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!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139626 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-13 19:42:16 +00:00
Jakob Stoklund Olesen
ee5655dca4 Switch extendInBlock() to take a kill slot instead of the last use slot.
Three out of four clients prefer this interface which is consistent with
extendIntervalEndTo() and LiveRangeCalc::extend().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139604 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-13 16:47:56 +00:00
Devang Patel
de9ddbf19a Maintain hexadecimal order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139601 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-13 16:39:59 +00:00
Devang Patel
5443140021 Add DW_ATE_UTF, which clang started using in my previous commit!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139503 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 17:18:20 +00:00
Nadav Rotem
fbad25e120 CR fixes per Bruno's request.
Undo the changes from r139285 which added custom lowering to vselect.
Add tablegen lowering for vselect.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139479 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-11 15:02:23 +00:00
Duncan Sands
73c8415d90 Mark the eh.typeid.for intrinsic as being 'const', which it is inside
any given function.  As pointed out by John McCall, this is needed to
have redundant eh.typeid.for tests be eliminated in the presence of
cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139360 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 07:50:37 +00:00
Devang Patel
9aee335c23 Directly point debug info to the stack slot of the arugment, instead of trying to keep track of vreg in which it the arugment is copied. The LiveDebugVariable can keep track of variable's ranges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139330 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-08 22:59:09 +00:00
Benjamin Kramer
0fcab076f0 Add support for relocations to ObjectFile.
Patch by Danil Malyshev!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139314 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-08 20:52:17 +00:00
James Molloy
b950585cc5 Refactor instprinter and mcdisassembler to take a SubtargetInfo. Add -mattr= handling to llvm-mc. Reviewed by Owen Anderson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139237 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-07 17:24:38 +00:00
Duncan Sands
758ba1f4ed When inlining exception handling code into another function, ensure that
duplicate tests are eliminated (for example if the two functions both have
a catch clause catching the same type, ensure the redundant one is removed).
Note that it would probably be safe to say that eh.typeid.for is 'const',
but since two calls to it with the same argument can give different results
(but only if the calls are in different functions), it seems more correct to
mark it only 'pure'; this doesn't get in the way of the optimization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139236 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-07 16:44:14 +00:00
Eli Friedman
981a010c09 Relax the MemOperands on atomics a bit. Fixes -verify-machineinstrs failures for atomic laod/store on ARM.
(The fix for the related failures on x86 is going to be nastier because we actually need Acquire memoperands attached to the atomic load instrs, etc.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139221 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-07 02:23:42 +00:00
Duncan Sands
28b77e968d Add codegen support for vector select (in the IR this means a select
with a vector condition); such selects become VSELECT codegen nodes.
This patch also removes VSETCC codegen nodes, unifying them with SETCC
nodes (codegen was actually often using SETCC for vector SETCC already).
This ensures that various DAG combiner optimizations kick in for vector
comparisons.  Passes dragonegg bootstrap with no testsuite regressions
(nightly testsuite as well as "make check-all").  Patch mostly by
Nadav Rotem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139159 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-06 19:07:46 +00:00
Duncan Sands
4a544a79bd Split the init.trampoline intrinsic, which currently combines GCC's
init.trampoline and adjust.trampoline intrinsics, into two intrinsics
like in GCC.  While having one combined intrinsic is tempting, it is
not natural because typically the trampoline initialization needs to
be done in one function, and the result of adjust trampoline is needed
in a different (nested) function.  To get around this llvm-gcc hacks the
nested function lowering code to insert an additional parent variable
holding the adjust.trampoline result that can be accessed from the child
function.  Dragonegg doesn't have the luxury of tweaking GCC code, so it
stored the result of adjust.trampoline in the memory GCC set aside for
the trampoline itself (this is always available in the child function),
and set up some new memory (using an alloca) to hold the trampoline.
Unfortunately this breaks Go which allocates trampoline memory on the
heap and wants to use it even after the parent has exited (!).  Rather
than doing even more hacks to get Go working, it seemed best to just use
two intrinsics like in GCC.  Patch mostly by Sanjoy Das.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139140 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-06 13:37:06 +00:00
Duncan Sands
dabc280672 Add some simple insertvalue simplifications, for the purpose of cleaning
up do-nothing exception handling code produced by dragonegg.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139113 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-05 06:52:48 +00:00
Andrew Trick
252ef7a61a Comment and clarifying assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139036 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-02 21:20:46 +00:00
Duncan Sands
147272b8a7 Darwin wants ctors/dtors to be ordered the other way round to linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139015 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-02 18:07:19 +00:00
Benjamin Kramer
36a16015ac Don't drop alignment info on local common symbols.
- On COFF the .lcomm directive has an alignment argument.
- On ELF we fall back to .local + .comm

Based on a patch by NAKAMURA Takumi.

Fixes PR9337, PR9483 and PR10128.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138976 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-01 23:04:27 +00:00
Rafael Espindola
f940a1a869 Remove the old tail duplication pass. It is not used and is unable to update
ssa, so it has to be run really early in the pipeline. Any replacement
should probably use the SSAUpdater.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138841 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 23:03:45 +00:00
Benjamin Kramer
d4522460d4 Teach macho-dump to dump the uleb128s referred to by linkedit_data segments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138836 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 22:10:58 +00:00
Jeffrey Yasskin
cda2a146d1 Fix C++0x narrowing errors when char is unsigned.
In the case of EDInstInfo, this would actually cause a bug when -1 became 255
and was then compared >=0 in llvm-mc/Disassembler.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138825 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 20:53:29 +00:00
Nicolas Geoffray
5af214fef0 The code model of JIT should default to JITDefault.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138819 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 19:50:33 +00:00
Rafael Espindola
76927d7586 Emit segmented-stack specific code into function prologues for
X86. Modify the pass added in the previous patch to call this new
code.

This new prologues generated will call a libgcc routine (__morestack)
to allocate more stack space from the heap when required

Patch by Sanjoy Das.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138812 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 19:39:58 +00:00