summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Add the ObjFW runtime. Patch by Jonathan Schleifer!John McCall2012-07-124-5/+36
| | | | llvm-svn: 160102
* Add OpenCL metadata for kernel arg names. This output is controlled via a ↵Tanya Lattner2012-07-111-0/+30
| | | | | | | | flag as noted in the OpenCL Spec. Includes a test case. llvm-svn: 160092
* Temporarily revert this to see if it brings the gdb bot back.Eric Christopher2012-07-112-7/+6
| | | | llvm-svn: 160049
* The end of a block doesn't necessarily need a line table entry unlessEric Christopher2012-07-112-6/+7
| | | | | | | | | | there's something going on there. Remove the unconditional line entry and only add one if we're emitting cleanups (any other statements would be handled normally). Fixes rdar://9199234 llvm-svn: 160033
* Patch by Anton Lokhmotov to add OpenCL work group size attributes.Tanya Lattner2012-07-092-8/+56
| | | | llvm-svn: 159965
* The delete argument should not be converted to void*.Abramo Bagnara2012-07-091-11/+0
| | | | llvm-svn: 159961
* Distinguish more carefully between free functions and C++ instance methodsJohn McCall2012-07-0712-158/+218
| | | | | | | | in the ABI arrangement, and leave a hook behind so that we can easily tweak CCs on platforms that use different CCs by default for C++ instance methods. llvm-svn: 159894
* Add -ffp-contract = { fast | on | off } command line option support.Lang Hames2012-07-061-0/+13
| | | | | | | | | | | | | | | | | This flag sets the 'fp-contract' mode, which controls the formation of fused floating point operations. Available modes are: - Fast: Form fused operations anywhere. - On: Form fused operations where allowed by FP_CONTRACT. This is the default mode. - Off: Don't form fused operations (in future this may be relaxed to forming fused operations where it can be proved that the result won't be affected). Currently clang doesn't support the FP_CONTRACT pragma, so the 'On' and 'Off' modes are equivalent. llvm-svn: 159794
* Implement AST classes for comments, a real parser for Doxygen comments and aDmitri Gribenko2012-07-061-0/+1
| | | | | | | | | | | | | | very simple semantic analysis that just builds the AST; minor changes for lexer to pick up source locations I didn't think about before. Comments AST is modelled along the ideas of HTML AST: block and inline content. * Block content is a paragraph or a command that has a paragraph as an argument or verbatim command. * Inline content is placed within some block. Inline content includes plain text, inline commands and HTML as tag soup. llvm-svn: 159790
* Remove get(V)BaseClassOffsetInBits, the CharUnit functions should be used ↵Benjamin Kramer2012-07-045-8/+9
| | | | | | | | instead. No functionality change. llvm-svn: 159719
* Drop the ASTContext.h include from Stmt.h and fix up transitive users.Benjamin Kramer2012-07-041-0/+1
| | | | | | | | | | | | | | This required moving the ctors for IntegerLiteral and FloatingLiteral out of line which shouldn't change anything as they are usually called through Create methods that are already out of line. ASTContext::Deallocate has been a nop for a long time, drop it from ASTVector and make it independent from ASTContext.h Pass the StorageAllocator directly to AccessedEntity so it doesn't need to have a definition of ASTContext around. llvm-svn: 159718
* Rename the GCC Objective-C runtime to gcc from gnu-fragile and the GNUstepDavid Chisnall2012-07-034-12/+13
| | | | | | runtime to gnustep from gnu. Fix EH for the GCC runtime. llvm-svn: 159684
* Make the following changes in the way Mips handles vector arguments and returnAkira Hatanaka2012-07-031-32/+31
| | | | | | | | | | | values: - Return integer vectors in integer registers. - Pass vector arguments in integer registers. - Set an upper bound for argument alignment. The largest alignment is 8-byte for O32 and 16-byte for N32/64. llvm-svn: 159676
* Silence warning in -Asserts buildMatt Beaumont-Gay2012-07-031-0/+1
| | | | llvm-svn: 159635
* Share ConvertUTF8toWide() between Lex and CodeGen.Nico Weber2012-07-031-37/+2
| | | | llvm-svn: 159634
* Significantly simplify CGExprAgg's logic about ignored results:John McCall2012-07-024-95/+182
| | | | | | | | | | | | if we want to ignore a result, the Dest will be null. Otherwise, we must copy into it. This means we need to ensure a slot when loading from a volatile l-value. With all that in place, fix a bug with chained assignments into __block variables of aggregate type where we were losing insight into the actual source of the value during the second assignment. llvm-svn: 159630
* When we're looking for redeclarations which might provide a definition in ↵Eli Friedman2012-07-021-0/+1
| | | | | | CodeGen, make sure we examine all the redeclarations. PR13252. llvm-svn: 159586
* Update Clang to reflect the new home of IRBuilder.h as of r159421.Chandler Carruth2012-06-291-1/+1
| | | | llvm-svn: 159422
* Update based on move of DIBuilder.h to include/llvm.Bill Wendling2012-06-291-1/+1
| | | | llvm-svn: 159415
* Fix PR13234 - crash when trying to report an unsupported ABI featureTimur Iskhodzhanov2012-06-291-1/+1
| | | | llvm-svn: 159405
* Dead code eliminate the massive hexagon builtin intrinsic supporting code.Benjamin Kramer2012-06-282-2586/+0
| | | | | | | | The tablegen'd code does the same thing without this egregious duplication. In my limited testing everything seems to work, however there can be differences if the clang and llvm builtin definitions don't match. llvm-svn: 159371
* Now that we use the GCC builtin <-> llvm intrinsic, dead code eliminate the ↵Benjamin Kramer2012-06-281-298/+0
| | | | | | | | handwritten emitter. The generated code uncovered an invalid prototype for __builtin_mips_shilo, fix it along the way. llvm-svn: 159368
* Support MIPS DSP Rev1 intrinsics. Simon Atanasyan2012-06-282-0/+299
| | | | | | This patch was reviewed in the llvm-commits list by Jim Grosbach. llvm-svn: 159366
* Compare the canonical types and document why we give up on the covariant case.Rafael Espindola2012-06-281-2/+8
| | | | llvm-svn: 159360
* Disable devirtualization when we have covariant returns. I will open a bugRafael Espindola2012-06-281-0/+3
| | | | | | for tracking this. llvm-svn: 159351
* Don't devirtualize calls when we don't have the correct type of the this pointerRafael Espindola2012-06-281-19/+36
| | | | | | | | | handy. It can be done, but we would have to build a derived-to-base cast during codegen to compute the correct this pointer. I will handle covariant returns next. llvm-svn: 159350
* Add -ftls-model command-line flag.Hans Wennborg2012-06-283-28/+51
| | | | | | This allows for setting the default TLS model. (PR9788) llvm-svn: 159336
* Fix another issue with devirtualizing calls to final methods by passing themRafael Espindola2012-06-281-9/+16
| | | | | | | | the correct this pointer. There is some potential for sharing a bit more code with canDevirtualizeMemberFunctionCalls, but that can be done in an independent patch. llvm-svn: 159326
* Fix grammar.Eric Christopher2012-06-281-1/+1
| | | | llvm-svn: 159321
* Update the #include to find the DebugInfo.h in the correct placeBill Wendling2012-06-281-1/+1
| | | | llvm-svn: 159315
* Propagate lvalue alignment into bitfields. Per report on cfe-dev.Eli Friedman2012-06-276-32/+28
| | | | llvm-svn: 159295
* Implement John McCall's review of r159212 other than the this pointer notRafael Espindola2012-06-271-4/+2
| | | | | | being updated. Will fix that in a second. llvm-svn: 159280
* Fix a bug in my previous patch: If we are not doing a virtual call becauseRafael Espindola2012-06-261-0/+4
| | | | | | | the member expression is qualified, call the method specified in the code, not the most derived one we can find. llvm-svn: 159219
* During codegen of a virtual call we would extract any casts in the expressionRafael Espindola2012-06-261-33/+22
| | | | | | | | to see if we had an underlying final class or method, but we would then use the cast type to do the call, resulting in a direct call to the wrong method. llvm-svn: 159212
* block literal irgen: several improvements on naming blockFariborz Jahanian2012-06-265-9/+17
| | | | | | | | | | | | literal helper functions. All helper functions (global and locals) use block_invoke as their prefix. Local literal helper names are prefixed by their enclosing mangled function names. Blocks in non-local initializers (e.g. a global variable or a C++11 field) are prefixed by their mangled variable name. The descriminator number added to end of the name starts off with blank (for first block) and _<N> (for the N+2-th block). llvm-svn: 159206
* [asan] add missing asan instrumentation in generated global init functionsKostya Serebryany2012-06-261-0/+3
| | | | llvm-svn: 159191
* ARM: enable struct byval for APCS.Manman Ren2012-06-251-6/+10
| | | | | | Revert r136662 which disables ARM byval. llvm-svn: 159168
* IRGen: Factor v-table generation into the CGCXXABI object.Charles Davis2012-06-234-2/+21
| | | | llvm-svn: 159091
* Support the tls_model attribute (PR9788)Hans Wennborg2012-06-234-6/+32
| | | | | | | | | | | | | | This adds support for the tls_model attribute. This allows the user to choose a TLS model that is better than what LLVM would select by default. For example, a variable might be declared as: __thread int x __attribute__((tls_model("initial-exec"))); if it will not be used in a shared library that is dlopen'ed. This depends on LLVM r159077. llvm-svn: 159078
* Support L__FUNCTION__ in microsoft mode, PR11789Nico Weber2012-06-231-6/+95
| | | | | | | | | | Heavily based on a patch from Aaron Wishnick <aaron.s.wishnick@gmail.com>. I'll clean up the duplicated function in CodeGen as a follow-up, later today or tomorrow. llvm-svn: 159060
* revert CodeGen support for the alloc_size attribute until we finish the ↵Nuno Lopes2012-06-221-19/+0
| | | | | | design of a more generic metadata node llvm-svn: 159016
* Documentation cleanup: making \param docs match the code.James Dennett2012-06-221-3/+2
| | | | llvm-svn: 158982
* Documentation cleanup: Escape @objc* in Doxygen comments.James Dennett2012-06-221-24/+24
| | | | llvm-svn: 158974
* Remove a goofy CMake hack and use the standard CMake facilities toChandler Carruth2012-06-211-4/+12
| | | | | | | | | express library-level dependencies within Clang. This is no more verbose really, and plays nicer with the rest of the CMake facilities. It should also have no change in functionality. llvm-svn: 158888
* [ms-style asm] Change the fatal error to an extension warning. Apparently, thisChad Rosier2012-06-201-2/+1
| | | | | | | error was asserting on anything that included Windows.h. MS-style inline asm is still dropped, but at least now we're not completely silent about it. llvm-svn: 158833
* Don't circumvent the debug info type cache when emitting info for ↵Benjamin Kramer2012-06-201-2/+3
| | | | | | | | | | | | EnumConstantDecl. CreateEnumType doesn't participate in caching so the descriptor for the enum gets recomputed for every reference of an element of an enum, only to get discarded when it gets turned into an MDNode. No functionality change except performance. llvm-svn: 158832
* Whitespace.Chad Rosier2012-06-201-33/+32
| | | | llvm-svn: 158830
* Restructure how the driver communicates information about theJohn McCall2012-06-207-38/+87
| | | | | | | | | | | | | | | | | | | | | | | | target Objective-C runtime down to the frontend: break this down into a single target runtime kind and version, and compute all the relevant information from that. This makes it relatively painless to add support for new runtimes to the compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z, available at the driver level as a better and more general alternative to -fgnu-runtime and -fnext-runtime. This new concept of an Objective-C runtime also encompasses what we were previously separating out as the "Objective-C ABI", so fragile vs. non-fragile runtimes are now really modelled as different kinds of runtime, paving the way for better overall differentiation. As a sort of special case, continue to accept the -cc1 flag -fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak. I won't go so far as to say "no functionality change", even ignoring the new driver flag, but subtle changes in driver semantics are almost certainly not intended. llvm-svn: 158793
* Documentation cleanup: escape "::" to avoid a Doxygen warningJames Dennett2012-06-201-1/+1
| | | | llvm-svn: 158778
* objc-arc: captured block variable accessed in its block literalFariborz Jahanian2012-06-191-0/+8
| | | | | | | | initializer need be null initialized before initializer takes hold, just like any other initialized retainable object pointer. // rdar://11016025 llvm-svn: 158738
OpenPOWER on IntegriCloud