Charles Davis
5ebea6fc5f
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
f64d56f9e2
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
823e8a90ce
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
32b363ded1
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
d619bcd565
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
0181c67669
Fix copy+pastos.
...
llvm-svn: 132168
2011-05-27 00:36:31 +00:00
Eli Friedman
6937c422a0
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
6a41ac0d30
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
5e3f883ddf
Do not insert anything after terminator.
...
llvm-svn: 132164
2011-05-26 23:16:48 +00:00
Chad Rosier
b87c4a6945
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
94fbcd8d81
Comment cleanup.
...
llvm-svn: 132162
2011-05-26 22:54:27 +00:00
Devang Patel
c67e8c5d45
Do not move DBG_VALUE in middle of PHI nodes.
...
llvm-svn: 132161
2011-05-26 22:43:14 +00:00
Devang Patel
52e803e053
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
177dbe2de1
Add comment.
...
llvm-svn: 132149
2011-05-26 21:49:28 +00:00
Devang Patel
e0b7ab9296
During branch folding avoid inserting redundant DBG_VALUE machine instructions.
...
llvm-svn: 132148
2011-05-26 21:47:59 +00:00
Akira Hatanaka
71839b355d
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
a77d692299
Fix some dwarf register numbers.
...
llvm-svn: 132136
2011-05-26 19:25:47 +00:00
Galina Kistanova
ceabe8c579
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
0395db684a
Fix LTO builds with xcode 4.
...
llvm-svn: 132132
2011-05-26 18:59:54 +00:00
Akira Hatanaka
5bfbea9ef2
Add support for C++ exception handling.
...
llvm-svn: 132131
2011-05-26 18:59:03 +00:00
Eric Christopher
4fc5b88850
Reorganize these slightly according to operand type.
...
llvm-svn: 132128
2011-05-26 18:22:26 +00:00
Akira Hatanaka
5a8bd76f99
Set HasSetDirective to true.
...
llvm-svn: 132127
2011-05-26 18:16:18 +00:00
Eli Friedman
15dc009422
Fix test on Windows.
...
llvm-svn: 132126
2011-05-26 18:00:32 +00:00
Charles Davis
4becdc727e
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
a5045b7351
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
44fb280873
Align Win64 EH Table sections to 4 bytes.
...
llvm-svn: 132111
2011-05-26 05:19:54 +00:00
Charles Davis
cf332d9ff7
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
3d8581cca9
Fix MSVC warning regarding mkdir function usage.
...
llvm-svn: 132109
2011-05-26 04:55:20 +00:00
Stuart Hastings
837a958ff6
Reverting 132105: it broke some LLVM-GCC DejaGNU tests.
...
llvm-svn: 132108
2011-05-26 04:09:49 +00:00
Cameron Zwarich
9c871755b6
Mark tBX as an indirect branch rather than a return.
...
llvm-svn: 132107
2011-05-26 03:41:12 +00:00
Charles Davis
0021487a8e
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
e704bfb21e
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
0577c5768b
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
6c654330dc
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
93ffb875ad
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
3f49cbeb37
Define WeakRefDirective.
...
llvm-svn: 132098
2011-05-25 23:30:30 +00:00
Eli Friedman
5cd755549b
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
7e814e1e36
Remove unused statistical counter.
...
llvm-svn: 132087
2011-05-25 21:55:40 +00:00
Cameron Zwarich
9c19995747
Convert tBX_CALL / tBXr9_CALL to actual pseudoinstructions.
...
llvm-svn: 132086
2011-05-25 21:53:50 +00:00
Charles Davis
ede0f07dae
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
e02bd15dbc
Clean up comment a bit.
...
llvm-svn: 132083
2011-05-25 21:19:19 +00:00
Eric Christopher
807da21e47
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
4806508364
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
32b5043265
Custom-lower FCOPYSIGN nodes.
...
llvm-svn: 132074
2011-05-25 19:32:07 +00:00
Eli Friedman
2bdd096540
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
335fcad6bc
Simplify r132022 based on Cameron's feedback.
...
llvm-svn: 132071
2011-05-25 18:17:13 +00:00
Akira Hatanaka
ae2e2d557a
Update MaxCallFrameSize regardless of the relocation model selected.
...
llvm-svn: 132070
2011-05-25 18:08:32 +00:00
Akira Hatanaka
953e0a3c45
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
33415b8179
Coding style fixes. Added comments.
...
llvm-svn: 132063
2011-05-25 17:32:06 +00:00
Francois Pichet
b2042fbfe2
Remove unused OpcodeMask enumerator.
...
llvm-svn: 132062
2011-05-25 17:02:53 +00:00