summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Implement PPC64TargetCodeGenInfo.Roman Divacky2012-05-091-0/+60
| | | | llvm-svn: 156491
* update calls to objectsize intrinsic to match LLVM r156473Nuno Lopes2012-05-092-4/+6
| | | | | | add a test for -fbounds-checking code generation llvm-svn: 156474
* add -fbounds-checking option.Nuno Lopes2012-05-083-1/+7
| | | | | | | | When enabled, clang generates bounds checks for array and pointers dereferences. Work to follow in LLVM's backend. OK'ed by Chad; thanks for the review. llvm-svn: 156431
* The address of a vla is actually complex and requires a dereference.Eric Christopher2012-05-081-1/+18
| | | | | | Part of rdar://11352000 llvm-svn: 156407
* Whitespace.Eric Christopher2012-05-081-1/+0
| | | | llvm-svn: 156406
* remove code to add bound checks for simple array accesses, since those are ↵Nuno Lopes2012-05-071-25/+0
| | | | | | | | already covered by the check with the objectsize builtin remove the comparison of objectsize with -1. since it's an unsigned comparison, it will always succeed if objectsize returns -1, which is enough to have the check removed llvm-svn: 156311
* Convert AVX non-temporal store builtins to LLVM-native IR. This was ↵Craig Topper2012-05-071-0/+3
| | | | | | previously done for SSE builtins. llvm-svn: 156296
* Make BuiltinType::getName return a StringRef and introduce ↵Argyrios Kyrtzidis2012-05-051-1/+1
| | | | | | | | | | | | | BuiltinType::getNameAsCString to get a const char* if necessary. This avoids unnecessary conversions when we want to use the result of getName as a StringRef. Part of rdar://10796159 llvm-svn: 156227
* This patch adds a new Clang compiler flag "-gline-tables-only".Alexey Samsonov2012-05-045-37/+77
| | | | | | | | | | | | | | It reduces the amount of emitted debug information: 1) DIEs in .debug_info have types DW_TAG_compile_unit, DW_TAG_subprogram, DW_TAG_inlined_subroutine (for opt builds) and DW_TAG_lexical_block only. 2) .debug_str contains only function names. 3) No debug data for types/namespaces/variables is emitted. 4) The data in .debug_line is enough to produce valid stack traces with function names and line numbers. Reviewed by Eric Christopher. llvm-svn: 156160
* During block layout, after padding up to the max field alignment,John McCall2012-05-011-1/+2
| | | | | | | the alignment might actually exceed the max field alignment; don't assert in this case. llvm-svn: 155937
* Spacing.Chad Rosier2012-05-011-1/+1
| | | | llvm-svn: 155931
* Push variable declaration into nested scope (the only place where it is ↵Ted Kremenek2012-05-011-3/+1
| | | | | | used). Found by static analyzer. llvm-svn: 155922
* Add support for laying out vtordisps according to our currentJohn McCall2012-05-011-3/+1
| | | | | | | working knowledge of the Microsoft ABI. Based on a patch by Dmitry Sokolov. llvm-svn: 155905
* Abstract the emission of global destructors into ABI-specific codeJohn McCall2012-05-017-67/+96
| | | | | | | | | | | | | and only consider using __cxa_atexit in the Itanium logic. The default logic is to use atexit(). Emit "guarded" initializers in Microsoft mode unconditionally. This is definitely not correct, but it's closer to correct than just not emitting the initializer. Based on a patch by Timur Iskhodzhanov! llvm-svn: 155894
* Refactor the C++ ABI code a little bit to take advantage ofJohn McCall2012-05-015-165/+190
| | | | | | | | what I'm going to treat as basically universal properties of array-cookie code. Implement MS array cookies on top of that. Based on a patch by Timur Iskhodzhanov! llvm-svn: 155886
* Remove the ref/value inconsistency in filter_decl_iterator.David Blaikie2012-04-3013-58/+61
| | | | | | | | | | | | | filter_decl_iterator had a weird mismatch where both op* and op-> returned T* making it difficult to generalize this filtering behavior into a reusable library of any kind. This change errs on the side of value, making op-> return T* and op* return T&. (reviewed by Richard Smith) llvm-svn: 155808
* Use enum to set debug info size generated by ClangAlexey Samsonov2012-04-276-9/+12
| | | | llvm-svn: 155697
* Add a missing check in CodeGen of packed classes with vtables. ↵Eli Friedman2012-04-271-1/+7
| | | | | | <rdar://problem/11324125>. llvm-svn: 155689
* objective-c IRGen. Fixes a getter synthesis bugFariborz Jahanian2012-04-261-1/+1
| | | | | | | where getter type is super class of its property type, resulting in an assert. // rdar://11323676 llvm-svn: 155663
* Fix a bug with block layout when the block contains somethingJohn McCall2012-04-261-5/+8
| | | | | | | | | | | | more aligned than the block header but also contains something smaller than the block-header alignment but not exactly half the difference between the large alignment and the header alignment. Got that? I'm really not sure what I was thinking with the buggy computation here, but the fix is pretty obvious. llvm-svn: 155662
* Add a flag to the image info section indicating that the program is compiled forBill Wendling2012-04-241-1/+10
| | | | | | a simulator. llvm-svn: 155436
* enable TBAA when -fthread-sanitizer is given, even with -O0 or ↵Kostya Serebryany2012-04-243-4/+15
| | | | | | -relaxed-aliasing llvm-svn: 155430
* Forward declarations should take a context. This helps the debuggerEric Christopher2012-04-231-7/+6
| | | | | | | | | find forward declarations in the context that the actual definition will occur. rdar://11291658 llvm-svn: 155381
* Revert r155363, due to the underlying patches in LLVM causing regressionChandler Carruth2012-04-231-749/+155
| | | | | | test suite failures. llvm-svn: 155371
* Hexagon V5 (floating point) support in cfe.Sirish Pande2012-04-231-155/+749
| | | | llvm-svn: 155363
* PR12571: Objects of type clang::ConstantArrayType aren't always emitted withRichard Smith2012-04-221-10/+26
| | | | | | | type llvm::ArrayType -- sometimes we emit them as packed structs. Don't assert if such a global array has an element type with a non-trivial destructor. llvm-svn: 155305
* Fix bug 12574 - Avoid infinite recursion in constructors and destructors ↵Timur Iskhodzhanov2012-04-201-2/+3
| | | | | | when using Microsoft C++ ABI llvm-svn: 155189
* Implements boxed expressions for Objective-C. <rdar://problem/10194391>Patrick Beard2012-04-193-22/+22
| | | | llvm-svn: 155082
* Revert some Hexagon builtin commits to match reverts done to LLVM inChandler Carruth2012-04-181-749/+155
| | | | | | | | | | | | | | | | | | | r155047. See the LLVM log for the primary motivation: http://llvm.org/viewvc/llvm-project?rev=155047&view=rev Primary commit r154828: - Several issues were raised in review, and fixed in subsequent commits. - Follow-up commits also reverted, and which should be folded into the original before reposting: - r154837: Re-add the 'undef BUILTIN' thing to fix the build. - r154928: Fix build warnings, re-add (and correct) header and license - r154937: Typo fix. Please resubmit this patch with the relevant LLVM resubmission. llvm-svn: 155048
* Fix case where the alignment is overaligned, per Eli's suggestion.Chad Rosier2012-04-171-1/+4
| | | | | | rdar://11220251 llvm-svn: 154893
* Make sure EmitMoveFromReturnSlot is passing the correct alignment toChad Rosier2012-04-171-1/+1
| | | | | | | EmitFinalDestCopy (and thus pass EmitAggregateCopy the correct alignment). rdar://11220251 llvm-svn: 154883
* Typo.Eric Christopher2012-04-161-1/+1
| | | | llvm-svn: 154880
* Remove support for -fast-math metadata for the moment.Duncan Sands2012-04-161-4/+0
| | | | llvm-svn: 154851
* Generate fpmath metadata when -ffast-math. Note that no optimizations are hookedDuncan Sands2012-04-161-1/+6
| | | | | | up to this yet. llvm-svn: 154835
* Hexagon V5(Floating Point) support.Sirish Pande2012-04-161-155/+749
| | | | llvm-svn: 154828
* Adjust for LLVM name tweaks requested by Chandler.Duncan Sands2012-04-162-9/+9
| | | | llvm-svn: 154824
* Propagate alignment on lvalues through EmitLValueForField. PR12395.Eli Friedman2012-04-167-79/+93
| | | | llvm-svn: 154789
* Use MDBuilder to help with metadata creation.Duncan Sands2012-04-153-43/+14
| | | | llvm-svn: 154767
* PR12226: don't generate wrong code if a braced string literal is used toRichard Smith2012-04-152-14/+4
| | | | | | | | | initialize an array of unsigned char. Outside C++11 mode, this bug was benign, and just resulted in us emitting a constant which was double the required length, padded with 0s. In C++11, it resulted in us generating an array whose first element was something like i8 ptrtoint ([n x i8]* @str to i8). llvm-svn: 154756
* Rename "fpaccuracy" metadata to the more generic "fpmath". That's because I'mDuncan Sands2012-04-141-2/+1
| | | | | | | | | thinking of generalizing it to be able to specify other freedoms beyond accuracy (such as that NaN's don't have to be respected). I'd like the 3.1 release (the first one with this metadata) to have the more generic name already rather than having to auto-upgrade it in 3.2. llvm-svn: 154745
* Add an AttributedStmt type to represent a statement with C++11 attributesRichard Smith2012-04-142-0/+8
| | | | | | | | | attached. Since we do not support any attributes which appertain to a statement (yet), testing of this is necessarily quite minimal. Patch by Alexander Kornienko! llvm-svn: 154723
* Don't enter cleanups for unreachable variables. It's impossible toJohn McCall2012-04-132-0/+6
| | | | | | | | jump into these scopes, and the cleanup-entering code sometimes wants to do some operations first (e.g. a GEP), which can leave us with unparented IR. llvm-svn: 154684
* Avoid string thrashing when we can concatenate them in the final buffer.Benjamin Kramer2012-04-131-8/+8
| | | | llvm-svn: 154678
* Step forward with supporting of ARM homogenous aggregates:Anton Korobeynikov2012-04-134-43/+119
| | | | | | | - Handle unions - Handle C++ classes llvm-svn: 154664
* Implement __atomic_fetch_nand and __atomic_nand_fetch to complete our set ofRichard Smith2012-04-131-1/+11
| | | | | | GNU __atomic builtins. llvm-svn: 154659
* Fix a trivial oversight with apple-kext static local destructorsJohn McCall2012-04-131-0/+1
| | | | | | and add a test case. llvm-svn: 154653
* Implement the missing pieces needed to support libstdc++4.7's <atomic>:Richard Smith2012-04-132-4/+179
| | | | | | | | | | | | | | | | | | | | | | | | __atomic_test_and_set, __atomic_clear, plus a pile of undocumented __GCC_* predefined macros. Implement library fallback for __atomic_is_lock_free and __c11_atomic_is_lock_free, and implement __atomic_always_lock_free. Contrary to their documentation, GCC's __atomic_fetch_add family don't multiply the operand by sizeof(T) when operating on a pointer type. libstdc++ relies on this quirk. Remove this handling for all but the __c11_atomic_fetch_add and __c11_atomic_fetch_sub builtins. Contrary to their documentation, __atomic_test_and_set and __atomic_clear take a first argument of type 'volatile void *', not 'void *' or 'bool *', and __atomic_is_lock_free and __atomic_always_lock_free have an argument of type 'const volatile void *', not 'void *'. With this change, libstdc++4.7's <atomic> passes libc++'s atomic test suite, except for a couple of libstdc++ bugs and some cases where libc++'s test suite tests for properties which implementations have latitude to vary. llvm-svn: 154640
* Fix some i1/i8 confusion within _Atomic(bool) in IR generation, bothDouglas Gregor2012-04-122-6/+10
| | | | | | | | | | | | | | in general (such an atomic has boolean representation) and specifically for IR generation of __c11_atomic_init. The latter also means actually using initialization semantics for this initialization, rather than just creating a store. On a related note, make sure we actually put in non-atomic-to-atomic conversions when performing an implicit conversion sequence. IR generation is far too kind here, but we still want the ASTs to make sense. llvm-svn: 154612
* Implement support for 18 of the GNU-compatible __atomic builtins.Richard Smith2012-04-121-50/+175
| | | | | | | | | | | | This is not quite sufficient for libstdc++'s <atomic>: we still need __atomic_test_and_set and __atomic_clear, and may need a more complete __atomic_is_lock_free implementation. We are also missing an implementation of __atomic_always_lock_free, __atomic_nand_fetch, and __atomic_fetch_nand, but those aren't needed for libstdc++. llvm-svn: 154579
* These functions too have no prototypes. Audited the rest of Sema forEric Christopher2012-04-122-4/+4
| | | | | | | | FunctionDecl::Create calls as well. rdar://11079003 llvm-svn: 154578
OpenPOWER on IntegriCloud