summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/TargetInfo.h
Commit message (Collapse)AuthorAgeFilesLines
* IRGen-level lowering for the Swift calling convention.John McCall2016-04-041-2/+3
| | | | llvm-svn: 265324
* Fix Clang-tidy modernize-use-nullptr warnings in headers and generated ↵Hans Wennborg2015-09-291-3/+3
| | | | | | | | | | files; other minor cleanups. By Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D13187 llvm-svn: 248828
* [OPENMP] Introduced type trait "__builtin_omp_required_simd_align" for ↵Alexey Bataev2015-07-021-7/+0
| | | | | | | | | default simd alignment. Adds type trait "__builtin_omp_required_simd_align" after discussions here http://reviews.llvm.org/D9894 Differential Revision: http://reviews.llvm.org/D10597 llvm-svn: 241237
* Revert r240270 ("Fixed/added namespace ending comments using clang-tidy").Alexander Kornienko2015-06-221-1/+1
| | | | llvm-svn: 240353
* Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko2015-06-221-1/+1
| | | | | | | | | | | | The patch is generated using this command: $ tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ work/llvm/tools/clang To reduce churn, not touching namespaces spanning less than 10 lines. llvm-svn: 240270
* Fix typo of function name.Eric Christopher2015-06-051-1/+1
| | | | llvm-svn: 239194
* Rename the single non-style conformant function in TargetCodeGenInfoEric Christopher2015-06-051-2/+2
| | | | | | and update all callers. llvm-svn: 239193
* Under duress, move check for target support of __builtin_setjmp/Joerg Sonnenberger2015-03-111-6/+0
| | | | | | __builtin_longjmp to Sema as requested by John McCall. llvm-svn: 231986
* Adjust the changes from r230255 to bail out if the backend can't lowerJoerg Sonnenberger2015-03-041-3/+2
| | | | | | | __builtin_setjmp/__builtin_longjmp and don't fall back to the libc functions. llvm-svn: 231245
* Only lower __builtin_setjmp / __builtin_longjmp toJoerg Sonnenberger2015-02-231-0/+7
| | | | | | | | | | llvm.eh.sjlj.setjmp / llvm.eh.sjlj.longjmp, if the backend is known to support them outside the Exception Handling context. The default handling in LLVM codegen doesn't work and will create incorrect code. The ARM backend on the other hand will assert if the intrinsics are used. llvm-svn: 230255
* [OPENMP] Codegen of the ‘aligned’ clause for the ‘omp simd’ directive.Alexander Musman2014-09-301-0/+7
| | | | | | Differential Revision: http://reviews.llvm.org/D5499 llvm-svn: 218660
* MS inline asm: Allow __asm blocks to set a return valueReid Kleckner2014-09-041-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | If control falls off the end of a function after an __asm block, MSVC assumes that the inline assembly filled the EAX and possibly EDX registers with an appropriate return value. This functionality is used in inline functions returning 64-bit integers in system headers, so we need some amount of compatibility. This is implemented in Clang by adding extra output constraints to every inline asm block, and storing the resulting output registers into the return value slot. If we see an asm block somewhere in the function body, we emit a normal epilogue instead of marking the end of the function with a return type unreachable. Normal returns in functions not using this functionality will overwrite the return value slot, and in most cases LLVM should be able to eliminate the dead stores. Fixes PR17201. Reviewed By: majnemer Differential Revision: http://reviews.llvm.org/D5177 llvm-svn: 217187
* Header guard canonicalization, clang part.Benjamin Kramer2014-08-131-3/+3
| | | | | | Modifications made by clang-tidy with minor tweaks. llvm-svn: 215557
* [C++11] Use 'nullptr'. CodeGen edition.Craig Topper2014-05-211-1/+1
| | | | llvm-svn: 209272
* Don't indent inside namespaces.Rafael Espindola2014-05-091-183/+184
| | | | llvm-svn: 208377
* XCore target: Add TypeString meta data to IR output.Robert Lytton2014-05-021-0/+5
| | | | | | | This includes the addition of the virtual function: TargetCodeGenInfo::EmitTargetMD() llvm-svn: 207832
* ObjC: allow targets to decide when to use stret for blocks.Tim Northover2014-03-291-0/+4
| | | | | | | This was originally part of the ARM64 patch, but seems semantically separate. llvm-svn: 205097
* Sort all the #include lines with LLVM's utils/sort_includes.py whichChandler Carruth2014-01-071-1/+1
| | | | | | | encodes the canonical rules for LLVM's style. I noticed this had drifted quite a bit when cleaning up LLVM, so wanted to clean up Clang as well. llvm-svn: 198686
* Fix a tranche of comment, test and doc typosAlp Toker2013-12-051-1/+1
| | | | llvm-svn: 196510
* Implement function type checker for the undefined behavior sanitizer.Peter Collingbourne2013-10-201-0/+8
| | | | | | | | | 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
* Partial revert of r185568.Eli Bendersky2013-07-241-4/+0
| | | | | | | | r186899 and r187061 added a preferred way for some architectures not to get intrinsic generation for math builtins. So the code changes in r185568 can now be undone (the test remains). llvm-svn: 187079
* Add target hook CodeGen queries when generating builtin pow*.Eli Bendersky2013-07-031-0/+4
| | | | | | | | | | | Without fmath-errno, Clang currently generates calls to @llvm.pow.* intrinsics when it sees pow*(). This may not be suitable for all targets (for example le32/PNaCl), so the attached patch adds a target hook that CodeGen queries. The target can state its preference for having or not having the intrinsic generated. Non-PNaCl behavior remains unchanged; PNaCl-specific test added. llvm-svn: 185568
* Ensure that debugger calls to signature-less functions default toJohn McCall2013-06-271-0/+7
| | | | | | | | | | | | | | | | | | | | | passing arguments in the fixed style. We have an abstraction for deciding this, but it's (1) deep in IR-generation, (2) necessarily tied to exact argument lists, and (3) triggered by unprototyped function types, which we can't legitimately make in C++ mode. So this solution, wherein Sema rewrites the function type to an exact prototype but leaves the variadic bit enabled so as to request x86-64-like platforms to pass the extra variadic info, is very much a hack, but it's one that works in practice on the platforms that LLDB will support in the medium term --- the only place we know of where it's a problem is instance methods in Windows, where variadic functions are implicitly cdecl. We may have a more abstracted base on which to build a solution by then. rdar://13731520 llvm-svn: 185112
* Diagnose malformed x86 inline asm using 'y' constraint.Tim Northover2013-06-071-1/+6
| | | | | | | | X86's 'y' inline assembly constraint represents an MMX register, this change prevents Clang from hitting an assertion when passed an incompatible type to deal with. llvm-svn: 183467
* Adding support for MSVC #pragma detect_mismatch functionality by emitting a ↵Aaron Ballman2013-06-041-0/+6
| | | | | | FAILIFMISMATCH linker command into the object file. llvm-svn: 183178
* Forward #pragma comment(lib/linker) through as flags metadataReid Kleckner2013-05-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | Summary: Most of this change is wiring the pragma all the way through from the lexer, parser, and sema to codegen. I considered adding a Decl AST node for this, but it seemed too heavyweight. Mach-O already uses a metadata flag called "Linker Options" to do this kind of auto-linking. This change follows that pattern. LLVM knows how to forward the "Linker Options" metadata into the COFF .drectve section where these flags belong. ELF support is not implemented, but possible. This is related to auto-linking, which is http://llvm.org/PR13016. CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D723 llvm-svn: 181426
* Fix the required args count for variadic blocks.John McCall2012-12-071-4/+7
| | | | | | | | | | | | | | | | | We were emitting calls to blocks as if all arguments were required --- i.e. with signature (A,B,C,D,...) rather than (A,B,...). This patch fixes that and accounts for the implicit block-context argument as a required argument. In addition, this patch changes the function type under which we call unprototyped functions on platforms like x86-64 that guarantee compatibility of variadic functions with unprototyped function types; previously we would always call such functions under the LLVM type T (...)*, but now we will call them under the type T (A,B,C,D,...)*. This last change should have no material effect except for making the type conventions more explicit; it was a side-effect of the most convenient implementation. llvm-svn: 169588
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-1/+1
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Whether an argument is required (in contrast with being anJohn McCall2012-02-171-1/+3
| | | | | | | | | | | | | | | | | | | | | optional argument passed through the variadic ellipsis) potentially affects how we need to lower it. Propagate this information down to the various getFunctionInfo(...) overloads on CodeGenTypes. Furthermore, rename those overloads to clarify their distinct purposes, and make sure we're calling the right one in the right place. This has a nice side-effect of making it easier to construct a function type, since the 'variadic' bit is no longer separable. This shouldn't really change anything for our existing platforms, with one minor exception --- we should now call variadic ObjC methods with the ... in the "right place" (see the test case), which I guess matters for anyone running GNUStep on MIPS. Mostly it's just a substantial clean-up. llvm-svn: 150788
* Don't use a varargs convention for calls unprototyped functions where one of ↵Eli Friedman2011-12-011-1/+2
| | | | | | the arguments is an AVX vector. llvm-svn: 145574
* ANSI C requires that a call to an unprototyped function type succeedJohn McCall2011-09-211-0/+35
| | | | | | | | | | | | | | | | | if the definition has a non-variadic prototype with compatible parameters. Therefore, the default rule for such calls must be to use a non-variadic convention. Achieve this by casting the callee to the function type with which it is required to be compatible, unless the target specifically opts out and insists that unprototyped calls should use the variadic rules. The only case of that I'm aware of is the x86-64 convention, which passes arguments the same way in both cases but also sets a small amount of extra information; here we seek to maintain compatibility with GCC, which does set this when calling an unprototyped function. Addresses PR10810 and PR10713. llvm-svn: 140241
* The size of struct UnwindException varies by platform with noJohn McCall2011-08-301-1/+1
| | | | | | | apparent general rule. Just special-case it as appropriate. PR10789. llvm-svn: 138792
* now that we have a centralized place to do so, add some using declarations forChris Lattner2011-07-201-2/+3
| | | | | | | some common llvm types: stringref and smallvector. This cleans up the codebase quite a bit. llvm-svn: 135576
* De-constify Types in StructType::get() and TargetData::getIntPtrType().Jay Foad2011-07-111-3/+3
| | | | llvm-svn: 134893
* Automatic Reference Counting.John McCall2011-06-151-0/+14
| | | | | | | | | | Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. llvm-svn: 133103
* Re-instate r125819 and r125820 with no functionality changePeter Collingbourne2011-02-191-0/+9
| | | | llvm-svn: 126060
* Revert 125820 and 125819 to fix PR9266.Rafael Espindola2011-02-191-9/+0
| | | | llvm-svn: 126050
* Move TargetInfo::adjustInlineAsmType to TargetCodeGenInfoPeter Collingbourne2011-02-181-0/+9
| | | | llvm-svn: 125819
* Fix the IR generation for catching pointers by references.John McCall2010-07-201-0/+10
| | | | | | Fixes <rdar://problem/8212123>. llvm-svn: 108944
* Implement __builtin_dwarf_sp_column for i386 (Darwin and not), x86-64 (all),John McCall2010-03-061-0/+17
| | | | | | | and ARM. Implement __builtin_init_dwarf_reg_size_table for i386 (both) and x86-64 (all). llvm-svn: 97859
* Add proper target hooks for __builtin_extract_return_address andJohn McCall2010-03-031-0/+22
| | | | | | | __builtin_frob_return_address. The implementations for both are still trivial in the default case. llvm-svn: 97638
* Inspired by seeing "MIPS" go by in the commits, I've gone ahead andJohn McCall2010-03-021-0/+9
| | | | | | | | | | | implemented a (codegen) target hook for __builtin_extend_pointer. I'm also making it return a uint64_t instead of an unsigned word; this comports with typical usage (i.e. the one use I know of). I don't know if any of the existing targets requires this hook to be set (other than x86 and x86_64, which I know do not). llvm-svn: 97547
* Eliminate some Clang warningsDouglas Gregor2010-01-221-2/+2
| | | | llvm-svn: 94177
* Generalize target weirdness handling having proper layering in mind:Anton Korobeynikov2010-01-101-0/+50
1. Add helper class for sema checks for target attributes 2. Add helper class for codegen of target attributes As a proof-of-concept - implement msp430's 'interrupt' attribute. llvm-svn: 93118
OpenPOWER on IntegriCloud