Rafael Espindola
836f7db2cc
Fix the root cause of the bootstrap failure:
...
There was no way to check if a given register/mode pair was valid. We now return
an error code (-2) instead of asserting. If anyone thinks that an assert
at this point is really needed, we can autogen a hasValidDwarfRegNum instead.
llvm-svn: 132236
2011-05-28 00:13:01 +00:00
Cameron Zwarich
1d553a2cc4
Fix the remaining atomic intrinsics to use the right register classes on Thumb2,
...
and add some basic tests for them.
llvm-svn: 132235
2011-05-27 23:54:00 +00:00
Charles Davis
91ed799eb4
Stub out support for Win64-style exceptions. Note that this is merely using
...
the Win64 EH mechanism to implement GCC-style exceptions. LLVM supports
hardly anything else at this point!
llvm-svn: 132234
2011-05-27 23:47:32 +00:00
Bruno Cardoso Lopes
787dfadc7c
ARM asm parser wasn't able to parse a "mov" instruction while in Thumb
...
mode (only the "mov.w" variant). Now, when parsing "mov" in thumb mode,
default to the Thumb 1 versions/encodings.
llvm-svn: 132233
2011-05-27 23:46:09 +00:00
Rafael Espindola
a5149b5cea
It looks like 132187 might have broken the llvm-gcc bootstrap. Revert while I check.
...
llvm-svn: 132230
2011-05-27 23:36:02 +00:00
Eli Friedman
873106a932
Force a triple to make this test pass on Darwin.
...
llvm-svn: 132228
2011-05-27 23:12:48 +00:00
Chad Rosier
06da55e7d0
Clean out the 2.9 Release Notes. Mostly limited to What's New in LLVM
...
and enhancements in sub-project status updates.
llvm-svn: 132227
2011-05-27 22:50:46 +00:00
Cameron Zwarich
75d99e4b70
Add a GR32_NOREX_NOSP register class and fix a bug where getMatchingSuperRegClass()
...
was saying that the matching superregister class of GR32_NOREX in GR64_NOREX_NOSP
is GR64_NOREX, which drops the NOSP constraint. This fixes PR10032.
llvm-svn: 132225
2011-05-27 22:26:04 +00:00
Rafael Espindola
b8e08be77d
Fix a regression I recently introduced by removing DwarfRegNum of
...
subregisters:
When a value is in a subregister, at least report the location as being
the superregister. We should extend the .td files to encode the bit
range so that we can produce a DW_OP_bit_piece.
llvm-svn: 132224
2011-05-27 22:15:01 +00:00
Rafael Espindola
d23bfb8a7a
Make size computation less brittle.
...
llvm-svn: 132222
2011-05-27 22:05:41 +00:00
Charles Davis
041ec4aada
Add the suffix to the Win64 EH data sections' names if given. Add a test for
...
this. XFAIL'd, because the COFF AsmParser can't handle .section yet.
llvm-svn: 132220
2011-05-27 21:38:47 +00:00
Nadav Rotem
a9effb13dd
Refactor getActionType and getTypeToTransformTo ; place all of the 'decision'
...
code in one place. Re-apply 131534 and fix the multi-step promotion of integers.
llvm-svn: 132217
2011-05-27 21:03:13 +00:00
Eli Friedman
ddf7f55531
Attempt to preserve debug line info in LICM; as the comment in the code says, it's hard to pick good line numbers for this transformation, but something is better than nothing.
...
rdar://9143729
llvm-svn: 132215
2011-05-27 20:31:51 +00:00
Chad Rosier
bbdca744d4
Typo is test case
...
llvm-svn: 132214
2011-05-27 20:16:57 +00:00
Jakob Stoklund Olesen
2348f3133f
Make room for register allocation to improve.
...
llvm-svn: 132213
2011-05-27 20:15:06 +00:00
Chad Rosier
d1db4f8b9b
Add change of crc32 intrinsic to release notes
...
llvm-svn: 132212
2011-05-27 20:13:10 +00:00
Evan Cheng
518bcd0ef4
Don't use movw / movt for iOS static codegen for now to workaround some tools issues. rdar://9514789
...
llvm-svn: 132211
2011-05-27 20:11:27 +00:00
Jakob Stoklund Olesen
63a9cef5c2
Delete a test that is no longer relevant.
...
According to PR2536, the old spiller had trouble with the IMPLICIT_DEF in this
code:
%reg1028<def> = MOV16rm %reg0, 1, %reg0, <ga:g_5>, Mem:LD(2,2) [g_5 + 0]
%reg1039<def> = IMPLICIT_DEF
%reg1038<def> = INSERT_SUBREG %reg1039, %reg1028, 2
%reg1025<def> = AND32ri %reg1038, 65534, %%EFLAGS<imp-def>
However, today we emit a zero-extending load instead:
%vreg10<def> = MOVZX32rm16 %noreg, 1, %noreg, <ga:@g_5>, %noreg; %mem:LD2[@g_5] GR32:%vreg10
%vreg0<def> = AND32ri %vreg10, 65534, %%EFLAGS<imp-def,dead>; %GR32:%vreg0,%vreg10
This makes the test pointless since it no longer creates the spiller hazard.
llvm-svn: 132210
2011-05-27 20:02:42 +00:00
Chad Rosier
3252177f16
CRC32 intrinsics were renamed at revision 132163. This submission
...
fixes aliasing issues with the old and new names as well as adds test
cases for the auto-upgrader.
Fixes rdar 9472944.
llvm-svn: 132207
2011-05-27 19:38:10 +00:00
Devang Patel
39e22eae49
Keep this simple. Use DIType to get signness and size of a type. Based on size, select appropraite form.
...
llvm-svn: 132206
2011-05-27 19:13:26 +00:00
Charles Davis
03eef62db0
Add a parameter to the Win64 EH section getters to get a section with a
...
suffix (e.g. .xdata$myfunc). The suffix part isn't implemented yet, but
I'll get to it in the next patch.
Fix up all callers of the affected functions. Make them pass said suffix to
the function.
llvm-svn: 132205
2011-05-27 19:09:24 +00:00
Evan Cheng
97c9f84f68
Add iOS test
...
llvm-svn: 132203
2011-05-27 19:04:21 +00:00
Dan Gohman
c6f2ddfc04
Update this comment.
...
llvm-svn: 132202
2011-05-27 18:42:33 +00:00
Eli Friedman
942e1c10f6
Don't sink or hoist debug info instrinsics; it isn't useful. This also prevents LICM sinking from erasing debug intrinsics which don't dominate any exit block of the loop.
...
rdar://9143943 .
llvm-svn: 132201
2011-05-27 18:37:52 +00:00
John McCall
bd04b74bb2
Fix the inliner to maintain the current de facto invoke semantics:
...
- the selector for the landing pad must provide all available information
about the handlers, filters, and cleanups within that landing pad
- calls to _Unwind_Resume must be converted to branches to the enclosing
lpad so as to avoid re-entering the unwinder when the lpad claimed it
was going to handle the exception in some way
This is quite specific to libUnwind-based unwinding. In an effort to not
interfere too badly with other unwinders, and with existing hacks in frontends,
this only triggers on _Unwind_Resume (not _Unwind_Resume_or_Rethrow) and does
nothing with selectors if it cannot find a selector call for either lpad.
llvm-svn: 132200
2011-05-27 18:34:38 +00:00
Jakob Stoklund Olesen
6019944901
Delete MethodBodies that only filtered reserved registers.
...
The register allocators know to filter reserved registers from the allocation
orders, so we don't need all of this boilerplate.
llvm-svn: 132199
2011-05-27 18:27:13 +00:00
Devang Patel
f1d04706fb
Handle signed types gracefully.
...
This fixes regressions reported by buildbots as a fallout of r132193.
llvm-svn: 132197
2011-05-27 18:15:52 +00:00
Eli Friedman
3a8d9625b0
And fix the test in r132194.
...
llvm-svn: 132196
2011-05-27 18:14:28 +00:00
Eli Friedman
b868c83e67
Oops, wasn't intending to commit this. Partial revert of r132194.
...
llvm-svn: 132195
2011-05-27 18:04:04 +00:00
Eli Friedman
fe84bd659c
Fix a silly mistake (which trips over an assertion) in r132099. rdar://9515076
...
llvm-svn: 132194
2011-05-27 18:02:04 +00:00
Devang Patel
3c6aed2d98
Select DW_AT_const_value size based on variable size.
...
llvm-svn: 132193
2011-05-27 16:45:18 +00:00
Rafael Espindola
0373d007e9
Remove DwarfRegNum from the individual bits of the condition register.
...
These should be DW_OP_bit_piece of CR (64).
llvm-svn: 132192
2011-05-27 16:15:27 +00:00
Rafael Espindola
ecb5573047
Remove DwarfRegNum from CARRY. I should be encoded with DW_OP_bit_piece.
...
llvm-svn: 132190
2011-05-27 16:01:08 +00:00
Charles Davis
ea5dc3a67b
Assorted fixes for Win64 EH unwind info emission:
...
- Flip order of bitfields. This gets our output matching GAS.
- Handle case where the end of the prolog wasn't specified.
- If the resulting unwind info struct is less than 8 bytes, pad to 8 bytes.
Add a test for the latter two.
llvm-svn: 132188
2011-05-27 15:10:25 +00:00
Rafael Espindola
2daba3380d
Remove dwarf numbers from subregs. We should use DW_OP_bit_piece to
...
refer to them.
I tested this with both check-all and the gdb testsuite.
llvm-svn: 132187
2011-05-27 15:08:24 +00:00
Benjamin Kramer
749ef5f420
InstCombine: Make switch folding with equality compares more aggressive by trying instsimplify on the arm where we know the compared value.
...
Stuff like "x == y ? y : x&y" now folds into "x&y".
llvm-svn: 132185
2011-05-27 13:00:16 +00:00
Cameron Zwarich
34ef49dc74
Fix PR10029 - VerifyCoalescing failure on patterns_dfa.c of 445.gobmk.
...
llvm-svn: 132181
2011-05-27 05:04:51 +00:00
Charles Davis
43a421e3d5
Add a test for Win64 EH unwind information emission.
...
llvm-svn: 132180
2011-05-27 03:54:43 +00:00
Eric Christopher
9b67db8ea7
Make the branch encoding for tBcc more obvious that it's a 4-byte opcode
...
followed by a conditional and imm8.
llvm-svn: 132179
2011-05-27 03:50:53 +00:00
Eric Christopher
bd59e89331
Fix comment.
...
llvm-svn: 132178
2011-05-27 03:46:51 +00:00
Charles Davis
6d1c4c73a9
Start keeping track of where the various unwind instructions are in the prolog.
...
Use them to calculate the offset inside the prolog. Emit this value when
emitting the unwind codes.
llvm-svn: 132177
2011-05-27 03:25:01 +00:00
Charles Davis
761313b28d
Add missing break statements. Align UNWIND_INFO and RUNTIME_FUNCTION structs
...
to 4 bytes.
I'm surprised no one caught the missing break statements.
llvm-svn: 132176
2011-05-27 02:43:19 +00:00
Charles Davis
a60cd577fd
My attempt at fixing the leak reported by the valgrind buildbots. Valgrind will
...
still report leaks, but they're spurious now. Valgrind cannot peer into
std::vector objects--or any dynamic array, for that matter--because it doesn't
know how big the array is.
llvm-svn: 132174
2011-05-27 02:01:08 +00:00
Charles Davis
9dcee31aab
Fix inverted conditional in SaveReg and SaveXMM. Err when the frame pointer is
...
already defined, and err when the PushMachFrame operation isn't the first
operation (if specified at all).
llvm-svn: 132173
2011-05-27 01:42:17 +00:00
Eli Friedman
e217f89420
One more debug line number miss in instcombine (although the code in question isn't actually in instcombine).
...
llvm-svn: 132170
2011-05-27 01:00:36 +00:00
Dan Gohman
e635c529a0
Fix copy+pastos.
...
llvm-svn: 132168
2011-05-27 00:36:31 +00:00
Eli Friedman
35211c6091
Final step of instcombine debuginfo; switch a couple more places over to InsertNewInstWith, and use setDebugLoc for the cases which can't be easily handled by the automated mechanisms.
...
llvm-svn: 132167
2011-05-27 00:19:40 +00:00
Chandler Carruth
07f5b65e63
Fix warning about || and && without explicit grouping.
...
This looks like it flagged an actual bug. Devang, please review. I added
the parentheses that change behavior, but make the behavior more closely
match commit log's intent.
llvm-svn: 132165
2011-05-26 23:37:58 +00:00
Devang Patel
bf22998f21
Do not insert anything after terminator.
...
llvm-svn: 132164
2011-05-26 23:16:48 +00:00
Chad Rosier
b362884ca9
Renamed llvm.x86.sse42.crc32 intrinsics; crc64 doesn't exist.
...
crc32.[8|16|32] have been renamed to .crc32.32.[8|16|32] and
crc64.[8|16|32] have been renamed to .crc32.64.[8|64].
llvm-svn: 132163
2011-05-26 23:13:19 +00:00
Eric Christopher
017b959ad5
Comment cleanup.
...
llvm-svn: 132162
2011-05-26 22:54:27 +00:00
Devang Patel
252f0079a9
Do not move DBG_VALUE in middle of PHI nodes.
...
llvm-svn: 132161
2011-05-26 22:43:14 +00:00
Devang Patel
0da5250bcd
If llvm.dbg.value and the value instruction it refers to are far apart then iSel may not be able to find corresponding Node for llvm.dbg.value during DAG construction. Make iSel's life easier by removing this distance between llvm.dbg.value and its value instruction.
...
llvm-svn: 132151
2011-05-26 21:51:06 +00:00
Devang Patel
cdec11413b
Add comment.
...
llvm-svn: 132149
2011-05-26 21:49:28 +00:00
Devang Patel
42ddaa10d3
During branch folding avoid inserting redundant DBG_VALUE machine instructions.
...
llvm-svn: 132148
2011-05-26 21:47:59 +00:00
Akira Hatanaka
077964a03c
Use MachineFrameInfo::hasCalls instead of MipsFunctionInfo::hasCall to check if
...
a function has any function calls.
llvm-svn: 132140
2011-05-26 20:30:31 +00:00
Rafael Espindola
e3a07a3b42
Fix some dwarf register numbers.
...
llvm-svn: 132136
2011-05-26 19:25:47 +00:00
Galina Kistanova
7defeeae67
Make few ExecutionEngine tests XFAIL for ARM, since ExecutionEngine is broken for ARM, please remove the following XFAIL when it will be fixed.
...
llvm-svn: 132135
2011-05-26 19:17:14 +00:00
Rafael Espindola
a97b238024
Fix LTO builds with xcode 4.
...
llvm-svn: 132132
2011-05-26 18:59:54 +00:00
Akira Hatanaka
aa560006ed
Add support for C++ exception handling.
...
llvm-svn: 132131
2011-05-26 18:59:03 +00:00
Eric Christopher
33a73c7755
Reorganize these slightly according to operand type.
...
llvm-svn: 132128
2011-05-26 18:22:26 +00:00
Akira Hatanaka
8062bf36b4
Set HasSetDirective to true.
...
llvm-svn: 132127
2011-05-26 18:16:18 +00:00
Eli Friedman
c48f7c212e
Fix test on Windows.
...
llvm-svn: 132126
2011-05-26 18:00:32 +00:00
Charles Davis
936847ddf5
Revert r132111. I built Release (without Asserts), so I didn't know about the
...
assert that prevented setting alignment on section creation.
llvm-svn: 132113
2011-05-26 05:35:55 +00:00
Charles Davis
4461beea04
Fix definitions of UOP_SaveXMM128, UOP_SaveXMM128Big, and UOP_PushMachFrame
...
to match Microsoft's definitions.
llvm-svn: 132112
2011-05-26 05:24:15 +00:00
Charles Davis
4be76e2152
Align Win64 EH Table sections to 4 bytes.
...
llvm-svn: 132111
2011-05-26 05:19:54 +00:00
Charles Davis
567a1ad7c5
Add a test for the chained directives that I forgot last time.
...
llvm-svn: 132110
2011-05-26 05:17:43 +00:00
Francois Pichet
54577dec61
Fix MSVC warning regarding mkdir function usage.
...
llvm-svn: 132109
2011-05-26 04:55:20 +00:00
Stuart Hastings
493a12bf5e
Reverting 132105: it broke some LLVM-GCC DejaGNU tests.
...
llvm-svn: 132108
2011-05-26 04:09:49 +00:00
Cameron Zwarich
26ddb12118
Mark tBX as an indirect branch rather than a return.
...
llvm-svn: 132107
2011-05-26 03:41:12 +00:00
Charles Davis
006e1c39d0
Test .seh_startchained and .seh_endchained parsing.
...
Rework how the MCWin64EHUnwindInfo instances are stored. Fix issues with
chained unwind areas exposed by the test that were related to this.
The ChainedParent field had the wrong address, because when the chained unwind
info was added, the addresses shifted around. Now we store the pointers to the
structures, which are now allocated from the MC heap.
llvm-svn: 132106
2011-05-26 02:45:47 +00:00
Stuart Hastings
276f231c2f
Correctly handle a one-word struct passed byval on x86_64.
...
rdar://problem/6920088
llvm-svn: 132105
2011-05-26 02:44:56 +00:00
Andrew Trick
7fac79e255
indvars: incremental fixes for -disable-iv-rewrite and testcases.
...
Use a proper worklist for use-def traversal without holding onto an
iterator. Now that we process all IV uses, we need complete logic for
resusing existing derived IV defs. See HoistStep.
llvm-svn: 132103
2011-05-26 00:46:11 +00:00
Jakob Stoklund Olesen
25d5745cc5
Add a RAGreedy::canEvict function.
...
This doesn't change functionality (much), but it allows for a more fine-grained
eviction policy. The current policy only compares spill weights, and that is not
always the best thing to do. Spill weights are designed to serve linear scan,
and they don't consider live range splitting.
Add a mechanism so canEvict() can request that a live range be evicted and
split/spilled. This is to avoid infinite eviction loops.
llvm-svn: 132101
2011-05-25 23:58:36 +00:00
Eli Friedman
c70355195c
Rewrite fast-isel integer cast handling to handle more cases, and to be simpler and more consistent.
...
The practical effects here are that x86-64 fast-isel can now handle trunc from i8 to i1, and ARM fast-isel can handle many more constructs involving integers narrower than 32 bits (including loads, stores, and many integer casts).
rdar://9437928 .
llvm-svn: 132099
2011-05-25 23:49:02 +00:00
Akira Hatanaka
fa63d3096d
Define WeakRefDirective.
...
llvm-svn: 132098
2011-05-25 23:30:30 +00:00
Eli Friedman
865866e7fe
PR9998: ashr exact %x, 31 is not equivalent to sdiv exact %x, -2147483648.
...
llvm-svn: 132097
2011-05-25 23:26:20 +00:00
Devang Patel
84b64a3e92
Remove unused statistical counter.
...
llvm-svn: 132087
2011-05-25 21:55:40 +00:00
Cameron Zwarich
a946f476d3
Convert tBX_CALL / tBXr9_CALL to actual pseudoinstructions.
...
llvm-svn: 132086
2011-05-25 21:53:50 +00:00
Charles Davis
2f6ecea19d
Add tests for .seh_setframe and .seh_handlerdata parsing. Fix issues with
...
them.
I had to add a special SwitchSectionNoChange method to MCStreamer just for
.seh_handlerdata. If this isn't OK, please let me know, and I'll find some
other way to fix .seh_handlerdata streaming.
llvm-svn: 132084
2011-05-25 21:43:45 +00:00
Eric Christopher
8f2cd0254d
Clean up comment a bit.
...
llvm-svn: 132083
2011-05-25 21:19:19 +00:00
Eric Christopher
8c5e4192e6
Implement the 'm' modifier. Note that it only works for memory operands.
...
Part of rdar://9119939
llvm-svn: 132081
2011-05-25 20:51:58 +00:00
Akira Hatanaka
f1412e4d2f
Remove MipsTargetLowering::LowerFP_TO_SINT. Patterns for fp_to_sint have already
...
been defined in MipsInstrFPU.td.
llvm-svn: 132076
2011-05-25 20:08:05 +00:00
Akira Hatanaka
44eba3ac49
Custom-lower FCOPYSIGN nodes.
...
llvm-svn: 132074
2011-05-25 19:32:07 +00:00
Eli Friedman
5bbb75655b
Prepare ARMFastISel::SelectSIToFP for getRegForValue returning registers for i8 and i16 values.
...
llvm-svn: 132073
2011-05-25 19:09:45 +00:00
Evan Cheng
9605a698b0
Simplify r132022 based on Cameron's feedback.
...
llvm-svn: 132071
2011-05-25 18:17:13 +00:00
Akira Hatanaka
d72cc55fcc
Update MaxCallFrameSize regardless of the relocation model selected.
...
llvm-svn: 132070
2011-05-25 18:08:32 +00:00
Akira Hatanaka
92a26d4e18
Change initial value of MaxCallFrameSize. MipsFI::getMaxCallFrameSize() should
...
return 0 if there are no function calls made.
llvm-svn: 132065
2011-05-25 17:52:48 +00:00
Akira Hatanaka
46662e0f91
Coding style fixes. Added comments.
...
llvm-svn: 132063
2011-05-25 17:32:06 +00:00
Francois Pichet
85ec52125b
Remove unused OpcodeMask enumerator.
...
llvm-svn: 132062
2011-05-25 17:02:53 +00:00
Francois Pichet
f83114dceb
Fix 3 MSVC warnings:
...
'void (__cdecl *)()' differs in parameter lists from 'void (__cdecl *)(void)'
atexit really expects a "void f(void)" function.
llvm-svn: 132061
2011-05-25 16:32:33 +00:00
Francois Pichet
58b09c9366
Fix MSVC warning: "is out of range for enum constant"
...
MSVC doesn't support 64 bit enum.
OpcodeMask is not used anywhere in the code base.
llvm-svn: 132057
2011-05-25 15:58:10 +00:00
Rafael Espindola
33dacdfe66
Fix some issues Duncan found in the previous commit.
...
I kept the reference to the ABI since that is the common case. The
-fno-asynchronous-unwind-tables option is a user controlled way of breaking
the ABI.
llvm-svn: 132053
2011-05-25 12:54:08 +00:00
Frits van Bommel
308a534431
Fix warning in the CMake build about redefining LLVM_PATH_XDOT_PY by making sure both definitions are identical. This used to produce warnings like
...
In file included from .../llvm/trunk/tools/lto/LTOCodeGenerator.cpp:45:
In file included from .../llvm/trunk/include/llvm/Support/system_error.h:225:
.../include/llvm/Config/config.h:591:9: warning: 'LLVM_PATH_XDOT_PY' macro redefined
#define LLVM_PATH_XDOT_PY ".../bin/xdot.py"
^
.../include/llvm/Config/llvm-config.h:98:9: note: previous definition is here
#define LLVM_PATH_XDOT_PY ""
^
1 warning generated.
(Paths edited for clarity)
Note: This only affected people who had xdot.py installed.
llvm-svn: 132050
2011-05-25 06:32:23 +00:00
Argyrios Kyrtzidis
0246d63715
[tablegen] A couple of changes to ClangDiagnosticEmmitter.
...
-Emit an empty warning option as string ("") instead of 0.
-For diagnostic names also emit the size of the string.
llvm-svn: 132046
2011-05-25 05:04:22 +00:00
Charles Davis
828b00c0e1
Add tests for .seh_savereg and .seh_savexmm parsing. Once again, fix the
...
buggy methods that parse these directives.
llvm-svn: 132045
2011-05-25 04:51:25 +00:00
Cameron Zwarich
a51604e511
Restore an accidentally removed comment.
...
llvm-svn: 132044
2011-05-25 04:48:17 +00:00
Cameron Zwarich
6b66ee1865
Move some code to a more logical place.
...
llvm-svn: 132043
2011-05-25 04:45:29 +00:00
Cameron Zwarich
3088e0a179
Make tTAILJMPr/tTAILJMPrND emit a tBX without a preceding MOV of PC to LR. This
...
fixes <rdar://problem/9495913>
llvm-svn: 132042
2011-05-25 04:45:27 +00:00
Cameron Zwarich
310b3472ec
Change the order of tBX's operands so that the predicate operands come after the
...
target register, matching BX. I filed this bug because I was confused at first:
PR10007 - ARM branch instructions have inconsistent predicate operand placement
<http://llvm.org/bugs/show_bug.cgi?id=10007 >
llvm-svn: 132041
2011-05-25 04:45:23 +00:00