Commit Graph

72498 Commits

Author SHA1 Message Date
Nick Lewycky
c7e38e8f3f Fix grammar in test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131831 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 01:16:00 +00:00
Charles Davis
edeecbff0e Don't allow unaligned offsets and sizes in the Win64 EH directives.
Also, fix threshold for 'Big' register saves.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131830 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 00:56:20 +00:00
Chris Lattner
9bb4a2ae8a random comment cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131829 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 00:50:53 +00:00
Chris Lattner
efce071fd6 fix a file system case sensitivity issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131828 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 00:37:51 +00:00
Chris Lattner
dcef346948 remove StandardPasses, it has been replaced with PassManagerBuilder
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131827 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 00:30:45 +00:00
Chris Lattner
52b28896c8 switch opt to using PassManagerBuilder.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131824 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 00:21:33 +00:00
Chris Lattner
9d70b6b306 switch llvm-ld. It has a terrible mechanism that people can add extra
passes, it should be converted to use extension points.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131823 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 00:21:15 +00:00
Chris Lattner
817a01ffb2 switch bugpoint and liblto to PassManagerBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131821 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 00:20:07 +00:00
Chris Lattner
92a9cb6594 add support for LTO passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131820 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 00:14:20 +00:00
Chris Lattner
402d9d9935 eliminate dependence on StandardPasses.h. The code generator's pass pipeline
should eventually convert to PMBuilder, but I don't plan to do this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131819 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 00:13:44 +00:00
Charles Davis
f2007b3c19 Include DataTypes.h from this header to get the uint*_t types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131817 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 00:05:26 +00:00
Charles Davis
ba55b8f3e4 Allow access to the .pdata and .xdata sections through the TargetAsmInfo
class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131816 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 00:03:24 +00:00
Chris Lattner
f5be7bdc90 add an extension point mechanism that allow plugins to add stuff to
the pass manager.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131814 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 23:50:37 +00:00
Nick Lewycky
0cf51561ed Add CreateLifetimeStart and CreateLifetimeEnd to the IRBuilder, with plans to
use these soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131812 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 23:14:36 +00:00
Duncan Sands
d22920aae8 Revert commit 131781, to see if it fixes the x86-64 dragonegg buildbot.
Original log message:
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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131809 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 20:54:46 +00:00
Chris Lattner
ae6d5dc715 add a new PassManagerBuilder class to replace StandardPasses.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131807 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 20:39:42 +00:00
Chris Lattner
40f5fbcc5c add a copy ctor to TargetLibraryInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131806 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 20:09:13 +00:00
Eli Friedman
21c60904ce PR7952: Make isa<> use the same logic as cast<>, so that they both work
consistently.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131803 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 19:13:10 +00:00
Benjamin Kramer
b22da2a72c X86: smulo -> add is now done target-independently in DAGCombiner, remove the patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131801 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 18:32:01 +00:00
Benjamin Kramer
f55d26e788 Implement mulo x, 2 -> addo x, x in DAGCombiner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131800 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 18:31:55 +00:00
Benjamin Kramer
a0962766ba Merge and FileCheckize test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131799 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 18:31:48 +00:00
Benjamin Kramer
cd89d4d524 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".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131798 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 18:31:42 +00:00
Charles Davis
81f3830f2e Don't allow .seh_handler and .seh_handlerdata directives inside chained
unwind areas.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131795 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 17:36:25 +00:00
Charles Davis
321fe74b2d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131791 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 15:57:49 +00:00
Benjamin Kramer
c21b205f93 InstCombine: Turn mul.with.overflow(X, 2) into the cheaper add.with.overflow(X, X)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131789 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 09:22:06 +00:00
Cameron Zwarich
37fed38ec1 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131787 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 04:13:49 +00:00
Akira Hatanaka
52106e1e25 Use the correct register to access stack frame objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131785 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 03:01:03 +00:00
Akira Hatanaka
f346c69530 Insert instructions that copy $sp to or from $fp at the right locations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131784 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 02:29:26 +00:00
Dan Gohman
424b777171 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131781 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 01:05:08 +00:00
Andrew Trick
dc5948d472 Have Program::Wait return -2 for crashed and timeouts instead of embedding
info in the error message. Per Dan's request.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131780 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 00:56:46 +00:00
Charles Davis
5c2256a571 Set the "LastFrameInst" field when streaming a .seh_setframe directive. This
is needed for an upcoming patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131772 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 00:09:04 +00:00
Cameron Zwarich
345968c82d Fix PR9962 by properly constraining register classes in RemoveCopyByCommutingDef(). This
actually fixes most of the VerifyCoalescing failures in test-suite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131768 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 23:25:36 +00:00
Akira Hatanaka
43299776d7 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131767 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 23:22:14 +00:00
Charles Davis
98eb7be103 Fix typo. When will I learn?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131765 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 22:23:34 +00:00
Eli Friedman
c088345f13 Add fast-isel support for byval calls on x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131764 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 22:21:04 +00:00
Charles Davis
f3ffc2cd76 Add .pdata and .xdata sections to the COFF TLOF implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131763 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 22:13:55 +00:00
Jim Grosbach
958b68140e No reason not to allow defining the CFA as a reg w/ offset zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131760 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 21:50:09 +00:00
Akira Hatanaka
d37776d1c1 In CC_MipsO32, allocate a stack space regardless of whether the argument is
passed in register or on the stack.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131758 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 21:39:54 +00:00
Jim Grosbach
1585ce7e8c Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131757 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 21:35:39 +00:00
Jim Grosbach
2b6f7117f5 Add support for frame info use of the .cfi_def_cfa directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131756 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 21:23:17 +00:00
Jim Grosbach
ae8e829d39 Add missing leading \t when printing .cfi_def_cfa in the asmstreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131755 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 21:22:37 +00:00
Akira Hatanaka
6ffbf82e22 Define functions that get/set maximum call frame size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131752 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 20:11:17 +00:00
Rafael Espindola
b8adb8af0f 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131751 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 20:10:34 +00:00
Rafael Espindola
298c8e12ea 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131748 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 20:01:01 +00:00
Argyrios Kyrtzidis
6d5502eb49 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131747 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 19:24:12 +00:00
Stuart Hastings
0e29ed081b Re-commit 131641 with fixes; de-pseudoize MOVSX16rr8 and friends.
rdar://problem/8614450


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131746 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 19:04:40 +00:00
Akira Hatanaka
17a1e87751 Make $fp and $ra callee-saved registers and let PrologEpilogInserter handle
saving and restoring them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131745 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 18:39:33 +00:00
Andrew Trick
f85092c255 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131744 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 18:25:42 +00:00
Charles Davis
cde87e2377 Now that they're implemented, make the Win64 EH MCAsmStreamer methods call
super.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131743 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 18:19:22 +00:00
Chad Rosier
5def9657e4 Fixed regression due to commit 131709, which disables vararg tail call optimizations on Win64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131740 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 17:49:39 +00:00