summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Add CodeGenABITypes.h for use in LLDB.Mark Lacey2013-10-3017-325/+83
| | | | | | | | | | | | | | | | | | CodeGenABITypes is a wrapper built on top of CodeGenModule that exposes some of the functionality of CodeGenTypes (held by CodeGenModule), specifically methods that determine the LLVM types appropriate for function argument and return values. I addition to CodeGenABITypes.h, CGFunctionInfo.h is introduced, and the definitions of ABIArgInfo, RequiredArgs, and CGFunctionInfo are moved into this new header from the private headers ABIInfo.h and CGCall.h. Exposing this functionality is one part of making it possible for LLDB to determine the actual ABI locations of function arguments and return values, making it possible for it to determine this for any supported target without hard-coding ABI knowledge in the LLDB code. llvm-svn: 193717
* [AArch64] Add support for NEON scalar floating-point compare instructions.Chad Rosier2013-10-301-15/+109
| | | | llvm-svn: 193692
* Make thunk this/return adjustment ABI-specific. Also, fix the return ↵Timur Iskhodzhanov2013-10-304-64/+149
| | | | | | | | adjustment when using -cxx-abi microsoft Reviewed at http://llvm-reviews.chandlerc.com/D2026 llvm-svn: 193679
* Minor efficiency refactor related to 193661. No functional change.Warren Hunt2013-10-301-4/+2
| | | | llvm-svn: 193665
* Fixing code gen to handle microsoft layouts for which size % alignment Warren Hunt2013-10-291-0/+3
| | | | | | != 0 llvm-svn: 193661
* [mips] Align the stack to 16-bytes for -mfp64.Akira Hatanaka2013-10-291-8/+8
| | | | llvm-svn: 193640
* [mips] Use the distance between the current argument's starting address andAkira Hatanaka2013-10-291-11/+10
| | | | | | | | | the previous argument's ending address to compute the type of the padding argument. No intended functionality change. llvm-svn: 193638
* Fix the inconsistent order of parameters in the GetVBaseOffsetFromVBPtr ↵Timur Iskhodzhanov2013-10-271-3/+3
| | | | | | definition and declaration llvm-svn: 193505
* Remove unused CodeGenOptions from CodeGenTypes.Mark Lacey2013-10-242-3/+0
| | | | llvm-svn: 193376
* ObjectiveC IRGen. Replace _objc_empty_vtable pointer in Objective-C Fariborz Jahanian2013-10-241-8/+18
| | | | | | class metadata for certain deployment targets. // rdar://14802916 llvm-svn: 193359
* Split -fsanitize=bounds to -fsanitize=array-bounds (for the frontend-insertedRichard Smith2013-10-223-6/+7
| | | | | | | | | | | | | | check using the ubsan runtime) and -fsanitize=local-bounds (for the middle-end check which inserts traps). Remove -fsanitize=local-bounds from -fsanitize=undefined. It does not produce useful diagnostics and has false positives (PR17635), and is not a good compromise position between UBSan's checks and ASan's checks. Map -fbounds-checking to -fsanitize=local-bounds to restore Clang's historical behavior for that flag. llvm-svn: 193205
* New fix for pr17535.Rafael Espindola2013-10-222-0/+43
| | | | | | | | | | | | | | | | | | | This is a fixed version of r193161. In order to handle void foo() __attribute__((alias("bar"))); void bar() {} void zed() __attribute__((alias("foo"))); it is not enough to delay aliases to the end of the TU, we have to do two passes over them to find if they are defined or not. This can be implemented by producing alias as we go and just doing the second pass at the end. This has the advantage that other parts of clang that were expecting alias to be processed in order don't have to be changed. This patch also handles cyclic aliases. llvm-svn: 193188
* Use GEPs correctly when adjusting this in MicrosoftCXXABITimur Iskhodzhanov2013-10-221-3/+12
| | | | | | Reviewed at http://llvm-reviews.chandlerc.com/D1977 llvm-svn: 193176
* Revert "This patch causes clang to reject alias attributes that point to ↵Rafael Espindola2013-10-223-40/+3
| | | | | | | | | | | | | | | | undefined names. For example, with this patch we now reject" This reverts commit r193161. It broke void foo() __attribute__((alias("bar"))); void bar() {} void zed() __attribute__((alias("foo"))); Looks like we have to fix pr17639 first :-( llvm-svn: 193162
* This patch causes clang to reject alias attributes that point to undefinedRafael Espindola2013-10-223-3/+40
| | | | | | | | | | | | names. For example, with this patch we now reject void f1(void) __attribute__((alias("g1"))); This patch is implemented in CodeGen. It is quiet a bit simpler and more compatible with gcc than implementing it in Sema. The downside is that the errors only fire during -emit-llvm. llvm-svn: 193161
* Fix string assignment, David Blaikie suggestion.Yaron Keren2013-10-211-2/+6
| | | | llvm-svn: 193116
* Implement function type checker for the undefined behavior sanitizer.Peter Collingbourne2013-10-208-6/+95
| | | | | | | | | This uses function prefix data to store function type information at the function pointer. Differential Revision: http://llvm-reviews.chandlerc.com/D1338 llvm-svn: 193058
* [AArch64] Add support for NEON scalar extract narrow instructions.Chad Rosier2013-10-181-2/+23
| | | | llvm-svn: 192971
* [ms-cxxabi] Error out on virtual function memptrsReid Kleckner2013-10-171-0/+1
| | | | | | These are uncommon and this is better than miscompiling. llvm-svn: 192923
* [AArch64] Add support for NEON scalar three register different instructionChad Rosier2013-10-171-2/+24
| | | | | | | | class. The instruction class includes the signed saturating doubling multiply-add long, signed saturating doubling multiply-subtract long, and the signed saturating doubling multiply long instructions. llvm-svn: 192909
* Rename some functions for consistency.Rafael Espindola2013-10-171-1/+1
| | | | | | Every other function in Redeclarable.h was using Decl instead of Declaration. llvm-svn: 192900
* Follow-up to r192822: fix Clang assertion when building with -fexceptionsTimur Iskhodzhanov2013-10-171-6/+13
| | | | llvm-svn: 192875
* Add the context that a function was created in as the context for theEric Christopher2013-10-171-8/+10
| | | | | | function, not the context of the context. llvm-svn: 192862
* [AArch64] Add support for NEON scalar negate instruction.Chad Rosier2013-10-161-0/+4
| | | | llvm-svn: 192845
* [AArch64] Add support for NEON scalar absolute value instruction.Chad Rosier2013-10-161-0/+4
| | | | llvm-svn: 192844
* Emit a .ident saying that clang produced this file.Rafael Espindola2013-10-162-0/+18
| | | | | | Patch by Katya Romanova. llvm-svn: 192832
* [-cxx-abi microsoft] Fix this argument/parameter offsets for virtual ↵Timur Iskhodzhanov2013-10-162-17/+75
| | | | | | | | destructors in the presence of virtual bases Reviewed at http://llvm-reviews.chandlerc.com/D1939 llvm-svn: 192822
* Update comment.Chad Rosier2013-10-161-1/+1
| | | | llvm-svn: 192807
* [AArch64] Add support for NEON scalar signed saturating accumulated of unsignedChad Rosier2013-10-161-0/+14
| | | | | | value and unsigned saturating accumulate of signed value instructions. llvm-svn: 192801
* Reflow slightly.Eric Christopher2013-10-151-2/+2
| | | | llvm-svn: 192736
* [AArch64] Add support for NEON scalar signed saturating absolute value andChad Rosier2013-10-151-0/+14
| | | | | | scalar signed saturating negate instructions. llvm-svn: 192734
* [ms-cxxabi] Fix assert in unspecified inheritance memptr emissionReid Kleckner2013-10-151-2/+4
| | | | | | | | | If a class is using the unspecified inheritance model for member pointers and later we find the class is defined to use single inheritance, zero out the vbptr offset field of the member pointer when it is formed. llvm-svn: 192664
* [AArch64] Add support for NEON scalar integer compare instructions.Chad Rosier2013-10-141-5/+74
| | | | llvm-svn: 192597
* Fixed "ArgSize may be used uninitialised" error when compiling with gcc.Andy Gibbs2013-10-141-1/+1
| | | | llvm-svn: 192570
* Use castAs instead of cast in thunk generationReid Kleckner2013-10-111-1/+1
| | | | | | | | Calling convention attributes can add sugar to methods that we have to look through. This fixes an assertion failure in the provided test case. llvm-svn: 192496
* Adds Microsoft compatiable C++ record layout code to clang.Warren Hunt2013-10-112-7/+3
| | | | llvm-svn: 192494
* Remove extra braces.Eric Christopher2013-10-111-2/+1
| | | | llvm-svn: 192473
* XCore : Fix bug in XCoreABIInfo::EmitVAArg()Robert Lytton2013-10-111-13/+27
| | | | | | Incorrect handling of 'double' and 'long long int' llvm-svn: 192436
* Implemented aarch64 SIMD copy related ACLE intrinsic :Kevin Qin2013-10-111-0/+28
| | | | | | vget_lane, vset_lane, vcopy_lane, vcreate, vdup_n, vdup_lane, vmov_n. llvm-svn: 192411
* Make CodeGenTypes data members private.Mark Lacey2013-10-102-7/+7
| | | | | | No functionality differences. llvm-svn: 192390
* Implement AArch64 vector load/store multiple N-element structure class ↵Hao Liu2013-10-101-0/+34
| | | | | | | | | | | | SIMD(lselem). Including following 14 instructions: 4 ld1 insts: load multiple 1-element structure to sequential 1/2/3/4 registers. ld2/ld3/ld4: load multiple N-element structure to sequential N registers (N=2,3,4). 4 st1 insts: store multiple 1-element structure from sequential 1/2/3/4 registers. st2/st3/st4: store multiple N-element structure from sequential N registers (N = 2,3,4). llvm-svn: 192362
* Revert "Implement AArch64 vector load/store multiple N-element structure ↵Tim Northover2013-10-101-34/+0
| | | | | | | | | class SIMD(lselem). " This reverts commit r192351. The LLVM side broke the build and the Clang tests will inevitably fail without it. llvm-svn: 192356
* Revert "Use aliases for more constructors and destructors."Rafael Espindola2013-10-101-6/+21
| | | | | | | | | This reverts commit r192300. The change itself looks correct, but it found issues on how we handle aliases in llvm. llvm-svn: 192353
* Implement AArch64 vector load/store multiple N-element structure class ↵Hao Liu2013-10-101-0/+34
| | | | | | | | | | | | | | | SIMD(lselem). Including following 14 instructions: 4 ld1 insts: load multiple 1-element structure to sequential 1/2/3/4 registers. ld2/ld3/ld4: load multiple N-element structure to sequential N registers (N=2,3,4). 4 st1 insts: store multiple 1-element structure from sequential 1/2/3/4 registers. st2/st3/st4: store multiple N-element structure from sequential N registers (N = 2,3,4). E.g. ld1(3 registers version) will load 32-bit elements {A, B, C, D, E, F} sequentially into the three 64-bit vectors list {BA, DC, FE}. E.g. ld3 will load 32-bit elements {A, B, C, D, E, F} into the three 64-bit vectors list {DA, EB, FC}. llvm-svn: 192351
* Initialize vtorDisp in class constructors and destructorsTimur Iskhodzhanov2013-10-093-0/+67
| | | | | | Reviewed at http://llvm-reviews.chandlerc.com/D1867 llvm-svn: 192312
* Use aliases for more constructors and destructors.Rafael Espindola2013-10-091-21/+6
| | | | | | | | | | | | | | | | With this patch we produce alias for cases like template<typename T> struct foobar { foobar() { } }; template struct foobar<void>; It is safe to use aliases to weak symbols, as long and the alias itself is also weak. llvm-svn: 192300
* Code cleanup: rename VTableContext to ItaniumVTableContext, VTableBuilder to ↵Timur Iskhodzhanov2013-10-094-6/+8
| | | | | | ItaniumVTableBuilder and clang-format code around llvm-svn: 192288
* Reland 192220 "Abstract out parts of thunk emission code, add support for ↵Timur Iskhodzhanov2013-10-095-34/+55
| | | | | | simple thunks when using -cxx-abi microsoft" with relaxed assertions llvm-svn: 192285
* [AArch64] Add support for NEON scalar floating-point reciprocal estimate,Chad Rosier2013-10-081-0/+15
| | | | | | reciprocal exponent, and reciprocal square root estimate instructions. llvm-svn: 192243
* [AArch64] Add support for NEON scalar signed/unsigned integer to floating-pointChad Rosier2013-10-081-0/+14
| | | | | | convert instructions. llvm-svn: 192232
OpenPOWER on IntegriCloud