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

82786 Commits

Author SHA1 Message Date
Craig Topper
52bf0cfb27 Add intrinsic forms for FMA instructions to opcode folding tables.
llvm-svn: 157917
2012-06-04 07:46:16 +00:00
Duncan Sands
2f70cb3b88 getAllOnesValue also works for vectors of integers.
llvm-svn: 157915
2012-06-04 07:18:12 +00:00
Craig Topper
eb2d859f52 Add VFMADDSUB and VFMSUBADD FMA instructions to folding tables. Also add 213 forms of scalar FMA instructions.
llvm-svn: 157914
2012-06-04 07:08:21 +00:00
Hal Finkel
c1daf7daf8 Fix a copy-and-paste duplication error in the PPC 440 and A2 schedules (no functionality change).
llvm-svn: 157912
2012-06-04 02:39:52 +00:00
Hal Finkel
c1fe73fae2 Enable generating PPC pre-increment (r+imm) instructions by default.
It seems that this no longer causes test suite failures on PPC64 (after r157159),
and often gives a performance benefit, so it can be enabled by default.

llvm-svn: 157911
2012-06-04 02:21:00 +00:00
Rafael Espindola
a6ed019c71 Represent .rept as an anonymous macro. This removes the need for the ActiveRept
vector. No functionality change.
Extracted from a patch by the PaX Team.

llvm-svn: 157909
2012-06-03 23:57:14 +00:00
Rafael Espindola
454587b972 Add a typedef to simplify the code a bit. Not functionality change.
Part of a patch by the PaX Team.

llvm-svn: 157908
2012-06-03 22:41:23 +00:00
Craig Topper
5837bcfc02 Rename FMA3 feature flag to just FMA to match gcc so it can be added to clang.
llvm-svn: 157903
2012-06-03 18:58:46 +00:00
Craig Topper
ea8ead0d4c Simplify the fma4 renaming code.
llvm-svn: 157902
2012-06-03 16:48:52 +00:00
NAKAMURA Takumi
8b305bfcd3 IntRange: Restore the copy constuctor explicitly to appase buildbot.
llvm-svn: 157901
2012-06-03 15:42:12 +00:00
Craig Topper
4809989f8a Autoupgrade support the rename of x86.fma4 intrinsics to x86.fma from r157898.
llvm-svn: 157899
2012-06-03 08:07:25 +00:00
Craig Topper
8d3031fa46 Rename fma4 intrinsics to just fma since they are now used for both FMA4 and FMA3. Autoupgrade support coming in a separate commit.
llvm-svn: 157898
2012-06-03 07:26:46 +00:00
Manman Ren
c3a6de9953 Revert r157831
llvm-svn: 157896
2012-06-03 03:14:24 +00:00
Craig Topper
685b86b007 Use sse_load_f32/64 for scalar FMA3 intrinsic patterns instead of 128-bit loads to match instruction behavior.
llvm-svn: 157895
2012-06-03 01:40:43 +00:00
Craig Topper
e783584ea7 Add neverHasSideEffects and mayLoad to FMA3 instructions.
llvm-svn: 157894
2012-06-03 00:30:49 +00:00
Benjamin Kramer
20f186ceb7 Use access(2) instead of stat(2) to check if a file exists.
Apart from being slightly cheaper, this fixes a real bug that hits 32 bit
linux systems. When passing a file larger than 2G to be linked (which isn't
that uncommon with large projects such as WebKit), clang's driver checks
if the file exists but the file size doesn't fit in an off_t and stat(2)
fails with EOVERFLOW. Clang then says that the file doesn't exist instead
of passing it to the linker.

llvm-svn: 157891
2012-06-02 16:28:09 +00:00
Stepan Dyatkovskiy
aae17ee48f Added unittests for IntegersSubset and IntegersSubsetMapping.
- Fixed IntegersSubsetGeneric copy/assignment behaviour. 
- Fixed IntegersSubsetGeneric::getSize/getSingleValue methods.
- Fixed IntegersSubsetGeneric::verify method.

Also IntegersSubset.h and IntegersSubsetMapping.h headers was fixed.

llvm-svn: 157887
2012-06-02 13:47:12 +00:00
Benjamin Kramer
bb30e1face Fix typos found by http://github.com/lyda/misspell-check
llvm-svn: 157885
2012-06-02 10:20:22 +00:00
Stepan Dyatkovskiy
4246540c22 PR1255: case ranges.
IntRange converted from struct to class. So main change everywhere is replacement of ".Low/High" with ".getLow/getHigh()"

llvm-svn: 157884
2012-06-02 09:42:43 +00:00
Benjamin Kramer
23f7f57c50 Add move semantics to APInt.
llvm-svn: 157883
2012-06-02 08:39:08 +00:00
Stepan Dyatkovskiy
1ed91c6a4b Additional change for 157881. Forget to fix another IntegerSubset constructor.
llvm-svn: 157882
2012-06-02 08:03:34 +00:00
Stepan Dyatkovskiy
8aeda74069 Small fix due to buildbot failures on mingw32. Fixed call of parent constructor for case when parent is template.
llvm-svn: 157881
2012-06-02 07:44:19 +00:00
Stepan Dyatkovskiy
f302516204 PR1255: case ranges.
IntegersSubsetGeneric, IntegersSubsetMapping: added IntTy template parameter, that allows use either APInt or IntItem. This change allows to write unittest for these classes.

llvm-svn: 157880
2012-06-02 07:26:00 +00:00
Manman Ren
f8ff637b8d ARM: add testing case for struct byval
rdar://9877866

llvm-svn: 157876
2012-06-02 05:37:44 +00:00
Akira Hatanaka
cb564aef50 Add another test case which tests Mips' unaligned load/store instructions.
llvm-svn: 157874
2012-06-02 01:13:10 +00:00
Akira Hatanaka
61caea0140 Fix a bug in the code which custom-lowers truncating stores in LegalizeDAG.
Check that the SDValue TargetLowering::LowerOperation returns is not null
before replacing the original node with the returned node.

llvm-svn: 157873
2012-06-02 01:10:34 +00:00
Chris Lattner
68489fe6b7 remove an unused variable.
llvm-svn: 157872
2012-06-02 01:03:42 +00:00
Akira Hatanaka
2567e6aec1 Fix test cases in test/CodeGen/Mips.
llvm-svn: 157868
2012-06-02 00:05:45 +00:00
Akira Hatanaka
378d42a0b3 Remove code which is no longer needed in MipsAsmPrinter and MipsMCInstLower.
llvm-svn: 157867
2012-06-02 00:05:11 +00:00
Akira Hatanaka
334dbca66f Set operation actions for load/store nodes in the Mips backend.
llvm-svn: 157866
2012-06-02 00:04:42 +00:00
Akira Hatanaka
b2bdf54ad5 Add definitions of 32/64-bit unaligned load/store instructions for Mips.
llvm-svn: 157865
2012-06-02 00:04:19 +00:00
Akira Hatanaka
b7342fea3a Define functions MipsTargetLowering::LowerLOAD and LowerSTORE which
custom-lower unaligned load and store nodes.

llvm-svn: 157864
2012-06-02 00:03:49 +00:00
Akira Hatanaka
80b29cb00a Define Mips specific unaligned load/store nodes.
llvm-svn: 157863
2012-06-02 00:03:12 +00:00
Akira Hatanaka
23e92c0ddb Expand unaligned i16 loads/stores for the Mips backend.
This is the first of a series of patches which make changes to the backend to
emit unaligned load/store instructions (lwl,lwr,swl,swr) during instruction
selection.

llvm-svn: 157862
2012-06-02 00:02:45 +00:00
Akira Hatanaka
72d95cef06 In MipsMCInstLower::LowerSymbolOperand, get offset from symbol if
the MachineOperand type has a valid offset. 

llvm-svn: 157861
2012-06-02 00:02:11 +00:00
Jakob Stoklund Olesen
ee64ad3aba Remove the old register list functions from MCRegisterInfo.
These functions exposed the layout of the underlying data tables as
null-terminated uint16_t arrays.

Use the new MCSubRegIterator, MCSuperRegIterator, and MCRegAliasIterator
classes instead.

llvm-svn: 157855
2012-06-01 23:28:34 +00:00
Jakob Stoklund Olesen
be0b8939c0 Switch all register list clients to the new MC*Iterator interface.
No functional change intended.

Sorry for the churn. The iterator classes are supposed to help avoid
giant commits like this one in the future. The TableGen-produced
register lists are getting quite large, and it may be necessary to
change the table representation.

This makes it possible to do so without changing all clients (again).

llvm-svn: 157854
2012-06-01 23:28:30 +00:00
Bill Wendling
f0e0ba446d Register the gcov "writeout" at init time. Don't list this as a d'tor. Instead,
inject some code in that will run via the "__mod_init_func" method that
registers the gcov "writeout" function to execute at exit time.

The problem is that the "__mod_term_func" method of specifying d'tors is
deprecated on Darwin. And it can lead to some ambiguities when dealing with
multiple libraries.
<rdar://problem/11110106>

llvm-svn: 157852
2012-06-01 23:14:32 +00:00
Jakob Stoklund Olesen
8f5bd803e8 Remove physreg support from adjustCopiesBackFrom and removeCopyByCommutingDef.
After physreg coalescing was disabled, these functions can't do anything
useful with physregs anyway.

llvm-svn: 157849
2012-06-01 22:38:19 +00:00
Jakob Stoklund Olesen
41c8b09fef Simplify some more getAliasSet callers.
MCRegAliasIterator can include Reg itself in the list.

llvm-svn: 157848
2012-06-01 22:38:17 +00:00
Rafael Espindola
39e36628b4 Use dominates(Instruction, Use) in the verifier.
This removes a bit of context from the verifier erros, but reduces code
duplication in a fairly critical part of LLVM and makes dominates easier to test.

llvm-svn: 157845
2012-06-01 21:56:26 +00:00
Chad Rosier
9ad066a327 [arm-fast-isel] Fix handling of the frameaddress intrinsic. If depth is 0
then DestReg is undefined.

llvm-svn: 157840
2012-06-01 21:12:31 +00:00
Jakob Stoklund Olesen
1ab123a8d4 Switch some getAliasSet clients to MCRegAliasIterator.
MCRegAliasIterator can optionally visit the register itself, allowing
for simpler code.

llvm-svn: 157837
2012-06-01 20:36:54 +00:00
Manman Ren
74ccc117d5 X86: peephole optimization to remove cmp instruction
This patch will optimize the following:
  sub r1, r3
  cmp r3, r1 or cmp r1, r3
  bge L1
TO
  sub r1, r3
  bge L1 or ble L1

If the branch instruction can use flag from "sub", then we can eliminate
the "cmp" instruction.

llvm-svn: 157831
2012-06-01 19:49:33 +00:00
Manman Ren
2a5898a76b ARM: properly handle alignment for struct byval.
Factor out the expansion code into a function.
This change is to be enabled in clang.

rdar://9877866

llvm-svn: 157830
2012-06-01 19:33:18 +00:00
Rafael Espindola
353cca74a2 Add some tests checking that the verifier rejects cases where a definition
doesn't dominate a use.

llvm-svn: 157829
2012-06-01 19:24:57 +00:00
Benjamin Kramer
b9ec87406a Provide move semantics for (Small)BitVector.
CodeGen makes a lot of BitVector copies.

llvm-svn: 157826
2012-06-01 18:52:53 +00:00
Chris Lattner
773aa116f2 testcase for PR13006, thanks to Duncan for filing it.
llvm-svn: 157824
2012-06-01 18:19:46 +00:00
Nuno Lopes
5d4b3d1e56 BoundsChecking: fix a bug when the handling of recursive PHIs failed and could leave dangling references in the cache
add regression tests for this problem.

Can already compile & run: PHP, PCRE, and ICU  (i.e., all the software I tried)

llvm-svn: 157822
2012-06-01 17:43:31 +00:00
Hans Wennborg
4344ad4a86 Implement the local-dynamic TLS model for x86 (PR3985)
This implements codegen support for accesses to thread-local variables
using the local-dynamic model, and adds a clean-up pass so that the base
address for the TLS block can be re-used between local-dynamic access on
an execution path.

llvm-svn: 157818
2012-06-01 16:27:21 +00:00