Benjamin Kramer
df3070e83d
Implement mulo x, 2 -> addo x, x in DAGCombiner.
...
llvm-svn: 131800
2011-05-21 18:31:55 +00:00
Benjamin Kramer
e55e27c161
Merge and FileCheckize test cases.
...
llvm-svn: 131799
2011-05-21 18:31:48 +00:00
Benjamin Kramer
24f75ab769
Revert "InstCombine: Turn mul.with.overflow(X, 2) into the cheaper add.with.overflow(X, X)"
...
It's better to do this in codegen, mul.with.overflow(X, 2) is more canonical because it has only one use on "X".
llvm-svn: 131798
2011-05-21 18:31:42 +00:00
Charles Davis
525855fe48
Don't allow .seh_handler and .seh_handlerdata directives inside chained
...
unwind areas.
llvm-svn: 131795
2011-05-21 17:36:25 +00:00
Charles Davis
7f9c007dce
A handler for a function in the Win64 EH scheme can be both an unwind handler
...
and an exception handler. Handle that case.
Also, add an 'Emitted' member to the MCWin64EHUnwindInfo struct. It will be
needed later.
llvm-svn: 131791
2011-05-21 15:57:49 +00:00
Benjamin Kramer
51d1eac4bc
InstCombine: Turn mul.with.overflow(X, 2) into the cheaper add.with.overflow(X, X)
...
llvm-svn: 131789
2011-05-21 09:22:06 +00:00
Cameron Zwarich
28ea8de263
Fix PR9978 by adding RIP to GR64_TC so it can be used as an address in PIC code. It
...
is already in GR64 for the same reasons. Since it isn't allocatable it can't cause
any problems.
llvm-svn: 131787
2011-05-21 04:13:49 +00:00
Akira Hatanaka
af8143cdde
Use the correct register to access stack frame objects.
...
llvm-svn: 131785
2011-05-21 03:01:03 +00:00
Akira Hatanaka
6605a1e1a6
Insert instructions that copy $sp to or from $fp at the right locations.
...
llvm-svn: 131784
2011-05-21 02:29:26 +00:00
Dan Gohman
048c261e5d
When BasicAA can determine that two pointers have the same base but
...
differ by a dynamic offset, return PartialAlias instead of MayAlias.
See the comment in the code for details. This fixes PR9971.
llvm-svn: 131781
2011-05-21 01:05:08 +00:00
Andrew Trick
9f867fd2dc
Have Program::Wait return -2 for crashed and timeouts instead of embedding
...
info in the error message. Per Dan's request.
llvm-svn: 131780
2011-05-21 00:56:46 +00:00
Charles Davis
520128d52f
Set the "LastFrameInst" field when streaming a .seh_setframe directive. This
...
is needed for an upcoming patch.
llvm-svn: 131772
2011-05-21 00:09:04 +00:00
Cameron Zwarich
00ec3d1f9f
Fix PR9962 by properly constraining register classes in RemoveCopyByCommutingDef(). This
...
actually fixes most of the VerifyCoalescing failures in test-suite.
llvm-svn: 131768
2011-05-20 23:25:36 +00:00
Akira Hatanaka
66b7b0949f
Change the order fixed objects are created in MipsTargetLowering::LowerCall in
...
preparation for reversing StackDirection.
Fixed objects are created in the following order:
1. Incoming arguments passed on stack.
2. va_arg objects (include both arguments that are passed in registers and
pointer to the location of the first va_arg argument).
3. $gp restore slot.
4. Outgoing arguments passed on stack.
5. Pointer to alloca'd space.
llvm-svn: 131767
2011-05-20 23:22:14 +00:00
Charles Davis
445c467ced
Fix typo. When will I learn?
...
llvm-svn: 131765
2011-05-20 22:23:34 +00:00
Eli Friedman
dfd96ebe52
Add fast-isel support for byval calls on x86.
...
llvm-svn: 131764
2011-05-20 22:21:04 +00:00
Charles Davis
989cc73ef3
Add .pdata and .xdata sections to the COFF TLOF implementation.
...
llvm-svn: 131763
2011-05-20 22:13:55 +00:00
Jim Grosbach
909aff492f
No reason not to allow defining the CFA as a reg w/ offset zero.
...
llvm-svn: 131760
2011-05-20 21:50:09 +00:00
Akira Hatanaka
84f0431846
In CC_MipsO32, allocate a stack space regardless of whether the argument is
...
passed in register or on the stack.
llvm-svn: 131758
2011-05-20 21:39:54 +00:00
Jim Grosbach
c4a65b2613
Fix typo.
...
llvm-svn: 131757
2011-05-20 21:35:39 +00:00
Jim Grosbach
b2b33616c0
Add support for frame info use of the .cfi_def_cfa directive.
...
llvm-svn: 131756
2011-05-20 21:23:17 +00:00
Jim Grosbach
8c02dcbe8e
Add missing leading \t when printing .cfi_def_cfa in the asmstreamer.
...
llvm-svn: 131755
2011-05-20 21:22:37 +00:00
Akira Hatanaka
cc6174d5a5
Define functions that get/set maximum call frame size.
...
llvm-svn: 131752
2011-05-20 20:11:17 +00:00
Rafael Espindola
f114810ec8
adds some attributes to attribute section when cpu is "xscale"
...
(this is what used in Android NDK, when architecture is ARMv5)
patch by Koan-Sin Tan
llvm-svn: 131751
2011-05-20 20:10:34 +00:00
Rafael Espindola
27dbdbdf4c
fixes target address tBL and tBLX and sets relocation type
...
of tBL/tBLX to R_ARM_THM_CALL (ARM ELF 4.7.1.6)
Patch by koan-sin tan.
llvm-svn: 131748
2011-05-20 20:01:01 +00:00
Argyrios Kyrtzidis
d58ffb7e7d
Add asserts in StringRef to make sure we avoid undefined behavior:
...
-strlen should not be called with NULL. Also guarantee that StringRef's Length is 0 if Data is NULL.
-memcmp should not be called with NULL (even if size is 0)
Patch by Matthieu Monrocq!
llvm-svn: 131747
2011-05-20 19:24:12 +00:00
Stuart Hastings
e3158f93ec
Re-commit 131641 with fixes; de-pseudoize MOVSX16rr8 and friends.
...
rdar://problem/8614450
llvm-svn: 131746
2011-05-20 19:04:40 +00:00
Akira Hatanaka
89801a318c
Make $fp and $ra callee-saved registers and let PrologEpilogInserter handle
...
saving and restoring them.
llvm-svn: 131745
2011-05-20 18:39:33 +00:00
Andrew Trick
3352db291f
indvars: Prototyping Sign/ZeroExtend elimination without canonical IVs.
...
No functionality enabled by default. Use -disable-iv-rewrite.
Extended IVUsers to keep track of the phi that represents the users' IV.
Added the WidenIV transform to replace a narrow IV with a wide IV
by doing a one-for-one replacement of IV users instead of expanding the
SCEV expressions. [sz]exts are removed and truncs are inserted.
llvm-svn: 131744
2011-05-20 18:25:42 +00:00
Charles Davis
6b8caffdb2
Now that they're implemented, make the Win64 EH MCAsmStreamer methods call
...
super.
llvm-svn: 131743
2011-05-20 18:19:22 +00:00
Chad Rosier
fa78ec1a3e
Fixed regression due to commit 131709, which disables vararg tail call optimizations on Win64
...
llvm-svn: 131740
2011-05-20 17:49:39 +00:00
Evan Cheng
9dbb570612
Revert accidental commit.
...
llvm-svn: 131739
2011-05-20 17:38:48 +00:00
Charles Davis
5e5cc95580
"Implement" the HandlerData Win64 EH method in the base MCStreamer.
...
There's really nothing to implement. All this really does is swap to a
pseudo-section that later gets written to the unwind info struct. That
needs to be implemented in the object streamers.
llvm-svn: 131734
2011-05-20 16:06:22 +00:00
Benjamin Kramer
83096d1db1
Rename the "sandybridge" subtarget to "corei7-avx", for GCC compatibility.
...
llvm-svn: 131730
2011-05-20 15:11:26 +00:00
Benjamin Kramer
63248bc95b
Remove noisy semicolons.
...
llvm-svn: 131724
2011-05-20 09:20:25 +00:00
Cameron Zwarich
a487989a73
Fix PR9960 by teaching SimpleRegisterCoalescing::AdjustCopiesBackFrom() to preserve
...
the phikill flag.
llvm-svn: 131717
2011-05-20 03:54:04 +00:00
Andrew Trick
650ac8d64f
indvars: minor cleanup in preparation for sign/zero extend elimination.
...
llvm-svn: 131716
2011-05-20 03:37:48 +00:00
Akira Hatanaka
9736ffe863
Fix bug in which nodes that write to argument registers do not get glued with the JALR node. Patch by Sasa Stankovic
...
llvm-svn: 131714
2011-05-20 02:30:51 +00:00
Akira Hatanaka
bbb0805af2
Remove code that creates unnecessary frame objects.
...
llvm-svn: 131711
2011-05-20 01:45:06 +00:00
Akira Hatanaka
e96ba812ae
Define variables and functions in MipsFunctionInfo.
...
This is the first of a series of patches that attempt to simplify handling of
stack frame objects.
llvm-svn: 131710
2011-05-20 01:17:58 +00:00
Chad Rosier
a5f0bb3719
Don't attempt to tail call optimize for Win64.
...
llvm-svn: 131709
2011-05-20 00:59:28 +00:00
Evan Cheng
a3f5204c82
Revert r131664 and fix it in instcombine instead. rdar://9467055
...
llvm-svn: 131708
2011-05-20 00:54:37 +00:00
Cameron Zwarich
4e8f708cbb
Fix PR9955 by only attaching load memory operands to load instructions and
...
similarly for stores. Now "make check" passes with the MachineVerifier forced
on with the VerifyCoalescing option!
llvm-svn: 131705
2011-05-19 23:44:34 +00:00
Eli Friedman
ecdbb58b95
Add fast-isel support for zeroext and signext ret instructions on x86.
...
llvm-svn: 131689
2011-05-19 22:16:13 +00:00
Rafael Espindola
97c81eee80
Looks like OS X assemblers (including MC) don't like
...
foo:
bar = foo
.quad bar
Avoid producing it. Fixes PR9951.
llvm-svn: 131687
2011-05-19 22:05:56 +00:00
Rafael Espindola
c03bb178a0
Misc code refactorings:
...
* Remove unnecessary arguments now that ForceExpAbs is a method.
* Use ForceExpAbs in EmitAbsValue.
llvm-svn: 131683
2011-05-19 21:40:34 +00:00
Eric Christopher
74a9e350d2
Oddly people want to use the 'r' constraint for fp constants on x86.
...
Fixes rdar://9218925
Fixes PR9601
llvm-svn: 131682
2011-05-19 21:33:47 +00:00
Charles Davis
300a470f45
Implement the EndProlog Win64 EH method on the base MCStreamer.
...
llvm-svn: 131679
2011-05-19 21:24:54 +00:00
Cameron Zwarich
e876d96b4e
Fix PR9947 by placing OPFL_MemRefs on the node using memory operands rather than
...
the root if there is only one such node. This leaves only 2 verifier failures in
the entire test suite when running "make check".
llvm-svn: 131677
2011-05-19 21:13:30 +00:00
Eli Friedman
97fda21a43
Fix up this test to use explicit triples (Win64 passes a different number of arguments in registers).
...
llvm-svn: 131676
2011-05-19 21:13:08 +00:00