Commit Graph

82389 Commits

Author SHA1 Message Date
Andrew Trick 7d90035b0b whitespace
llvm-svn: 157002
2012-05-17 18:35:00 +00:00
Jakob Stoklund Olesen c3553ffc70 Never clear <undef> flags on already joined copies.
RegisterCoalescer set <undef> flags on all operands of copy instructions
that are scheduled to be removed. This is so they won't affect
shrinkToUses() by introducing false register reads.

Make sure those <undef> flags are never cleared, or shrinkToUses() could
cause live intervals to end at instructions about to be deleted.

This would be a lot simpler if RegisterCoalescer could just erase joined
copies immediately instead of keeping all the to-be-deleted instructions
around.

This fixes PR12862. Unfortunately, bugpoint can't create a sane test
case for this. Like many other coalescer problems, this failure depends
of a very fragile series of events.

<rdar://problem/11474428>

llvm-svn: 157001
2012-05-17 18:32:42 +00:00
Jakob Stoklund Olesen 14a8745990 Fix a verifier bug.
Make sure useless (def-only) intervals also get verified.

llvm-svn: 157000
2012-05-17 18:32:40 +00:00
Bill Wendling 27489fe014 Relax the requirement that the exception object must be an instruction. During
bugpoint-ing, it may turn into something else.

llvm-svn: 156998
2012-05-17 17:59:51 +00:00
Evandro Menezes 2ca32b3873 [Hexagon] Clean up Hexagon ELF definition.
llvm-svn: 156996
2012-05-17 16:46:46 +00:00
Chris Lattner a3b0f52a72 enhance the intrinsic info stuff to emit encodings that don't fit in 32-bits into a
separate side table, using the handy SequenceToOffsetTable class.  This encodes all
these weird things into another 256 bytes, allowing all intrinsics to be encoded this way.

llvm-svn: 156995
2012-05-17 15:55:41 +00:00
Tim Northover af501a29d3 Remove incorrect pattern for ARM SMML instruction.
Patch by Meador Inge.

llvm-svn: 156989
2012-05-17 13:12:13 +00:00
Manuel Klimek 0fc33af2a7 Fix compile error.
llvm-svn: 156986
2012-05-17 09:32:05 +00:00
Stepan Dyatkovskiy 96d0c925e9 SelectionDAGBuilder: CaseBlock, CaseRanges and CaseCmp changed representation of Low and High from signed to unsigned. Since unsigned ints usually simpler, faster and allows to reduce some extra signed bit checks needed before <,>,<=,>= comparisons.
llvm-svn: 156985
2012-05-17 08:56:30 +00:00
Chris Lattner a57c797c58 Genericize the intrinsics descriptor decoding a bit to make room
for future expansion, no functionality change yet though.

llvm-svn: 156979
2012-05-17 05:13:57 +00:00
Chris Lattner 3e34a7b93d finish encoding all of the interesting details of intrinsics. Now intrinsics
are only rejected because they can't be encoded into a 32-bit unit, not because
they contain an unencodable feature.

llvm-svn: 156978
2012-05-17 05:03:24 +00:00
Chris Lattner 827b253c63 strengthen the intrinsic descriptor stuff to be able to handle sin, cos and other
intrinsics that use passed-in arguments.

llvm-svn: 156977
2012-05-17 04:30:58 +00:00
Chris Lattner 786edd228a simplify code generated by tblgen that is not necessary since we dropped
compatibility with LLVM 2.x bitcode files.

llvm-svn: 156976
2012-05-17 04:07:48 +00:00
Francois Pichet 9522bfc87b I forgot the #ifdef _MSC_VER guard in my last commit.
llvm-svn: 156975
2012-05-17 04:00:03 +00:00
Francois Pichet b273b74373 Fix the MSVC 2010 build: disable the optimizer for a problematic function.
llvm-svn: 156973
2012-05-17 03:38:19 +00:00
Jakob Stoklund Olesen 6d808257b2 Use RegUnits to compute overlapping registers.
TableGen already computes register units as the basic unit of
interference. We can use that to compute the set of overlapping
registers.

This means that we can easily compute overlap sets for one register at a
time. There is no benefit to computing all registers at once.

llvm-svn: 156960
2012-05-16 23:03:04 +00:00
Akira Hatanaka 0faaebf27c This patch adds the register class for MIPS16 as well as the ability for
llc to recognize MIPS16 as a MIPS ASE extension. -mips16 will mean the
mips16 ASE for mips32 by default.

As part of fixing of adding this we discovered some small changes that
need to be made to MipsInstrInfo::storeRegToStackSLot and
MipsInstrInfo::loadRegFromStackSlot. We were using some "==" equality tests
where in fact we should have been using Mips::<regclas>.hasSubClassEQ instead,
per suggestion of Jakob Stoklund Olesen.

Patch by Reed Kotler.

llvm-svn: 156958
2012-05-16 22:19:56 +00:00
Eric Christopher 7be1ac7e1d Grammar.
llvm-svn: 156955
2012-05-16 22:08:58 +00:00
Jakob Stoklund Olesen ab4828390c Set sub-register <undef> flags more accurately.
When widening an existing <def,reads-undef> operand to a super-register,
it may be necessary to clear the <undef> flag because the wider register
is now read-modify-write through the instruction.

Conversely, it may be necessary to add an <undef> flag when the
coalescer turns a full-register def into a sub-register def, but the
larger register wasn't live before the instruction.

This happens in test/CodeGen/ARM/coalesce-subregs.ll, but the test
is too small for the <undef> flags to affect the generated code.

llvm-svn: 156951
2012-05-16 21:22:35 +00:00
Simon Atanasyan 5750957369 Disable JITTest.FunctionIsRecompiledAndRelinked and JITTest.NoStubs
on MIPS where they are not implemented.

llvm-svn: 156935
2012-05-16 19:07:55 +00:00
Danil Malyshev 8c17fbd6c1 Added LLIMCJITMemoryManager to the lli. This manager will be used for MCJIT instead of DefaultJIMMemoryManager.
It's more flexible for MCJIT tasks, in addition it's provides a invalidation instruction cache for code sections which will be used before JIT code will be executed.

llvm-svn: 156933
2012-05-16 18:50:11 +00:00
Benjamin Kramer 7faf84f125 Hexagon: Remove unused command line option.
llvm-svn: 156917
2012-05-16 15:03:55 +00:00
Duncan Sands e51c8442dd I noticed that named metadata doesn't provide a direct way of getting at the
named metadata list, unlike all the other global objects (global variables,
functions, aliases), so add that for consistency.

llvm-svn: 156915
2012-05-16 12:25:43 +00:00
Chandler Carruth d8c08c2111 Teach the 'opt' tool about '-Os' and '-Oz', corresponding to the Clang
options, to enable easier testing of the innards of LLVM that are
enabled by such optimization strategies.

Note that this doesn't provide the (much needed) function attribute
support for -Oz (as opposed to -Os), but still seems like a positive
step to better test the logic that Clang currently relies on.

Patch by Patrik Hägglund.

llvm-svn: 156913
2012-05-16 08:32:49 +00:00
Duncan Sands 49080cd9a1 Fix a thinko in DisintegrateMERGE_VALUES. Patch by Xiaoyi Guo.
llvm-svn: 156909
2012-05-16 07:57:18 +00:00
Chris Lattner 7f0e7bae25 Significantly reduce the compiled size of Functions.cpp by turning a big blob of tblgen
generated code (for Intrinsic::getType) into a table.  This handles common cases right now,
but I plan to extend it to handle all cases and merge in type verification logic as well
in follow-on patches.

llvm-svn: 156905
2012-05-16 06:34:44 +00:00
Chris Lattner d785d060f9 have tblgen emit cast<> instead of dyn_cast<> when we know it must succeed.
llvm-svn: 156902
2012-05-16 04:51:09 +00:00
Evan Cheng 58a95f0c8a Avoid creating a cycle when folding load / op with flag / store. PR11451474. rdar://11451474
llvm-svn: 156896
2012-05-16 01:54:27 +00:00
John Criswell 4e711921ba Fixed grammar for the llvm.trap intrinsic description.
llvm-svn: 156881
2012-05-16 00:26:51 +00:00
Jakob Stoklund Olesen 984997b3a0 Enable sub-sub-register copy coalescing.
It is now possible to coalesce weird skewed sub-register copies by
picking a super-register class larger than both original registers. The
included test case produces code like this:

  vld2.32 {d16, d17, d18, d19}, [r0]!
  vst2.32 {d18, d19, d20, d21}, [r0]

We still perform interference checking as if it were a normal full copy
join, so this is still quite conservative. In particular, the f1 and f2
functions in the included test case still have remaining copies because
of false interference.

llvm-svn: 156878
2012-05-15 23:31:35 +00:00
Jakob Stoklund Olesen a1626369b6 Teach RegisterCoalescer to handle symmetric sub-register copies.
It is possible to coalesce two overlapping registers to a common
super-register that it larger than both of the original registers.

The important difference is that it may be necessary to rewrite DstReg
operands as well as SrcReg operands because the sub-register index has
changed.

This behavior is still disabled by CoalescerPair.

llvm-svn: 156869
2012-05-15 22:26:28 +00:00
Jakob Stoklund Olesen 385970f290 Handle NewReg==OldReg in renameRegister().
This can happen when widening a virtual register to a super-register
class.

llvm-svn: 156867
2012-05-15 22:20:27 +00:00
Jakob Stoklund Olesen 1c6a2223d4 We never call adjustCopiesBackFrom() for partial copies.
There is no need to look at an always null SrcIdx.

llvm-svn: 156866
2012-05-15 22:18:49 +00:00
Daniel Dunbar f1ab402ecd llvm-config: Use sys::fs::equivalent instead of string comparison.
- Hopefully fixes PR11600 (untested).

llvm-svn: 156865
2012-05-15 22:07:18 +00:00
Daniel Dunbar cce6248ede [Support] Add a version of sys::fs::equivalent() that treats errors as false.
llvm-svn: 156864
2012-05-15 22:07:14 +00:00
Daniel Dunbar f8deeb241a [docs] Remove unsupported references to ExtraSource variable.
llvm-svn: 156857
2012-05-15 21:32:27 +00:00
Bill Wendling a548587d48 Add blurb for Crack.
llvm-svn: 156852
2012-05-15 20:47:23 +00:00
Kevin Enderby a414bcc0e3 Add a test case for r156840, a fix to llvm-objdump when disassembling using
-macho to disassemble the last symbol to the end of the section.

llvm-svn: 156850
2012-05-15 20:20:50 +00:00
Nuno Lopes c2a170e26e reuse the result of some expensive computations in getSignExtendExpr() and getZeroExtendExpr()
this gives a speedup of > 80 in a debug build in the test case of PR12825 (php_sha512_crypt_r)

llvm-svn: 156849
2012-05-15 20:20:14 +00:00
Jakob Stoklund Olesen 71673b4faf Extend the CoalescerPair interface to handle symmetric sub-register copies.
Now both SrcReg and DstReg can be sub-registers of the final coalesced
register.

CoalescerPair::setRegisters still rejects such copies because
RegisterCoalescer doesn't yet handle them.

llvm-svn: 156848
2012-05-15 20:09:43 +00:00
Akira Hatanaka 7006265874 Update MIPS' section in the release notes. Patch by Simon Atanasyan.
llvm-svn: 156847
2012-05-15 20:06:41 +00:00
Andrew Trick da01ba37e0 Add -enable-aa-sched-mi, off by default, for AliasAnalysis inside MachineScheduler.
This feature avoids creating edges in the scheduler's dependence graph
for non-aliasing memory operations according to whichever alias
analysis is available. It has been fully tested in Hexagon. Before
making this default, it needs to be extended to handle multiple
MachineMemOperands, compile time needs more evaluation, and
benchmarking on X86 and ARM is needed.

Patch by Sergei Larin!

llvm-svn: 156842
2012-05-15 18:59:41 +00:00
Kevin Enderby edd5872f33 Fixed a bug in llvm-objdump when disassembling using -macho option for a binary
that has more than one symbol.  The last symbol was not being disassembled to
the end of the section.

llvm-svn: 156840
2012-05-15 18:57:14 +00:00
Daniel Dunbar c364d68bf2 llvm-build: Add support for non-installed libraries (e.g., gtest).
- These libraries are only reported by llvm-config when run from a development
   tree.

llvm-svn: 156838
2012-05-15 18:44:17 +00:00
Daniel Dunbar f876da13d0 llvm-build: Don't emit library information for disabled targets.
llvm-svn: 156837
2012-05-15 18:44:12 +00:00
Daniel Dunbar bf0bf743d7 [utils] Fix Get{RepositoryPath,SourceVersion} to have a more robust is-git-svn
check.

llvm-svn: 156836
2012-05-15 18:44:09 +00:00
Jim Grosbach 97609a84ec TableGen'erate mapping physical registers to encoding values.
Many targets always use the same bitwise encoding value for physical
registers in all (or most) instructions. Add this mapping to the
.td files and TableGen'erate the information and expose an accessor
in MCRegisterInfo.

patch by Tom Stellard.

llvm-svn: 156829
2012-05-15 17:35:57 +00:00
Jim Grosbach c3b0427921 Allow MCCodeEmitter access to the target MCRegisterInfo.
Add the MCRegisterInfo to the factories and constructors.

Patch by Tom Stellard <Tom.Stellard@amd.com>.

llvm-svn: 156828
2012-05-15 17:35:52 +00:00
Sirish Pande 91856a1f15 Enable all Hexagon tests.
llvm-svn: 156824
2012-05-15 16:13:12 +00:00
Nuno Lopes ab5c924006 minor simplification to code: Ty is already a SCEV type; don't need to run getEffectiveSCEVType() twice
llvm-svn: 156823
2012-05-15 15:44:38 +00:00