Commit Graph

188482 Commits

Author SHA1 Message Date
David Majnemer 6f3be2e155 AsmParser: Don't allow null bytes in BB labels
Since Value objects can't have null bytes in their name, we shouldn't
allow them in the labels of basic blocks.

llvm-svn: 223907
2014-12-10 02:10:35 +00:00
Enrico Granata ff0f23dd41 Remove the last vestige of the world before data formatters :-)
Function pointers had a summary generated for them bypassing formatters, directly as part of the ValueObject subsystem

This patch transitions that code into a hardcoded summary

llvm-svn: 223906
2014-12-10 02:00:45 +00:00
Oleksiy Vyalov b9321bd774 Skip TestExprPathSynthetic test on FreeBSD, Linux & Windows.
llvm-svn: 223905
2014-12-10 01:48:17 +00:00
Duncan P. N. Exon Smith f14b1df55b IR: Move call to dropAllReferences() to MDNode subclasses
Don't call `dropAllReferences()` from `MDNode::~MDNode()`, call it
directly from `~MDNodeFwdDecl()` and `~GenericMDNode()`.

llvm-svn: 223904
2014-12-10 01:45:04 +00:00
David Majnemer 2dc1b0f514 DataLayout: Be more verbose when diagnosing problems in pointer specs
llvm-svn: 223903
2014-12-10 01:38:28 +00:00
David Blaikie 7c5da41c70 DebugInfo: Correct location information for array accesses to elements of variable array type.
llvm-svn: 223902
2014-12-10 01:34:25 +00:00
Oleksiy Vyalov 859e4b5da1 Add D request handler to GDBRemoteCommunicationServer in order to support detach from inferior.
llvm-svn: 223901
2014-12-10 01:27:28 +00:00
Sean Callanan 238d897b07 Made the ASTImporter resilient if it can't import
SourceLocations.  LLDB rarely has the same files
mapped into the target AST context as the source
AST context, so the ASTImporter shouldn't expect
to see those files there.

This started to become a problem when importing
entities from modules -- these have proper source
locations, in contrast to all the ASTs LLDB
creates which have empty ones.

llvm-svn: 223900
2014-12-10 01:26:39 +00:00
David Majnemer 84f798f0eb I didn't intend to commit this with r223898
llvm-svn: 223899
2014-12-10 01:17:48 +00:00
David Majnemer 5330c69bd1 DataLayout: Move asserts over to report_fatal_error
As indicated by the tests, it is possible to feed the AsmParser an
invalid datalayout string.  We should verify the result of parsing this
string regardless of whether or not we have assertions enabled.

llvm-svn: 223898
2014-12-10 01:17:08 +00:00
David Blaikie d85548d423 DebugInfo: Fix another case of array access line information
llvm-svn: 223897
2014-12-10 01:16:09 +00:00
Matthias Braun 96d7732b08 MachineVerifier: Allow physreg use if just a subreg is defined.
We can't mark partially undefined registers, so we have to allow reading
a register in the machine verifier if just parts of a register are
defined.

llvm-svn: 223896
2014-12-10 01:13:13 +00:00
Matthias Braun 21554d9b30 MachineVerifier: Allow LiveInterval segments to end at a partial write.
In the subregister liveness tracking case we do not create implicit
reads on partial register writes anymore, still we need to produce a new
SSA value for partial writes so the live segment has to end.

llvm-svn: 223895
2014-12-10 01:13:11 +00:00
Matthias Braun 279f83645c VirtRegMap: Improve block live-in info if subregister liveness is available.
llvm-svn: 223894
2014-12-10 01:13:08 +00:00
Matthias Braun e348a09ac0 MCRegisterInfo: Add MCSubRegIndexIterator.
This iterator iterates over subregister and their associated subregister indices
at the same time.

llvm-svn: 223893
2014-12-10 01:13:06 +00:00
Matthias Braun d70caaf5a5 VirtRegMap: No implicit defs/uses for super registers with subreg liveness tracking.
Adding the implicit defs/uses to the superregisters is semantically questionable
but was not dangerous before as the register allocator never assigned the same
register to two overlapping LiveIntervals even when the actually live
subregisters do not overlap. With subregister liveness tracking enabled this
does actually happen and leads to subsequent bugs if we don't stop adding
the superregister defs/uses.

llvm-svn: 223892
2014-12-10 01:13:04 +00:00
Matthias Braun 587e27415d LiveRegMatrix: Respect subregister liveness when allocating registers.
llvm-svn: 223891
2014-12-10 01:13:01 +00:00
Matthias Braun a0f0c1f013 LiveIntervalUnion: Allow specification of liverange when unifying/extracting.
This allows it to add subregister ranges into the union.

llvm-svn: 223890
2014-12-10 01:12:59 +00:00
Matthias Braun 755f8b1885 Tablegen'erate lanemasks for register units.
Now we can relate lanemasks in a virtual register to register units.

llvm-svn: 223889
2014-12-10 01:12:56 +00:00
Matthias Braun 14f764c872 RegisterCoalescer: Preserve subregister liveranges.
llvm-svn: 223888
2014-12-10 01:12:52 +00:00
Matthias Braun 2079aa9140 LiveInterval: Add removeEmptySubRanges().
llvm-svn: 223887
2014-12-10 01:12:40 +00:00
Matthias Braun 8970d847c4 LiveIntervalAnalysis: Add subregister aware variants pruneValue().
llvm-svn: 223886
2014-12-10 01:12:36 +00:00
Matthias Braun 630e42e176 LiveInterval: Introduce LiveQuery accessor for dead or live out values.
llvm-svn: 223885
2014-12-10 01:12:33 +00:00
Matthias Braun e3d3b88cb9 Add a flag to enable/disable subregister liveness.
llvm-svn: 223884
2014-12-10 01:12:30 +00:00
Matthias Braun e5f861b781 LiveIntervalAnalysis: Adapt repairIntervalsInRange() to subregister liveness.
llvm-svn: 223883
2014-12-10 01:12:26 +00:00
Matthias Braun fe896c703c LiveRangeEdit: Adapt eliminateDeadDef() to subregister liveness.
llvm-svn: 223882
2014-12-10 01:12:23 +00:00
Matthias Braun 7044d69e87 LiveIntervalAnalysis: Adapt handleMove() to subregister ranges.
llvm-svn: 223881
2014-12-10 01:12:20 +00:00
Matthias Braun 20e1f38a41 LiveIntervalAnalysis: Update SubRanges in shrinkToUses().
llvm-svn: 223880
2014-12-10 01:12:18 +00:00
Matthias Braun bf49cfe3ec LiveIntervalAnalysis: Make computeDeadValues() private.
llvm-svn: 223879
2014-12-10 01:12:15 +00:00
Matthias Braun 2f66232bde LiveIntervalAnalysis: Compute subregister ranges.
llvm-svn: 223878
2014-12-10 01:12:12 +00:00
Matthias Braun 3f1d8fdd33 LiveInterval: Add support to track liveness of subregisters.
This code adds the required data structures. Algorithms to compute it follow.

llvm-svn: 223877
2014-12-10 01:12:10 +00:00
Matthias Braun e62c207092 LiveInterval: Add a 'covers' operation to LiveRange.
llvm-svn: 223876
2014-12-10 01:12:06 +00:00
Matthias Braun e01cf6e4c0 LiveInterval: Add const version of LiveRange::advanceTo().
llvm-svn: 223875
2014-12-10 01:12:02 +00:00
Matthias Braun 24557e5b67 Add function that translates subregister lane masks to other subregs.
This works like the composeSubRegisterIndices() function but transforms
a subregister lane mask instead of a subregister index.

llvm-svn: 223874
2014-12-10 01:12:00 +00:00
Matthias Braun d01627b249 Let tablegen compute maximum lanemask for regs/regclasses.
Let tablegen compute the combination of subregister lanemasks for all
subregisters in a register/register class. This is preparation for further
work subregister allocation

llvm-svn: 223873
2014-12-10 01:11:56 +00:00
David Blaikie f0aceb2f69 DebugInfo: Correct the location of array accesses
Especially relevant to ASan when dealing with complex expressions
containing multiple array accesses. See PR21737.

llvm-svn: 223872
2014-12-10 01:03:48 +00:00
Eric Christopher c67e1b6a2a Make sure that vec_perm is listed as a static function in altivec.h.
llvm-svn: 223871
2014-12-10 00:57:43 +00:00
Reid Kleckner 60e54da723 Tweak test case from r223842 to make it pass on Windows MSVC
We can't mangle __complex yet, and there is no C1 emission.

llvm-svn: 223870
2014-12-10 00:47:33 +00:00
David Majnemer 1d681aa0ba AsmParser: Don't crash if a null byte is inside a quoted string
We don't allow Value* to have names which contain null bytes.  The
AsmParser should reject .ll files that try to do this.

llvm-svn: 223869
2014-12-10 00:43:17 +00:00
Zachary Turner 1b0b3e7e9c Disable data formatter tests on Windows.
clang does not yet support MS-ABI record layout for externally-sourced
ASTs.  As a result, attempting to format something that requires data
layout results in undefined behavior in clang, in this case an assert.

http://llvm.org/pr21800 tracks fixing this on the clang side.

llvm-svn: 223868
2014-12-10 00:39:17 +00:00
Rui Ueyama 00eb257f2e Re-commit r223330: Rewrite InputGraph's Group
llvm-svn: 223867
2014-12-10 00:33:00 +00:00
Philip Reames f3108ce3e8 Extend some comments around GCModuleInfo, GCFunctionInfo, & GCStrategy
Nothing particularly interesting here, just documenting the way the code currently works before I start changing it...

llvm-svn: 223866
2014-12-10 00:30:11 +00:00
Rui Ueyama e4814d0dee Fix Darwin linker. Patch from Jean-Daniel Dupas.
llvm-svn: 223865
2014-12-10 00:24:37 +00:00
Nico Weber a33c5942a3 cmake: Make SVNVersion.inc work on Windows if svn is called svn.bat.
llvm-svn: 223864
2014-12-10 00:10:21 +00:00
Rafael Espindola 4d47f7f52b Simplify the handling of aliases in the gold plugin.
The complicated situation is when we have to keep an alias but drop a GV
that is part of the aliasee.

We used to clone the dropped GV and make the clone internal. This is wasteful
as we know the original will be dropped.

With this patch what is done instead is set the linkage of the original to
internal and replace all uses (but the one in the alias) with a new
declaration that takes the name of the old GV. This saves us from having
to copy the body.

llvm-svn: 223863
2014-12-10 00:09:35 +00:00
Ahmed Bougacha 7efbac74ec [ARM] Combine base-updating/post-incrementing vector load/stores.
We used to only combine intrinsics, and turn them into VLD1_UPD/VST1_UPD
when the base pointer is incremented after the load/store.

We can do the same thing for generic load/stores.

Note that we can only combine the first load/store+adds pair in
a sequence (as might be generated for a v16f32 load for instance),
because other combines turn the base pointer addition chain (each
computing the address of the next load, from the address of the last
load) into independent additions (common base pointer + this load's
offset).

Differential Revision: http://reviews.llvm.org/D6585

llvm-svn: 223862
2014-12-10 00:07:37 +00:00
Nico Weber d95699e9e7 cmake: Make SVNVersion.inc step depend on GetSVN.cmake.
This way, the step generating SVNVersion.inc gets rerun every time someone
changes GetSVN.cmake (which is the file that decides how the contents of
SVNVersion.inc look). This makes hacking on GetSVN.cmake a bit easier.

llvm-svn: 223861
2014-12-10 00:03:37 +00:00
Sean Callanan 0aae04175b Updated the AST importer to support importing
LinkageSpecDecls.  This is relevant when LLDB
wants to import Decls from non-C++ modules,
since many declarations are in extern "C"
blocks.

llvm-svn: 223860
2014-12-10 00:00:37 +00:00
Philip Reames de226055ca Remove the Module pointer from GCStrategy and GCMetadataPrinter
In the current implementation, GCStrategy is a part of the ownership structure for the gc metadata which describes a Module. It also contains a reference to the module in question. As a result, GCStrategy instances are essentially Module specific.

I plan to transition away from this design. Instead, a GCStrategy will be owned by the LLVMContext. It will be a lightweight policy object which contains no information about the Modules or Functions involved, but can be easily reached given a Function.

The first step in this transition is to remove the direct Module reference from GCStrategy. This also requires removing the single user of this reference, the GCMetadataPrinter hierarchy. In theory, this will allow the lifetime of the printers to be scoped to the LLVMContext as well, but in practice, I'm not actually changing that. (Yet?)

An alternate design would have been to move the direct Module reference into the GCMetadataPrinter and change the keying of the owning maps to explicitly key off both GCStrategy and Module. I'm open to doing it that way instead, but didn't see much value in preserving the per Module association for GCMetadataPrinters.

The next change in this sequence will be to start unwinding the intertwined ownership between GCStrategy, GCModuleInfo, and GCFunctionInfo.

Differential Revision: http://reviews.llvm.org/D6566

llvm-svn: 223859
2014-12-09 23:57:54 +00:00
Duncan P. N. Exon Smith 22600ff328 IR: Fix memory corruption in MDNode new/delete
There were two major problems with `MDNode` memory management.

 1. `MDNode::operator new()` called a placement array constructor for
    `MDOperand`.  What?  Each operand needs to be placed individually.

 2. `MDNode::operator delete()` failed to destruct the `MDOperand`s at
    all.

Frankly it's hard to understand how this worked locally, how this
survived an LTO bootstrap, or how it worked on most of the bots.

llvm-svn: 223858
2014-12-09 23:56:39 +00:00