summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Formatting cleanup.Richard Smith2014-06-041-10/+9
| | | | llvm-svn: 210219
* Remove the overload of GetAddrOfConstantString methodAlexey Samsonov2014-06-043-41/+11
| | | | llvm-svn: 210214
* Refactor and generalize GetAddrOfConstantString and ↵Alexey Samsonov2014-06-042-95/+87
| | | | | | | | | | | | | GetAddrOfConstantStringFromLiteral. Share mode code between these functions and re-structure them in a way which shows how similar they actually are. The latter function works well with literals of multi-byte chars and does a GlobalVariable name mangling (if global strings are non-writable). No functionality change. llvm-svn: 210212
* This cast is not necessary any more (llvm api change).Rafael Espindola2014-06-041-1/+1
| | | | llvm-svn: 210206
* Update for llvm api change.Rafael Espindola2014-06-043-4/+4
| | | | llvm-svn: 210204
* Add __builtin_operator_new and __builtin_operator_delete, which act like callsRichard Smith2014-06-033-1/+28
| | | | | | | to the normal non-placement ::operator new and ::operator delete, but allow optimizations like new-expressions and delete-expressions do. llvm-svn: 210137
* Fix leak from r210059Alp Toker2014-06-031-1/+1
| | | | | | | Also revert r210096 which temporarily disabled the test while this was being investigated. llvm-svn: 210115
* Remove incorrect assertion.Richard Smith2014-06-031-4/+3
| | | | llvm-svn: 210092
* Implement DR990 and DR1070. Aggregate initialization initializes uninitializedRichard Smith2014-06-031-11/+18
| | | | | | | | | elements from {}, rather than value-initializing them. This permits calling an initializer-list constructor or constructing a std::initializer_list object. (It would also permit initializing a const reference or rvalue reference if that weren't explicitly prohibited by other rules.) llvm-svn: 210091
* When emitting a multidimensional array new, emit the initializers for theRichard Smith2014-06-032-137/+173
| | | | | | | | | trailing elements as a single loop, rather than sometimes emitting a nest of several loops. This fixes a bug where CodeGen would sometimes try to emit an expression with the wrong type for the element being initialized. Plus various other minor cleanups to the IR produced for array new initialization. llvm-svn: 210079
* Update for llvm API change.Rafael Espindola2014-06-032-40/+55
| | | | | | Aliases in llvm now hold an arbitrary expression. llvm-svn: 210063
* Fix -emit-codegen-only to not generate binariesAlp Toker2014-06-031-0/+1
| | | | llvm-svn: 210059
* Eliminate redundant MangleBuffer classAlp Toker2014-06-034-16/+13
| | | | | | | | | The only remaining user didn't actually use the non-dynamic storage facility this class provides. The std::string is transitional and likely to be StringRefized shortly. llvm-svn: 210058
* Itanium ABI: Update getAddrOfVTable to set the DLL storage class for vtablesHans Wennborg2014-06-021-0/+6
| | | | | | | | This corresponds to the same change for the MS ABI in r209908. Differential Revision: http://reviews.llvm.org/D3993 llvm-svn: 210054
* Delete apparently unused methodAlexey Samsonov2014-06-022-29/+0
| | | | llvm-svn: 210047
* [CodeGen] Don't use SizeTy for EmitNeonSplat.Michael J. Spencer2014-06-021-1/+1
| | | | llvm-svn: 210042
* Remove unused variableAlexey Samsonov2014-06-021-2/+0
| | | | llvm-svn: 210041
* Fix comment vs function name mismatchHans Wennborg2014-06-021-1/+1
| | | | llvm-svn: 210039
* Remove sanitizer blacklist from ASan/TSan/MSan function passes.Alexey Samsonov2014-06-021-9/+5
| | | | | | | | | | | | | | | | | Instrumentation passes now use attributes address_safety/thread_safety/memory_safety which are added by Clang frontend. Clang parses the blacklist file and adds the attributes accordingly. Currently blacklist is still used in ASan module pass to disable instrumentation for certain global variables. We should fix this as well by collecting the set of globals we're going to instrument in Clang and passing it to ASan in metadata (as we already do for dynamically-initialized globals and init-order checking). This change also removes -tsan-blacklist and -msan-blacklist LLVM commandline flags in favor of -fsanitize-blacklist= Clang flag. llvm-svn: 210037
* CGDebugInfo: Simplify/invert createLexicalBlock parameter construction.David Blaikie2014-06-021-8/+5
| | | | llvm-svn: 210033
* [CodeGen] Don't cast and use SizeTy instead of Int32Ty when constructing ↵Michael J. Spencer2014-05-313-23/+19
| | | | | | {extract,insert} vector element instructions. llvm-svn: 209942
* Start adding support for dllimport/dllexport on classes (PR11170)Hans Wennborg2014-05-304-5/+36
| | | | | | | | | | | | | | | | This implements the central part of support for dllimport/dllexport on classes: allowing the attribute on class declarations, inheriting it to class members, and forcing emission of exported members. It's based on Nico Rieck's patch from http://reviews.llvm.org/D1099. This patch doesn't propagate dllexport to bases that are template specializations, which is an interesting problem. It also doesn't look at the rules when redeclaring classes with different attributes, I'd like to do that separately. Differential Revision: http://reviews.llvm.org/D3877 llvm-svn: 209908
* [OPENMP] Improve debug location codegen for OpenMP runtime library.Alexey Bataev2014-05-302-14/+23
| | | | llvm-svn: 209876
* Add flags -Rpass-missed and -Rpass-analysis.Diego Novillo2014-05-291-44/+81
| | | | | | | | | | | | | | | | | | | | | | Summary: These two flags are in the same family as -Rpass, but are used in different situations. -Rpass-missed is used by optimizers to inform the user when they tried to apply an optimization but couldn't (or wouldn't). -Rpass-analysis is used by optimizers to report analysis results back to the user (e.g., why the transformation could not be applied). Depends on D3682. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3683 llvm-svn: 209839
* MS ABI: Emit static data members with proper linkageNico Rieck2014-05-291-2/+7
| | | | llvm-svn: 209826
* Fix spurious remarks when -Weverything is used.Diego Novillo2014-05-291-0/+6
| | | | | | | | | | | With -Weverything, the backend remarks are enabled. This was causing spurious diagnostics for remarks that we don't yet handle (cf http://reviews.llvm.org/D3683). This will stop being a problem once http://reviews.llvm.org/D3683 is committed. llvm-svn: 209823
* [ASan] Hoist blacklisting globals from init-order checking to Clang.Alexey Samsonov2014-05-291-6/+5
| | | | | | | | | Clang knows about the sanitizer blacklist and it makes no sense to add global to the list of llvm.asan.dynamically_initialized_globals if it will be blacklisted in the instrumentation pass anyway. Instead, we should do as much blacklisting as possible (if not all) in the frontend. llvm-svn: 209789
* Reverting 209503 - Breaks asan blacklistsWarren Hunt2014-05-281-4/+1
| | | | | | | | I opened a discussion on cfe-commits. Ideally we've got a few things that need to happen. CompilerRT should probably have blacklists tests. Asan should probably not depend on that specific field. llvm-svn: 209766
* Debug Info: Fix the source range for IfStmt's ConditionScope.Adrian Prantl2014-05-281-1/+1
| | | | | | | | | | Since the continuation block of the if statement is emitted within the condition scope this had the undesirable effect of creating a line table entry at the end of the then or else statement, a line that may have never been executed. PR19864 / rdar://problem/17052973 llvm-svn: 209764
* Add 'nonnull' parameter or return attribute when producing an llvm pointer ↵Nick Lewycky2014-05-281-0/+6
| | | | | | type in a function type where the C++ type is a reference. Update the tests. llvm-svn: 209723
* Don't dllimport/export destructor variants implemented by thunks.Hans Wennborg2014-05-282-16/+18
| | | | | | | | | | | | MSVC doesn't export these functions, so trying to import them doesnt' work. Also, don't let any dll attributes on the CXXDestructorDecl influence the thunk's linkage -- they should always be linkonce_odr. This takes care of the FIXME's for this in Nico's tests. Differential Revision: http://reviews.llvm.org/D3930 llvm-svn: 209706
* Revert small change to EmitDeclRefLValueRenato Golin2014-05-271-9/+8
| | | | | | | That small change, although it looked harmless, it made emitting the LValue on the PHI node without the proper cast. Reverting it fixes PR19841. llvm-svn: 209663
* Fix some misplaced spaces around 'override'Hans Wennborg2014-05-241-1/+1
| | | | llvm-svn: 209588
* AArch64/ARM64: rename ARM64 components to AArch64Tim Northover2014-05-244-474/+475
| | | | | | This keeps Clang consistent with backend naming conventions. llvm-svn: 209579
* AArch64/ARM64: update Clang after AArch64 removal.Tim Northover2014-05-243-1526/+4
| | | | | | | | | | | A few (mostly CodeGen) parts of Clang were tightly coupled to the AArch64 backend. Now that it's gone, they will not even compile. I've also deduplicated RUN lines in many of the AArch64 tests. This might improve "make check-all" time noticably: some of those NEON tests were monsters. llvm-svn: 209578
* Use comdats to avoid double initialization of weak dataReid Kleckner2014-05-234-23/+45
| | | | | | | | | | | | | | | | | Initializers of global data that can appear multiple TUs (static data members of class templates or __declspec(selectany) data) are now in a comdat group keyed on the global variable being initialized. On non-Windows platforms, this is a code size and startup time optimization. On Windows, this is necessary for ABI compatibility with MSVC. Fixes PR16959. Reviewers: rsmith Differential Revision: http://reviews.llvm.org/D3811 llvm-svn: 209555
* Emit used/dllexport inline method definitions in nested classes (PR19743, ↵Hans Wennborg2014-05-232-11/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR11170) The previous code that was supposed to handle this didn't work since parsing of inline method definitions is delayed to the end of the outer class definition. Thus, when HandleTagDeclDefinition() got called for the inner class, the inline functions in that class had not been parsed yet. Richard suggested that the way to do this is by handling inline method definitions through a new ASTConsumer callback. I really wanted to call ASTContext::DeclMustBeEmitted() instead of checking for attributes, but doing that causes us to compute linkage, and then we fail with "error: unsupported: typedef changes linkage of anonymous type, but linkage was already computed" on tests like this: (from SemaCXX/undefined-internal.cpp) :-/ namespace test7 { typedef struct { void bar(); void foo() { bar(); } } A; } Differential Revision: http://reviews.llvm.org/D3809 llvm-svn: 209549
* [MS-ABI] Silence warning from r209523Warren Hunt2014-05-231-1/+1
| | | | | | no functional change. llvm-svn: 209525
* [MS-ABI] Implements MS-compatible RTTIWarren Hunt2014-05-236-41/+504
| | | | | | | | | | | | | Enables the emission of MS-compatible RTTI data structures for use with typeid, dynamic_cast and exceptions. Does not implement dynamic_cast or exceptions. As an artiface, typeid works in some cases but proper support an testing will coming in a subsequent patch. majnemer has fuzzed the results. Test cases included. Differential Revision: http://reviews.llvm.org/D3833 llvm-svn: 209523
* Fix '-main-file-name <name>' so that it is used for the ModuleID.Robert Lytton2014-05-231-1/+4
| | | | | | | | | Summary: Previously, you could not specify the original file name when passing a preprocessed file into the compiler Now you can use 'clang -Xclang -main-file-name -Xclang <original file name> ...' Or 'clang -cc1 -main-file-name <original file name> ...' llvm-svn: 209503
* Don't set unnamed_addr in CreateRuntimeVariable.Rafael Espindola2014-05-222-9/+3
| | | | | | | | | | | | | This was fairly broken. For example, @__dso_handle would or would not get an unnamed_addr depending on how many global destructors were used in a translation unit. The consensus was that not every runtime variable is unnamed_addr and that __dso_handle handle should not be, so just don't add unnamed_addr in CreateRuntimeVariable. llvm-svn: 209484
* This patch adds a helper class (CGLoopInfo) for marking memory instructions ↵Alexander Musman2014-05-228-4/+363
| | | | | | | | | | with llvm.mem.parallel_loop_access metadata. It also adds a simple initial version of codegen for pragma omp simd (it will change in the future to support all the clauses). Differential revision: http://reviews.llvm.org/D3644 llvm-svn: 209411
* [C++11] Use 'nullptr'. CodeGen edition.Craig Topper2014-05-2146-854/+895
| | | | llvm-svn: 209272
* Update for paired llvm commit with AsmVerbose.Eric Christopher2014-05-211-6/+1
| | | | llvm-svn: 209261
* Update for llvm change to avoid having global flag setting in TargetMachine.Eric Christopher2014-05-201-3/+2
| | | | llvm-svn: 209239
* Implement the flatten attribute.Peter Collingbourne2014-05-201-0/+6
| | | | | | | | | | This is a GNU attribute that causes calls within the attributed function to be inlined where possible. It is implemented by giving such calls the alwaysinline attribute. Differential Revision: http://reviews.llvm.org/D3816 llvm-svn: 209217
* Clean up language and grammar.Eric Christopher2014-05-201-1/+1
| | | | | | | Based on a patch by jfcaron3@gmail.com! PR19806 llvm-svn: 209215
* XCore target: sort typestring enum fields alphabeticallyRobert Lytton2014-05-201-16/+23
| | | | llvm-svn: 209196
* Demote the "Debug Info Version" module flag to llvm::Module::WarningAdrian Prantl2014-05-191-6/+4
| | | | | | | | | behavior on mismatch. The AutoUpgrader will drop incompatible debug info any way and also emit a warning diagnostic for it. rdar://problem/16926122 llvm-svn: 209182
* Using SmallString and correct addr varRenato Golin2014-05-191-3/+5
| | | | llvm-svn: 209180
OpenPOWER on IntegriCloud