1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

110811 Commits

Author SHA1 Message Date
David Majnemer
c64f605e39 DataLayout: Be more verbose when diagnosing problems in pointer specs
llvm-svn: 223903
2014-12-10 01:38:28 +00:00
David Majnemer
6cc7f21933 I didn't intend to commit this with r223898
llvm-svn: 223899
2014-12-10 01:17:48 +00:00
David Majnemer
6ed74720c1 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
Matthias Braun
a4879cff1f 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
468dc2a2ae 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
127bb01000 VirtRegMap: Improve block live-in info if subregister liveness is available.
llvm-svn: 223894
2014-12-10 01:13:08 +00:00
Matthias Braun
36f5607400 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
dea09a72f9 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
96b93cde64 LiveRegMatrix: Respect subregister liveness when allocating registers.
llvm-svn: 223891
2014-12-10 01:13:01 +00:00
Matthias Braun
1ace5adf9a 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
154c44f060 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
aee137b922 RegisterCoalescer: Preserve subregister liveranges.
llvm-svn: 223888
2014-12-10 01:12:52 +00:00
Matthias Braun
1a64f03c3e LiveInterval: Add removeEmptySubRanges().
llvm-svn: 223887
2014-12-10 01:12:40 +00:00
Matthias Braun
b3f3f853d1 LiveIntervalAnalysis: Add subregister aware variants pruneValue().
llvm-svn: 223886
2014-12-10 01:12:36 +00:00
Matthias Braun
3c79d93d70 LiveInterval: Introduce LiveQuery accessor for dead or live out values.
llvm-svn: 223885
2014-12-10 01:12:33 +00:00
Matthias Braun
2f6ca57115 Add a flag to enable/disable subregister liveness.
llvm-svn: 223884
2014-12-10 01:12:30 +00:00
Matthias Braun
15bc252518 LiveIntervalAnalysis: Adapt repairIntervalsInRange() to subregister liveness.
llvm-svn: 223883
2014-12-10 01:12:26 +00:00
Matthias Braun
6a29b7d65d LiveRangeEdit: Adapt eliminateDeadDef() to subregister liveness.
llvm-svn: 223882
2014-12-10 01:12:23 +00:00
Matthias Braun
e99321cb2c LiveIntervalAnalysis: Adapt handleMove() to subregister ranges.
llvm-svn: 223881
2014-12-10 01:12:20 +00:00
Matthias Braun
c0de88f8cf LiveIntervalAnalysis: Update SubRanges in shrinkToUses().
llvm-svn: 223880
2014-12-10 01:12:18 +00:00
Matthias Braun
0be203875b LiveIntervalAnalysis: Make computeDeadValues() private.
llvm-svn: 223879
2014-12-10 01:12:15 +00:00
Matthias Braun
811d864c60 LiveIntervalAnalysis: Compute subregister ranges.
llvm-svn: 223878
2014-12-10 01:12:12 +00:00
Matthias Braun
40d9c3d4f3 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
8d1fe23470 LiveInterval: Add a 'covers' operation to LiveRange.
llvm-svn: 223876
2014-12-10 01:12:06 +00:00
Matthias Braun
37fe3b7708 LiveInterval: Add const version of LiveRange::advanceTo().
llvm-svn: 223875
2014-12-10 01:12:02 +00:00
Matthias Braun
ab5b739bb2 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
b86ee4fb38 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 Majnemer
2d2a18adb4 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
Philip Reames
547b3b5980 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
Nico Weber
3071e149df 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
e8bfa7e348 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
9f7458d44b [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
Philip Reames
ef92ec467d 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
c0e64c52d3 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
David Majnemer
439f3eddb7 Forgot to add test for r223856
llvm-svn: 223857
2014-12-09 23:51:14 +00:00
David Majnemer
c91d74860c AsmParser: Verifier that the contents of a hex integer are hex
llvm-svn: 223856
2014-12-09 23:50:38 +00:00
Kaelyn Takata
b44fdb0f19 Rename static functiom "map" to be more descriptive and to avoid
potential confusion with the std::map type.

llvm-svn: 223853
2014-12-09 23:32:46 +00:00
Duncan P. N. Exon Smith
9c554e7d55 IR: Metadata: Detect an RAUW recursion
Speculatively handle a recursion in
`GenericMDNode::handleChangedOperand()`.  I'm hoping this fixes the
failing hexagon bot [1].

[1]: http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/13434

llvm-svn: 223849
2014-12-09 23:04:59 +00:00
Michael Zolotukhin
54137f16c1 Remove redundant variable.
Tested by adding assert(LoopVectorPreHeader == VecPreheader) on LLVM
test suite and SPECs.

llvm-svn: 223847
2014-12-09 22:45:07 +00:00
Colin LeMahieu
a380819b69 [Hexagon] [NFC] Cleaning up unused classes.
llvm-svn: 223845
2014-12-09 22:33:26 +00:00
Ahmed Bougacha
c032d370a9 [ARM] Make testcase more explicit. NFC.
llvm-svn: 223841
2014-12-09 22:08:57 +00:00
Ahmed Bougacha
b49dc58627 [ARM] Factor out base-updating VLD/VST combiner function. NFC.
Move the combiner-state check into another function, add a few
small comments, and use a more general type in a cast<>.

In preparation for a future patch.

llvm-svn: 223834
2014-12-09 21:30:00 +00:00
Ahmed Bougacha
169238fd92 [ARM] Move the store combiner function down. NFC.
And flip its final condition.
In preparation for a future patch.

llvm-svn: 223833
2014-12-09 21:26:53 +00:00
Ahmed Bougacha
80726eea3d [ARM] Also support v2f64 vld1/vst1.
It was missing from the VLD1/VST1 handling logic, even though the
corresponding instructions exist (same form as v2i64).

In preparation for a future patch.

llvm-svn: 223832
2014-12-09 21:25:00 +00:00
Duncan P. N. Exon Smith
2f0a43e16e IR: Metadata/Value split: RAUW in a deterministic order
RAUW in a deterministic order to try to recover the hexagon bot [1],
whose tests started failing once my GCC fixes were in for r223802.

Otherwise, I'm not sure why tests would fail there and not here.

[1]: http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/13426

llvm-svn: 223829
2014-12-09 21:12:56 +00:00
Rafael Espindola
2b82749cbe Return ErrorOr<std::unique_ptr<Archive>> form getAsArchive.
This is the same return type of Archive::create.

llvm-svn: 223827
2014-12-09 21:05:36 +00:00
Hans Wennborg
d118238f64 Try fixing MSVC build after r223802
LLVM_EXPLICIT is only supported by recent version of MSVC, and it seems
the not-so-recent versions get confused about the operator bool() when
tryint to resolve operator== calls.

This removed the operator bool()'s since they don't seem to be used
anyway.

llvm-svn: 223824
2014-12-09 20:39:15 +00:00
Colin LeMahieu
442a846f8d [Hexagon] Fixing broken tests.
llvm-svn: 223823
2014-12-09 20:36:53 +00:00
Rafael Espindola
52a8798c70 Rename createIRObjectFile to just create.
It is a static method of IRObjectFile, so having to use
IRObjectFile::createIRObjectFile was redundant.

llvm-svn: 223822
2014-12-09 20:36:13 +00:00
Colin LeMahieu
867128021f [Hexagon] Updating rr/ri 32/64 transfer encodings and adding tests.
llvm-svn: 223821
2014-12-09 20:23:30 +00:00