Commit Graph

82644 Commits

Author SHA1 Message Date
Chris Lattner
626b108619 Genericize the intrinsics descriptor decoding a bit to make room
for future expansion, no functionality change yet though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156979 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-17 05:13:57 +00:00
Chris Lattner
d7cf5eb021 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156978 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-17 05:03:24 +00:00
Chris Lattner
46aaf69e37 strengthen the intrinsic descriptor stuff to be able to handle sin, cos and other
intrinsics that use passed-in arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156977 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-17 04:30:58 +00:00
Chris Lattner
15706cbf85 simplify code generated by tblgen that is not necessary since we dropped
compatibility with LLVM 2.x bitcode files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156976 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-17 04:07:48 +00:00
Francois Pichet
e4807c1ba1 I forgot the #ifdef _MSC_VER guard in my last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156975 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-17 04:00:03 +00:00
Francois Pichet
3aca879906 Fix the MSVC 2010 build: disable the optimizer for a problematic function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156973 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-17 03:38:19 +00:00
Jakob Stoklund Olesen
3778aeb748 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156960 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-16 23:03:04 +00:00
Akira Hatanaka
66e19c3e9d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156958 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-16 22:19:56 +00:00
Eric Christopher
bec5463937 Grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156955 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-16 22:08:58 +00:00
Jakob Stoklund Olesen
07a267faec 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156951 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-16 21:22:35 +00:00
Simon Atanasyan
d938935dca Disable JITTest.FunctionIsRecompiledAndRelinked and JITTest.NoStubs
on MIPS where they are not implemented.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156935 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-16 19:07:55 +00:00
Danil Malyshev
068c65b22d 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156933 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-16 18:50:11 +00:00
Benjamin Kramer
ab53f8ea6a Hexagon: Remove unused command line option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156917 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-16 15:03:55 +00:00
Duncan Sands
abaf91557f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156915 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-16 12:25:43 +00:00
Chandler Carruth
8bc3434e68 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156913 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-16 08:32:49 +00:00
Duncan Sands
04b2c50427 Fix a thinko in DisintegrateMERGE_VALUES. Patch by Xiaoyi Guo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156909 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-16 07:57:18 +00:00
Chris Lattner
a98aa6ad1e 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156905 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-16 06:34:44 +00:00
Chris Lattner
7200c5cd30 have tblgen emit cast<> instead of dyn_cast<> when we know it must succeed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156902 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-16 04:51:09 +00:00
Evan Cheng
6100366c2f Avoid creating a cycle when folding load / op with flag / store. PR11451474. rdar://11451474
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156896 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-16 01:54:27 +00:00
John Criswell
99534f3a0d Fixed grammar for the llvm.trap intrinsic description.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156881 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-16 00:26:51 +00:00
Jakob Stoklund Olesen
83b3a29334 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156878 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 23:31:35 +00:00
Jakob Stoklund Olesen
ceacd6da8c 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156869 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 22:26:28 +00:00
Jakob Stoklund Olesen
70724aaf73 Handle NewReg==OldReg in renameRegister().
This can happen when widening a virtual register to a super-register
class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156867 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 22:20:27 +00:00
Jakob Stoklund Olesen
141aea9cff We never call adjustCopiesBackFrom() for partial copies.
There is no need to look at an always null SrcIdx.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156866 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 22:18:49 +00:00
Daniel Dunbar
40d65dc305 llvm-config: Use sys::fs::equivalent instead of string comparison.
- Hopefully fixes PR11600 (untested).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156865 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 22:07:18 +00:00
Daniel Dunbar
719daba3e0 [Support] Add a version of sys::fs::equivalent() that treats errors as false.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156864 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 22:07:14 +00:00
Daniel Dunbar
89e369ad61 [docs] Remove unsupported references to ExtraSource variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156857 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 21:32:27 +00:00
Bill Wendling
ed0ab54d36 Add blurb for Crack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156852 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 20:47:23 +00:00
Kevin Enderby
e545c4e45d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156850 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 20:20:50 +00:00
Nuno Lopes
ac94bd88d8 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)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156849 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 20:20:14 +00:00
Jakob Stoklund Olesen
94b62ac5f3 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156848 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 20:09:43 +00:00
Akira Hatanaka
6ed743ed4e Update MIPS' section in the release notes. Patch by Simon Atanasyan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156847 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 20:06:41 +00:00
Andrew Trick
eb05b976e6 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!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156842 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 18:59:41 +00:00
Kevin Enderby
41854aea66 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156840 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 18:57:14 +00:00
Daniel Dunbar
b5cd41e26f 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156838 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 18:44:17 +00:00
Daniel Dunbar
177a119621 llvm-build: Don't emit library information for disabled targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156837 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 18:44:12 +00:00
Daniel Dunbar
e1accd7660 [utils] Fix Get{RepositoryPath,SourceVersion} to have a more robust is-git-svn
check.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156836 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 18:44:09 +00:00
Jim Grosbach
0ee07e0130 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156829 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 17:35:57 +00:00
Jim Grosbach
918f55fe23 Allow MCCodeEmitter access to the target MCRegisterInfo.
Add the MCRegisterInfo to the factories and constructors.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156828 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 17:35:52 +00:00
Sirish Pande
0031af6615 Enable all Hexagon tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156824 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 16:13:12 +00:00
Nuno Lopes
39de32f497 minor simplification to code: Ty is already a SCEV type; don't need to run getEffectiveSCEVType() twice
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156823 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 15:44:38 +00:00
David Chisnall
6dd3bdb18a Add some release notes about compiler-rt and libc++
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156819 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 13:06:46 +00:00
David Majnemer
ac78266674 Teach SimplifyLibCalls about stpcpy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156815 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 11:46:21 +00:00
Bill Wendling
fc6fd994ab Remove warning about testing unsigned int with int.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156812 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 09:59:13 +00:00
Stepan Dyatkovskiy
661f760320 Fixed one small stupid, but critical bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156810 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 09:21:39 +00:00
Stepan Dyatkovskiy
c2c52a6470 Rejected r156804 due to buildbots failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156808 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 06:50:18 +00:00
Stepan Dyatkovskiy
a62e235c1c SelectionDAGBuilder::Clusterify : main functinality was replaced with CRSBuilder::optimize, so big part of Clusterify's code was reduced.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156804 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 05:09:41 +00:00
Akira Hatanaka
24d86e0ca9 Temporarily disable anti-dependence breaking for Mips until bug 12829 is
resolved.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156801 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 03:14:52 +00:00
Jakob Stoklund Olesen
40c6fb397d Create a struct representing register units in TableGen.
Besides the weight, we also want to store up to two root registers per
unit. Most units will have a single root, the leaf register they
represent. Units created for ad hoc aliasing get two roots: The two
aliasing registers.

The root registers can be used to compute the set of overlapping
registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156792 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 00:50:23 +00:00
Bill Wendling
ecb3f43d64 Remove extraneous ';'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156791 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 00:41:56 +00:00