summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add unnamed_addr to internal globals which are only used as an operand to ↵Eli Friedman2011-05-274-5/+6
| | | | | | memcpy. (Spotted by looking at IR.) llvm-svn: 132226
* Add a GR32_NOREX_NOSP register class and fix a bug where ↵Cameron Zwarich2011-05-273-2/+58
| | | | | | | | | 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
* Fix a regression I recently introduced by removing DwarfRegNum ofRafael Espindola2011-05-272-1/+45
| | | | | | | | | | 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
* Match llvm-gcc's string literals alignment by forcing alignment on string ↵Eli Friedman2011-05-272-2/+3
| | | | | | literals to 1. This can significantly impact the size of the string data, and as far as I know, the alignment doesn't help performance. rdar://9078969 . llvm-svn: 132223
* Make size computation less brittle.Rafael Espindola2011-05-2710-82/+27
| | | | llvm-svn: 132222
* Use the with statement to simplify the build script.Johnny Chen2011-05-271-42/+20
| | | | llvm-svn: 132221
* Add the suffix to the Win64 EH data sections' names if given. Add a test forCharles Davis2011-05-273-6/+61
| | | | | | this. XFAIL'd, because the COFF AsmParser can't handle .section yet. llvm-svn: 132220
* Back out r132209; it's breaking nightly tests.Eli Friedman2011-05-2710-92/+62
| | | | llvm-svn: 132219
* Clean up my changes to jump-diagnostic handling for local variables ofDouglas Gregor2011-05-274-29/+103
| | | | | | | | class type (or array thereof), eliminating some redundant checks (thanks Eli!) and adding some tests where the behavior differs in C++98/03 vs. C++0x. llvm-svn: 132218
* Refactor getActionType and getTypeToTransformTo ; place all of the 'decision'Nadav Rotem2011-05-275-92/+84
| | | | | | code in one place. Re-apply 131534 and fix the multi-step promotion of integers. llvm-svn: 132217
* noexcept for <bitset>.Howard Hinnant2011-05-272-150/+159
| | | | llvm-svn: 132216
* Attempt to preserve debug line info in LICM; as the comment in the code ↵Eli Friedman2011-05-271-4/+14
| | | | | | | | says, it's hard to pick good line numbers for this transformation, but something is better than nothing. rdar://9143729 llvm-svn: 132215
* Typo is test caseChad Rosier2011-05-271-2/+2
| | | | llvm-svn: 132214
* Make room for register allocation to improve.Jakob Stoklund Olesen2011-05-271-1/+1
| | | | llvm-svn: 132213
* Add change of crc32 intrinsic to release notesChad Rosier2011-05-271-0/+6
| | | | llvm-svn: 132212
* Don't use movw / movt for iOS static codegen for now to workaround some ↵Evan Cheng2011-05-272-5/+6
| | | | | | tools issues. rdar://9514789 llvm-svn: 132211
* Delete a test that is no longer relevant.Jakob Stoklund Olesen2011-05-271-52/+0
| | | | | | | | | | | | | | | | | | | 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
* Implement a new, much improved version of the cleanup hack. We just needJohn McCall2011-05-2710-62/+92
| | | | | | | | to be careful to emit landing pads that are always prepared to handle a cleanup path. This is correct mostly because of the fix to the LLVM inliner, r132200. llvm-svn: 132209
* Add assertions to verify that we are not trying to instantiate aAlexis Hunt2011-05-271-9/+11
| | | | | | | | | nontemplate in Sema::InstantiateTemplateDecl. This should make the issue in PR10026 more visible, although it's not going to fix it because something is violating this precondition. llvm-svn: 132208
* CRC32 intrinsics were renamed at revision 132163. This submissionChad Rosier2011-05-273-5/+21
| | | | | | | | 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
* Keep this simple. Use DIType to get signness and size of a type. Based on ↵Devang Patel2011-05-271-18/+13
| | | | | | size, select appropraite form. llvm-svn: 132206
* Add a parameter to the Win64 EH section getters to get a section with aCharles Davis2011-05-276-22/+60
| | | | | | | | | | 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
* noexcept for <tuple>. And in the process learned that I had done it wrong ↵Howard Hinnant2011-05-274-40/+111
| | | | | | for pair's swap. I needed to create an __is_nothrow_swappable<T>::value trait that was smart enought to answer false when __is_swappable<T>::value is false. Otherwise one gets compile-time errors when using pair or tuple of non-swappable types, even if you never try to swap the pair or tuple. llvm-svn: 132204
* Add iOS testEvan Cheng2011-05-271-10/+29
| | | | llvm-svn: 132203
* Update this comment.Dan Gohman2011-05-271-1/+3
| | | | llvm-svn: 132202
* Don't sink or hoist debug info instrinsics; it isn't useful. This also ↵Eli Friedman2011-05-271-3/+6
| | | | | | | | prevents LICM sinking from erasing debug intrinsics which don't dominate any exit block of the loop. rdar://9143943 . llvm-svn: 132201
* Fix the inliner to maintain the current de facto invoke semantics:John McCall2011-05-272-42/+258
| | | | | | | | | | | | | | - 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
* Delete MethodBodies that only filtered reserved registers.Jakob Stoklund Olesen2011-05-271-111/+0
| | | | | | | The register allocators know to filter reserved registers from the allocation orders, so we don't need all of this boilerplate. llvm-svn: 132199
* Handle signed types gracefully.Devang Patel2011-05-271-9/+21
| | | | | | This fixes regressions reported by buildbots as a fallout of r132193. llvm-svn: 132197
* And fix the test in r132194.Eli Friedman2011-05-271-1/+1
| | | | llvm-svn: 132196
* Oops, wasn't intending to commit this. Partial revert of r132194.Eli Friedman2011-05-271-6/+9
| | | | llvm-svn: 132195
* Fix a silly mistake (which trips over an assertion) in r132099. rdar://9515076Eli Friedman2011-05-273-9/+17
| | | | llvm-svn: 132194
* Select DW_AT_const_value size based on variable size.Devang Patel2011-05-274-5/+44
| | | | llvm-svn: 132193
* Remove DwarfRegNum from the individual bits of the condition register.Rafael Espindola2011-05-271-32/+32
| | | | | | These should be DW_OP_bit_piece of CR (64). llvm-svn: 132192
* Update the jump-scope checker for local variables with initializers,Douglas Gregor2011-05-272-10/+67
| | | | | | | | 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
* Remove DwarfRegNum from CARRY. I should be encoded with DW_OP_bit_piece.Rafael Espindola2011-05-271-1/+1
| | | | llvm-svn: 132190
* Assorted fixes for Win64 EH unwind info emission:Charles Davis2011-05-272-20/+42
| | | | | | | | | | - 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
* Remove dwarf numbers from subregs. We should use DW_OP_bit_piece toRafael Espindola2011-05-271-45/+45
| | | | | | | | refer to them. I tested this with both check-all and the gdb testsuite. llvm-svn: 132187
* noexcept for <utility>. This included a little repair on pair, and some ↵Howard Hinnant2011-05-273-29/+80
| | | | | | noexcept workarounds. llvm-svn: 132186
* InstCombine: Make switch folding with equality compares more aggressive by ↵Benjamin Kramer2011-05-272-15/+94
| | | | | | | | 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
* Fix PR10029 - VerifyCoalescing failure on patterns_dfa.c of 445.gobmk.Cameron Zwarich2011-05-272-2/+58
| | | | llvm-svn: 132181
* Add a test for Win64 EH unwind information emission.Charles Davis2011-05-271-0/+51
| | | | llvm-svn: 132180
* Make the branch encoding for tBcc more obvious that it's a 4-byte opcodeEric Christopher2011-05-272-1/+5
| | | | | | followed by a conditional and imm8. llvm-svn: 132179
* Fix comment.Eric Christopher2011-05-271-1/+1
| | | | llvm-svn: 132178
* Start keeping track of where the various unwind instructions are in the prolog.Charles Davis2011-05-273-32/+50
| | | | | | | Use them to calculate the offset inside the prolog. Emit this value when emitting the unwind codes. llvm-svn: 132177
* Add missing break statements. Align UNWIND_INFO and RUNTIME_FUNCTION structsCharles Davis2011-05-271-0/+6
| | | | | | | | to 4 bytes. I'm surprised no one caught the missing break statements. llvm-svn: 132176
* Add an additional check for null pointer before accessing PatternDecl.Richard Trieu2011-05-271-1/+1
| | | | llvm-svn: 132175
* My attempt at fixing the leak reported by the valgrind buildbots. Valgrind willCharles Davis2011-05-271-2/+4
| | | | | | | | 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
* Fix inverted conditional in SaveReg and SaveXMM. Err when the frame pointer isCharles Davis2011-05-271-3/+7
| | | | | | | already defined, and err when the PushMachFrame operation isn't the first operation (if specified at all). llvm-svn: 132173
* Enhance Clang to start instantiating static data member definitionsChandler Carruth2011-05-275-6/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud