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

1011 Commits

Author SHA1 Message Date
Chris Lattner
8cdc5e75f7 update a bunch of code to use the MachinePointerInfo version of getStore.
llvm-svn: 114461
2010-09-21 18:41:36 +00:00
Chris Lattner
86b3f287ce eliminate an old SelectionDAG::getTruncStore method, propagating
MachinePointerInfo around more.

llvm-svn: 114452
2010-09-21 17:42:31 +00:00
Chris Lattner
cdfd993df0 propagate MachinePointerInfo through various uses of the old
SelectionDAG::getExtLoad overload, and eliminate it.

llvm-svn: 114446
2010-09-21 17:04:51 +00:00
Chris Lattner
0d430648ae continue MachinePointerInfo'izing, eliminating use of one of the old
getLoad overloads.

llvm-svn: 114443
2010-09-21 16:36:31 +00:00
Chris Lattner
b68bd70665 a few more trivial updates. This fixes PerformInsertVectorEltInMemory to not
pass a completely incorrect SrcValue, which would result in a miscompile with
combiner-aa.

llvm-svn: 114411
2010-09-21 07:32:19 +00:00
Bob Wilson
5170a69b9f Add a missing check when legalizing a vector extending load. This doesn't
solve the root problem, but it corrects the bug in the code I added to
support legalizing in the case where the non-extended type is also legal.

llvm-svn: 112997
2010-09-03 19:20:37 +00:00
Chris Lattner
bc2f7bb5f3 Add a hackaround for PR7993 which is causing failures on x86 builders that lack sse2.
llvm-svn: 112175
2010-08-26 06:57:07 +00:00
Chris Lattner
ef3055ca05 remove some llvmcontext arguments that are now dead post-refactoring.
llvm-svn: 112104
2010-08-25 23:00:45 +00:00
Chandler Carruth
e0ed6ee921 Fix some GCC warnings by providing a virtual destructor in the base of a class
hierarchy with virtual methods and using llvm_unreachable to properly indicate
unreachable states which would otherwise leave variables uninitialized.

llvm-svn: 111803
2010-08-23 08:25:07 +00:00
Bob Wilson
3821009139 If the target says that an extending load is not legal, regardless of whether
it involves specific floating-point types, legalize should expand an
extending load to a non-extending load followed by a separate extend operation.
For example, we currently expand SEXTLOAD to EXTLOAD+SIGN_EXTEND_INREG (and
assert that EXTLOAD should always be supported).  Now we can expand that to
LOAD+SIGN_EXTEND.  This is needed to allow vector SIGN_EXTEND and ZERO_EXTEND
to be used for NEON.

llvm-svn: 111586
2010-08-19 23:52:39 +00:00
Rafael Espindola
84716579d4 Fix va_arg for doubles. With this patch VAARG nodes always contain the
correct alignment information, which simplifies ExpandRes_VAARG a bit.

The patch introduces a new alignment information to TargetLoweringInfo. This is
needed since the two natural candidates cannot be used:

* The 's' in target data: If this is set to the minimal alignment of any
  argument, getCallFrameTypeAlignment would return 4 for doubles on ARM for
  example.
* The getTransientStackAlignment method. It is possible for an architecture to
  have argument less aligned than what we maintain the stack pointer.

llvm-svn: 108072
2010-07-11 04:01:49 +00:00
Evan Cheng
22b3e8f3b1 Move getExtLoad() and (some) getLoad() DebugLoc argument after EVT argument for consistency sake.
llvm-svn: 107820
2010-07-07 22:15:37 +00:00
Jim Grosbach
657ab4a8ee By default, the eh.sjlj.setjmp/longjmp intrinsics should just do nothing rather
than assuming a target will custom lower them. Targets which do so should
exlicitly mark them as having custom lowerings. PR7454.

llvm-svn: 107734
2010-07-06 23:44:52 +00:00
Jim Grosbach
5836b352f1 80-column and trailing whitespace cleanup.
llvm-svn: 107490
2010-07-02 17:41:59 +00:00
Jim Grosbach
62c9cd6f1c grammar tweaks
llvm-svn: 107489
2010-07-02 17:38:34 +00:00
Rafael Espindola
317a02739d When splitting a VAARG, remember its alignment.
This produces terrible but correct code.

llvm-svn: 106952
2010-06-26 18:22:20 +00:00
Jim Grosbach
b8c94667a8 back-end libcall handling for ATOMIC_SWAP (__sync_lock_test_and_set)
llvm-svn: 106342
2010-06-18 23:03:10 +00:00
Evan Cheng
9a97e1e7f7 Fix cross initialization compilation error.
llvm-svn: 106324
2010-06-18 22:01:37 +00:00
Jim Grosbach
91aae1c534 Add Expand-to-libcall support for additional atomics. This covers the usual
entries used by llvm-gcc. *_[U]MIN and such can be added later if needed.

This enables the front ends to simplify handling of the atomic intrinsics by
removing the target-specific decision about which targets can handle the
intrinsics.

llvm-svn: 106321
2010-06-18 21:43:38 +00:00
Dan Gohman
e9dfb84007 Change UpdateNodeOperands' operand and return value from SDValue to
SDNode *, since it doesn't care about the ResNo value.

llvm-svn: 106282
2010-06-18 15:30:29 +00:00
Dan Gohman
22ff84372b isValueValidForType can be a static member function.
llvm-svn: 106278
2010-06-18 14:01:07 +00:00
Jim Grosbach
ac23214fd8 add missing break. inconsequential as the code shouldn't be reached, but
for correctness' sake, it should be there.

llvm-svn: 106229
2010-06-17 17:58:54 +00:00
Jim Grosbach
99b7091d9d Add entries for Expanding atomic intrinsics to libcalls. Just a placeholder
for the moment. The implementation of the libcall will follow.

Currently, the llvm-gcc knows when the intrinsics can be correctly handled by
the back end and only generates them in those cases, issuing libcalls directly
otherwise. That's too much coupling. The intrinsics should always be
generated and the back end decide how to handle them, be it with a libcall,
inline code, or whatever. This patch is a step in that direction.

rdar://8097623

llvm-svn: 106227
2010-06-17 17:50:54 +00:00
Jim Grosbach
0cdb6c563a ISD::MEMBARRIER should lower to a libcall (__sync_synchronize) if the target
sets the legalize action to Expand.

llvm-svn: 106203
2010-06-17 02:00:53 +00:00
Jim Grosbach
b004e2cf0f Update the saved stack pointer in the sjlj function context following either
an alloca() or an llvm.stackrestore(). rdar://8031573

llvm-svn: 104900
2010-05-27 23:49:24 +00:00
Bob Wilson
ae9655920b When expanding a vector_shuffle, the element type may not be legal and may
need to be promoted.  The BUILD_VECTOR and EXTRACT_VECTOR_ELT nodes generated
here already allow the promoted type to be used without further changes, so
just do the promotion.  This fixes part of pr7167.

llvm-svn: 104141
2010-05-19 18:48:32 +00:00
Dale Johannesen
9f19b6a761 Implement a correct ui64->f32 conversion. The old
one was subject to double rounding in extreme cases.

llvm-svn: 103744
2010-05-13 23:50:42 +00:00
Dan Gohman
ca2df906ae Trim #includes and forward declarations.
llvm-svn: 103489
2010-05-11 19:11:43 +00:00
Dan Gohman
f1f21fb3c6 Code that needs a TargetMachine should have access to one directly, rather
than just getting one through a TargetLowering.

llvm-svn: 101802
2010-04-19 19:05:59 +00:00
Dan Gohman
a0f855157e Use const qualifiers with TargetLowering. This eliminates several
const_casts, and it reinforces the design of the Target classes being
immutable.

SelectionDAGISel::IsLegalToFold is now a static member function, because
PIC16 uses it in an unconventional way. There is more room for API
cleanup here.

And PIC16's AsmPrinter no longer uses TargetLowering.

llvm-svn: 101635
2010-04-17 15:26:15 +00:00
Evan Cheng
8249affa3b More 80 violations.
llvm-svn: 101330
2010-04-15 01:25:27 +00:00
Chris Lattner
96ed85d7ab use assertions instead of unreachable for logic errors.
llvm-svn: 100724
2010-04-07 23:47:51 +00:00
Chris Lattner
80b41881bc rename llvm::llvm_report_error -> llvm::report_fatal_error
llvm-svn: 100709
2010-04-07 22:58:41 +00:00
Chris Lattner
248e65ec05 trim some spurious references to DwarfWriter. SDIsel really doesn't
need it anymore, so don't addRequire it.

llvm-svn: 100400
2010-04-05 04:09:20 +00:00
Anton Korobeynikov
23c07f492e Get rid of target-specific nodes for fp16 <-> fp32 conversion.
llvm-svn: 98888
2010-03-18 22:35:37 +00:00
Anton Korobeynikov
2cb4451ae6 Make default expansion for FP16 <-> FP32 nodes into libcalls
llvm-svn: 98501
2010-03-14 18:42:24 +00:00
Duncan Sands
5dcc3b328d Fix PR6522: implement copysign expansion for x86 long double
(it seems that FreeBSD doesn't have copysignl).  Done by
removing a bunch of assumptions from the code.  This may also
help with sparc 128 bit floats.

llvm-svn: 98346
2010-03-12 11:45:06 +00:00
Dan Gohman
00a652eea0 Reapply r97778 and r97779, enabled only for unsigned i64 to f64
conversions.

llvm-svn: 97854
2010-03-06 00:00:55 +00:00
Dan Gohman
ebdb1743d3 Revert r97778 and r97779. They're somehow breaking llvm-gcc builds.
llvm-svn: 97781
2010-03-05 02:40:23 +00:00
Dan Gohman
0a01ba144d Fix these constants to be more portable.
llvm-svn: 97779
2010-03-05 02:13:10 +00:00
Dan Gohman
e5b9ea020f Rewrite i64-to-f64 conversion using an algorithm which handles
rounding correctly. This implementation is a generalization of
the x86_64 code in compiler-rt.

This fixes rdar://7683708.

llvm-svn: 97778
2010-03-05 02:00:46 +00:00
Bill Wendling
5990930d72 Remove dead parameter passing.
llvm-svn: 97536
2010-03-02 01:55:18 +00:00
Dan Gohman
17447493ea Fix ExpandVectorBuildThroughStack for the case where the
operands are themselves vectors. Based on a patch by
Micah Villmow for PR6338.

llvm-svn: 97165
2010-02-25 20:30:49 +00:00
Dan Gohman
084112437d Revert r97064. Duncan pointed out that bitcasts are defined in
terms of store and load, which means bitcasting between scalar
integer and vector has endian-specific results, which undermines
this whole approach.

llvm-svn: 97137
2010-02-25 15:20:39 +00:00
Dan Gohman
424e8f22d0 Make getTypeSizeInBits work correctly for array types; it should return
the number of value bits, not the number of bits of allocation for in-memory
storage.

Make getTypeStoreSize and getTypeAllocSize work consistently for arrays and
vectors.

Fix several places in CodeGen which compute offsets into in-memory vectors
to use TargetData information.

This fixes PR1784.

llvm-svn: 97064
2010-02-24 22:05:23 +00:00
David Greene
4f983d569c Add non-temporal flags and remove an assumption of default arguments.
llvm-svn: 96240
2010-02-15 17:00:31 +00:00
Dan Gohman
92b6122204 Fix "the the" and similar typos.
llvm-svn: 95781
2010-02-10 16:03:48 +00:00
Chris Lattner
efdc572e44 Rearrange handling of jump tables. Highlights:
1. MachineJumpTableInfo is now created lazily for a function the first time
   it actually makes a jump table instead of for every function.
2. The encoding of jump table entries is now described by the
   MachineJumpTableInfo::JTEntryKind enum.  This enum is determined by the
   TLI::getJumpTableEncoding() hook, instead of by lots of code scattered
   throughout the compiler that "knows" that jump table entries are always
   32-bits in pic mode (for example).
3. The size and alignment of jump table entries is now calculated based on
   their kind, instead of at machinefunction creation time.

Future work includes using the EntryKind in more places in the compiler,
eliminating other logic that "knows" the layout of jump tables in various
situations.

llvm-svn: 94470
2010-01-25 23:26:13 +00:00
Mon P Wang
871ea08e40 Improved widening loads by adding support for wider loads if
the alignment allows.  Fixed a bug where we didn't use a
vector load/store for PR5626.

llvm-svn: 94338
2010-01-24 00:05:03 +00:00
Dan Gohman
3708af1c59 Revert an earlier change to SIGN_EXTEND_INREG for vectors. The VTSDNode
really does need to be a vector type, because
TargetLowering::getOperationAction for SIGN_EXTEND_INREG uses that type,
and it needs to be able to distinguish between vectors and scalars.

Also, fix some more issues with legalization of vector casts.

llvm-svn: 93043
2010-01-09 02:13:55 +00:00