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
Douglas Gregor
27d0c44524
Update the jump-scope checker for local variables with initializers,
...
so that it looks at the initializer of a local variable of class type
(or array thereof) to determine whether it's just an implicit
invocation of the trivial default constructor. Fixes PR10034.
llvm-svn: 132191
2011-05-27 16:05:29 +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
Howard Hinnant
a676f7d36a
noexcept for <utility>. This included a little repair on pair, and some noexcept workarounds.
...
llvm-svn: 132186
2011-05-27 15:04:19 +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
Richard Trieu
0cbb131d8b
Add an additional check for null pointer before accessing PatternDecl.
...
llvm-svn: 132175
2011-05-27 02:08:53 +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
Chandler Carruth
7c430c0ec2
Enhance Clang to start instantiating static data member definitions
...
within class templates when they are necessary to complete the type of
the member. The canonical example is code like:
template <typename T> struct S {
static const int arr[];
static const int x;
static int f();
};
template <typename T> const int S<T>::arr[] = { 1, 2, 3 };
template <typename T> const int S<T>::x = sizeof(arr) / sizeof(arr[0]);
template <typename T> int S<T>::f() { return x; }
int x = S<int>::f();
We need to instantiate S<T>::arr's definition to pick up its initializer
and complete the array type. This involves new code to specially handle
completing the type of an expression where the type alone is
insufficient. It also requires *updating* the expression with the newly
completed type. Fortunately, all the other infrastructure is already in
Clang to do the instantiation, do the completion, and prune out the
unused bits of code that result from this instantiation.
This addresses the initial bug in PR10001, and will be a step to
fleshing out other cases where we need to work harder to complete an
expression's type. Who knew we still had missing C++03 "features"?
llvm-svn: 132172
2011-05-27 01:33:31 +00:00
Douglas Gregor
a9d8493310
Objective-C doesn't consider the use of incomplete types as method
...
parameter types to be ill-formed. However, it relies on the
completeness of method parameter types when producing metadata, e.g.,
for a protocol, leading IR generating to crash in such cases.
Since there's no real way to tighten down the semantics of Objective-C
here without breaking existing code, do something safe but lame:
suppress the generation of metadata when this happens.
Fixes <rdar://problem/9123036>.
llvm-svn: 132171
2011-05-27 01:19:52 +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
Johnny Chen
f5801f8d11
Remove extra '.' in the comment.
...
llvm-svn: 132160
2011-05-26 22:01:50 +00:00
Johnny Chen
75ec159da5
Add comment.
...
llvm-svn: 132152
2011-05-26 21:53:05 +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
Johnny Chen
792ed4c616
Comment change.
...
llvm-svn: 132150
2011-05-26 21:50:47 +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
Johnny Chen
0c0f977840
Simplify test setup; there's no need to pass a customized dictionary here.
...
llvm-svn: 132147
2011-05-26 21:43:19 +00:00
Benjamin Kramer
f546f411b0
Silence sign compare warning.
...
llvm-svn: 132146
2011-05-26 21:32:30 +00:00
Richard Trieu
17afcbe5de
Change the include stack of "instantiated from" notes to fall under the control of f/fno-diagnostics-show-note-include-stack flags. This should help with reducing diagnostic spew from macros instantiations.
...
llvm-svn: 132143
2011-05-26 20:49:16 +00:00
Jim Ingham
46fbc60f63
regexp-break -> _regexp-break in command string.
...
llvm-svn: 132141
2011-05-26 20:39:01 +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
Richard Trieu
61384cb8bd
Add a fix-it and better error recovery for improperly nested namespaces. This will give a better error message for cases such as "namespace foo::bar::baz {}" and a suggested fix-it of "namespace foo { namespace bar { namespace baz {} } }"
...
llvm-svn: 132138
2011-05-26 20:11:09 +00:00
Howard Hinnant
a62f28994c
Applied noexcept to everything in [diagnostics] (Chapter 19)
...
llvm-svn: 132137
2011-05-26 19:48:01 +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
Howard Hinnant
411d1bcc3b
Turn on cxx_alias_templates support
...
llvm-svn: 132134
2011-05-26 19:07:54 +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
Ted Kremenek
f230198f15
Tighen analyzer diagnostics w.r.t ObjC/CF leaks.
...
llvm-svn: 132130
2011-05-26 18:45:44 +00:00
Howard Hinnant
fafca58c58
Applied noexcept to everything in [language.support] (Chapter 18)
...
llvm-svn: 132129
2011-05-26 18:23:59 +00:00
Eric Christopher
33a73c7755
Reorganize these slightly according to operand type.
...
llvm-svn: 132128
2011-05-26 18:22:26 +00:00