summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* DebugInfo: While loop backedge should be attribute to the start of the while ↵David Blaikie2014-08-151-0/+1
| | | | | | | | | | | | | statement. A little test case simplification - this could be simplified further, though there are certainly interesting connections to the if/else construct so I'm hesitant to remove that entirely though it does appear somewhat unrelated. (similar fix to r215766, related to PR19864) llvm-svn: 215768
* DebugInfo: Fix PR19864 better - attribute the jump at the end of a range-for ↵David Blaikie2014-08-151-0/+1
| | | | | | | | | | | | | | | loop, to the start of the loop. This avoids debuggers stepping to strange places (like the last statement in the loop body, or the first statement in the if). This is not the whole answer, though - similar bugs no doubt exist in other loops (patches to follow) and attributing exception handling code to the correct line is also tricky (based on the previous fix to PR19864, exception handling is still erroneously attributed to the 'if' line). llvm-svn: 215766
* Typo fix in comments: definintion -> definitionJames Dennett2014-08-151-1/+1
| | | | llvm-svn: 215764
* MS ABI: Virtual member pointer thunks are not unnamed_addrReid Kleckner2014-08-151-0/+3
| | | | | | They can be compared for identity. llvm-svn: 215745
* R600: Add ldexp intrinsicMatt Arsenault2014-08-151-6/+16
| | | | llvm-svn: 215738
* Revert "CodeGen: When bitfields fall on natural boundaries, split them up"Justin Bogner2014-08-141-9/+2
| | | | | | | | | | | | | | | It fits better with LLVM's memory model to try to do this in the backend. Specifically, narrowing wide loads in the backends should be relatively straightforward and is generally valuable, whereas widening loads tends to be very constrained. Discussion here: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140811/112581.html This reverts commit r215614. llvm-svn: 215648
* Delete support for AuroraUX.Rafael Espindola2014-08-141-1/+0
| | | | | | auroraux.org is not resolving. llvm-svn: 215644
* Fix a crash when compiling blocks in OpenCL with multiplePekka Jaaskelainen2014-08-141-1/+7
| | | | | | address spaces. llvm-svn: 215629
* CodeGen: When bitfields fall on natural boundaries, split them upJustin Bogner2014-08-141-2/+9
| | | | | | | | | | | | | | | | | | | Currently when laying out bitfields that don't need any padding, we represent them as a wide enough int to contain all of the bits. This can be hard on the backend since we'll do things like represent stores to a few bits as loading an i144, masking it with a large constant, and storing it back. This turns up in less pathological cases where we load and mask 64 bit word on a 32 bit platform when we actually only need to access 32 bits. This leads to bad code being generated in most of our 32 bit backends. In practice, there are often natural breaks in bitfields, and it's a fairly simple and effective heuristic to split these fields into legal integer sized chunks when it will be equivalent (ie, it won't force us to add any extra padding). llvm-svn: 215614
* Simplify some CodeGenTypes::arrangeXXX functions. No functionality changeAlexey Samsonov2014-08-131-28/+10
| | | | llvm-svn: 215606
* [modules] Fix a rejects-valid resulting from emitting an inline functionRichard Smith2014-08-131-1/+5
| | | | | | | | recursively within the emission of another inline function. This ultimately led to us emitting the same inline function definition twice, which we then rejected because we believed we had a mangled name conflict. llvm-svn: 215579
* Simplify a few loops over CallArgList/FunctionArgList. NFCAlexey Samsonov2014-08-133-21/+13
| | | | llvm-svn: 215571
* AArch64: Prefetch intrinsicYi Kong2014-08-131-0/+23
| | | | llvm-svn: 215569
* ARM: Prefetch intrinsicsYi Kong2014-08-131-0/+12
| | | | llvm-svn: 215568
* Header guard canonicalization, clang part.Benjamin Kramer2014-08-1325-52/+52
| | | | | | Modifications made by clang-tidy with minor tweaks. llvm-svn: 215557
* [UBSan] Add returns-nonnull sanitizer.Alexey Samsonov2014-08-131-1/+18
| | | | | | | | | | | | | | | | | | | | Summary: This patch adds a runtime check verifying that functions annotated with "returns_nonnull" attribute do in fact return nonnull pointers. It is based on suggestion by Jakub Jelinek: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140623/223693.html. Test Plan: regression test suite Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4849 llvm-svn: 215485
* Objective-C. Fixes an assert where because of capturedFariborz Jahanian2014-08-121-0/+10
| | | | | | | | variable in block is over-aligned with an align attribute causing block metadata size not be multiple of alignment. rdar://17878679 llvm-svn: 215449
* Debuginfo: Correctly tag variadic ObjC methods with ↵Frederic Riss2014-08-121-0/+3
| | | | | | | | DW_TAG_unspecified_parameter. Fixes rdar://13690847 llvm-svn: 215423
* Revert r215365 - Coverage mapping: emit mapping for cxx constructors that ↵Alex Lorenz2014-08-111-6/+1
| | | | | | use microsoft's ABI llvm-svn: 215371
* Coverage mapping: emit mapping for cxx constructors that use microsoft's ABIAlex Lorenz2014-08-111-1/+6
| | | | llvm-svn: 215365
* Revert r215331, "unique_ptrify CompilerInstance::OutputFile(s) and remove a ↵NAKAMURA Takumi2014-08-111-2/+2
| | | | | | | | | | | | | | | | | | | | | unique_ptr around a non-owning raw_ostream in CodeGenAction::CreateASTConsumer" It cannot be compiled on Visual Studio 2012. clang\include\clang/Frontend/CompilerInstance.h(153): error C2248: 'std::unique_ptr<_Ty>::unique_ptr' : cannot access private member declared in class 'std::unique_ptr<_Ty>' with [ _Ty=llvm::raw_ostream ] D:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\memory(1447) : see declaration of 'std::unique_ptr<_Ty>::unique_ptr' with [ _Ty=llvm::raw_ostream ] This diagnostic occurred in the compiler generated function 'clang::CompilerInstance::OutputFile::OutputFile(const clang::CompilerInstance::OutputFile &)' llvm-svn: 215346
* unique_ptrify CompilerInstance::OutputFile(s) and remove a unique_ptr around ↵David Blaikie2014-08-101-2/+2
| | | | | | a non-owning raw_ostream in CodeGenAction::CreateASTConsumer llvm-svn: 215331
* Follow up to r215323 - avoid llvm::make_unique in this particular case ↵David Blaikie2014-08-101-3/+3
| | | | | | that's causing GCC on some buildbots some confusion. llvm-svn: 215327
* Recommit 213307: unique_ptr-ify ownership of ASTConsumers (reverted in r213325)David Blaikie2014-08-101-8/+8
| | | | | | | | After post-commit review and community discussion, this seems like a reasonable direction to continue, making ownership semantics explicit in the source using the type system. llvm-svn: 215323
* Add a cc1 "dump-coverage-mapping" for testing coverage mapping.Alex Lorenz2014-08-084-5/+66
| | | | | | Differential Revision: http://reviews.llvm.org/D4799 llvm-svn: 215258
* DebugInfo: Blocks: Do not depend on LLVM argument numbering when choosing ↵David Blaikie2014-08-083-3/+5
| | | | | | | | | | | | the debug info argument numbering. Due to the possible presence of return-by-out parameters, using the LLVM argument number count when numbering debug info arguments can end up off-by-one. This could produce two arguments with the same number, which would in turn cause LLVM to emit only one of those arguments (whichever it found last) or assert (r215157). llvm-svn: 215227
* MS ABI: Handle member function pointers returning a member data pointerDavid Majnemer2014-08-073-1/+16
| | | | | | | | | MSVC doesn't decide what the inheritance model for a returned member pointer *until* a call expression returns it. This fixes PR20017. llvm-svn: 215164
* Debug info: Use the vbtable offset for virtual bases in the MS ABIReid Kleckner2014-08-071-5/+12
| | | | | | | | There are no vtable offset offsets in the MS ABI, but vbtable offsets are analogous. There are no consumers of this information yet, but at least we don't crash now. llvm-svn: 215149
* Objective-C arc. Switch the Objective-C dictionary literal in ARC modeFariborz Jahanian2014-08-071-0/+9
| | | | | | | to use non-retain/autorelease API variants of ObjC objects. wip. rdar://17554063 llvm-svn: 215146
* Revert "Debug info: Use record layout to find vbase offsets instead of vtables"Reid Kleckner2014-08-071-1/+3
| | | | | | | | | This reverts commit r215137. This doesn't work at all, an offset-offset is probably different than an offset. I'm scared that this passed our normal test suite. llvm-svn: 215141
* Debug info: Use record layout to find vbase offsets instead of vtablesReid Kleckner2014-08-071-3/+1
| | | | | | | | | This fixes an assertion when generating full debug info in the MS ABI for classes with virtual bases. Fixes PR20579. llvm-svn: 215137
* Objective-C ARC. First patch toward generating new APIsFariborz Jahanian2014-08-062-4/+8
| | | | | | | for Objective-C's array and dictionary literals. rdar://17554063. This is wip. llvm-svn: 214983
* Introduce f[no-]max-unknown-pointer-align=[number] optionFariborz Jahanian2014-08-051-1/+6
| | | | | | | | | to instruct the code generator to not enforce a higher alignment than the given number (of bytes) when accessing memory via an opaque pointer or reference. Patch reviewed by John McCall (with post-commit review pending). rdar://16254558 llvm-svn: 214911
* [CMake] clangCodeGen: Update libdeps to add clangLex for PPChainedCallbacks.NAKAMURA Takumi2014-08-051-0/+1
| | | | llvm-svn: 214869
* MS ABI: Aligned tentative definitions don't have CommonLinkageDavid Majnemer2014-08-051-2/+10
| | | | | | | int __declspec(align(16)) foo; is a tentative definition but the storage for that variable should not have CommonLinkage. llvm-svn: 214828
* Remove separator parameter from static local naming codeReid Kleckner2014-08-042-8/+5
| | | | | | It was always set to ".", which was duplicated in a few places. llvm-svn: 214792
* Update for LLVM API change.Eric Christopher2014-08-041-2/+4
| | | | llvm-svn: 214786
* Revert r214757 (Same fix as r214758)Alex Lorenz2014-08-041-1/+0
| | | | llvm-svn: 214759
* Add CoverageMappingGen.cpp (introduced in r214752) to CMakeLists.txtDavid Blaikie2014-08-041-0/+1
| | | | llvm-svn: 214758
* add lib/CodeGen/CoverageMappingGen.cpp to CMakeAlex Lorenz2014-08-041-0/+1
| | | | llvm-svn: 214757
* Add coverage mapping generation.Alex Lorenz2014-08-0410-52/+1557
| | | | | | | | | | This patch adds the '-fcoverage-mapping' option which allows clang to generate the coverage mapping information that can be used to provide code coverage analysis using the execution counts obtained from the instrumentation based profiling (-fprofile-instr-generate). llvm-svn: 214752
* In the case of mangling collisions, make an attempt to note both definitionsRichard Smith2014-08-021-6/+8
| | | | | | involved. llvm-svn: 214606
* [ASan] Use metadata to pass source-level information from Clang to ASan.Alexey Samsonov2014-08-022-25/+22
| | | | | | | | | | | | | | | | | Instead of creating global variables for source locations and global names, just create metadata nodes and strings. They will be transformed into actual globals in the instrumentation pass (if necessary). This approach is more flexible: 1) we don't have to ensure that our custom globals survive all the optimizations 2) if globals are discarded for some reason, we will simply ignore metadata for them and won't have to erase corresponding globals 3) metadata for source locations can be reused for other purposes: e.g. we may attach source location metadata to alloca instructions and provide better descriptions for stack variables in ASan error reports. No functionality change. llvm-svn: 214604
* InstrProf: Update for LLVM API changeJustin Bogner2014-08-011-7/+9
| | | | | | | | | | | | We've added support for a multiple functions with the same name in LLVM's profile data, so the lookup returning the function hash it found doesn't make sense anymore. Update to pass in the hash we expect. This also adds a test that the version 1 format is still readable, since the new API is expected to handle that. llvm-svn: 214586
* Notional simplification: defer emitting deferred inline methods until we finishRichard Smith2014-08-011-4/+21
| | | | | | emitting everything, rather than potentially doing this reentrantly. llvm-svn: 214582
* Actually fix problem with modules buildbot this time.Richard Smith2014-08-011-1/+1
| | | | llvm-svn: 214579
* [Sanitizer] Introduce SanitizerMetadata class.Alexey Samsonov2014-08-017-81/+150
| | | | | | | | | | | | | | It is responsible for generating metadata consumed by sanitizer instrumentation passes in the backend. Move several methods from CodeGenModule to SanitizerMetadata. For now the class is stateless, but soon it won't be the case. Instead of creating globals providing source-level information to ASan, we will create metadata nodes/strings which will be turned into actual global variables in the backend (if needed). No functionality change. llvm-svn: 214564
* Re-commit r214547 with tests fixed. Hopefully all the bots will be happy now.Richard Smith2014-08-012-6/+15
| | | | | | | | | Original message: Fix iterator invalidation issues that are breaking my modules buildbot's bootstrap. llvm-svn: 214555
* Revert r214547 due to test breakage.Richard Smith2014-08-012-16/+6
| | | | llvm-svn: 214549
* Fix iterator invalidation issues that are breaking my modules buildbot's ↵Richard Smith2014-08-012-6/+16
| | | | | | bootstrap. llvm-svn: 214547
OpenPOWER on IntegriCloud