summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [CostModel][X86] Strip unused 256-bit vector shift costs. NFCI.Simon Pilgrim2017-01-051-8/+0
| | | | | | Remove SSE2 256-bit entries - AVX targets will have used the SSE42 costs instead. llvm-svn: 291152
* [x86] add test to show bug in select lowering; NFCSanjay Patel2017-01-051-0/+18
| | | | llvm-svn: 291151
* Use shared_ptr instead of IntrusiveRefCntPtr for ModuleFileExtensionDavid Blaikie2017-01-0512-53/+45
| | | | | | | The intrusiveness wasn't needed here, so this simplifies/clarifies the ownership model. llvm-svn: 291150
* [CostModel][X86] Include the cost of 256-bit upper subvector ↵Simon Pilgrim2017-01-052-4/+4
| | | | | | | | extract/insertion in AVX1 v4i64 MUL Matches other MUL/ADD/SUB 256-bit case on AVX1 llvm-svn: 291149
* TypoJoerg Sonnenberger2017-01-051-2/+2
| | | | llvm-svn: 291148
* TypoJoerg Sonnenberger2017-01-051-1/+1
| | | | llvm-svn: 291147
* [CostModel][X86] Merged SK_PermuteSingleSrc/SK_PermuteTwoSrc into common ↵Simon Pilgrim2017-01-051-272/+227
| | | | | | shuffle cost LUTs. NFCI. llvm-svn: 291146
* thread_support: split out {,non-}recursive mutexSaleem Abdulrasool2017-01-053-8/+43
| | | | | | | | Split out the recursive and non-recursive mutex. This split is needed for platforms which may use differing types for the two mutex (e.g. Win32 threads). llvm-svn: 291145
* Reapply r291025 ("AMDGPU: Remove unneccessary intermediate vector")Matt Arsenault2017-01-051-19/+33
| | | | | | Arrays are supposed to be static const llvm-svn: 291144
* Migrate PathDiagnosticPiece to std::shared_ptrDavid Blaikie2017-01-0520-493/+448
| | | | | | | Simplifies and makes explicit the memory ownership model rather than implicitly passing/acquiring ownership. llvm-svn: 291143
* test: add a requires registered targetSaleem Abdulrasool2017-01-051-0/+1
| | | | | | | | It seems that the ARM buildbots do not include x86 support. However, other x86 targets do not support the ARM target. Use a x86 triple and require the registered target. llvm-svn: 291142
* Revert "[sancov] introducing SANCOV_OPTIONS"Mike Aizatsky2017-01-056-170/+4
| | | | | | | | and related changes https://llvm.org/svn/llvm-project/compiler-rt/trunk@291068 llvm-svn: 291141
* [AArch64][CostModel] Add coverage for bswap intrinsics.Chad Rosier2017-01-051-0/+70
| | | | llvm-svn: 291140
* [Docs] Update docs to indicate that CUDA compilation is supported on Windows.Justin Lebar2017-01-051-2/+2
| | | | | | | | Subscribers: cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D28326 llvm-svn: 291139
* [CUDA] Rename keywords used in macro so they don't conflict with MSVC.Justin Lebar2017-01-051-21/+21
| | | | | | | | | | | | | | Summary: MSVC seems to use "__in" and "__out" for its own purposes, so we have to pick different names in this macro. Reviewers: tra Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28325 llvm-svn: 291138
* [CUDA] Don't define functions that the CUDA headers themselves define on ↵Justin Lebar2017-01-051-2/+8
| | | | | | | | | | | | Windows. Reviewers: tra Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28324 llvm-svn: 291137
* [CUDA] Let NVPTX inherit the host's calling conventions.Justin Lebar2017-01-052-0/+40
| | | | | | | | | | | | | | | | | | | | Summary: When compiling device code, we may still see host code with explicit calling conventions. NVPTX needs to claim that it supports these CCs, so that (a) we don't raise noisy warnings, and (b) we don't break existing code which relies on the existence of these CCs when specializing templates. (If a CC doesn't exist, clang ignores it, so two template specializations which are different only insofar as one specifies a CC are considered identical and therefore are an error if that CC is not supported.) Reviewers: tra Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28323 llvm-svn: 291136
* [CUDA] More correctly inherit primitive types from the host during device ↵Justin Lebar2017-01-052-33/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | compilation. Summary: CUDA lets users share structs between the host and device, so for that and other reasons, primitive types such as ptrdiff_t should be the same on both sides of the compilation. Our code to do this wasn't entirely successful. In particular, we did a bunch of work during the NVPTXTargetInfo constructor, only to override it in the NVPTX{32,64}TargetInfo constructors. It worked well enough on Linux and Mac, but Windows is LLP64, which is different enough to break it. This patch removes the NVPTX{32,64}TargetInfo classes entirely and fixes the bug described above. Reviewers: tra Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28322 llvm-svn: 291135
* [CUDA] Add __declspec spellings for CUDA attributes.Justin Lebar2017-01-052-10/+50
| | | | | | | | | | | | Summary: CUDA attributes are spelled __declspec(__foo__) on Windows. Reviewers: tra Subscribers: cfe-commits, rnk Differential Revision: https://reviews.llvm.org/D28321 llvm-svn: 291134
* [ToolChains] Use "static" instead of an anonymous namespace for a function. NFCJustin Lebar2017-01-051-4/+2
| | | | llvm-svn: 291133
* Remove a unnecessary hasLoopInvariantOperands check in loop sink.Xin Tong2017-01-051-2/+1
| | | | | | | | | | | | | | | | Summary: Preheader instruction's operands will always be invariant w.r.t. the loop which its the preheader for. Memory aliases are handled in canSinkOrHoistInst. Reviewers: danielcdh, davidxl Subscribers: mzolotukhin, llvm-commits Differential Revision: https://reviews.llvm.org/D28270 llvm-svn: 291132
* [Driver] Driver changes to support CUDA compilation on Windows.Justin Lebar2017-01-0512-15/+98
| | | | | | | | | | | | | | | | | | | | | Summary: For the most part this is straightforward: Just add a CudaInstallation object to the MSVC and MinGW toolchains. CudaToolChain has to override computeMSVCVersion so that Clang::constructJob passes the right version flag to cc1. We have to modify IsWindowsMSVC and friends in Clang::constructJob to be true when compiling CUDA device code on Windows for the same reason. Depends on: D28319 Reviewers: tra Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28320 llvm-svn: 291131
* [CUDA] Make CUDAInstallationDetector take the host triple in its constructor.Justin Lebar2017-01-052-4/+4
| | | | | | | | | | | | | | | Summary: Previously it was taking the true target triple, which is not really what it needs: The location of the CUDA installation depends on the host OS. Reviewers: tra Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28319 llvm-svn: 291130
* [TableGen] Only normalize the spelling of GNU-style attributes.Justin Lebar2017-01-051-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When Sema looks up an attribute name, it strips off leading and trailing "__" if the attribute is GNU-style. That is, __attribute__((foo)) and __attribute__((__foo__)) are equivalent. This is only true for GNU-style attributes. In particular, __declspec(__foo__) is not equivalent to __declspec(foo), and Sema respects this difference. This patch fixes TableGen to match Sema's behavior. The spelling 'GNU<"__foo__">' should be normalized to 'GNU<"foo">', but 'Declspec<"__foo__">' should not be changed. This is necessary to make CUDA compilation work on Windows, because e.g. the __device__ attribute is spelled __declspec(__device__). Attr.td does not contain any Declspec spellings that start or end with "__", so this change should not affect any other attributes. Reviewers: rnk Subscribers: cfe-commits, tra Differential Revision: https://reviews.llvm.org/D28318 llvm-svn: 291129
* [Windows] Remove functions in intrin.h that are defined in Builtin.def.Justin Lebar2017-01-051-90/+0
| | | | | | | | | | | | | | | | | | | | Summary: These duplicate declarations cause a problem for CUDA compiles on Windows. All implicitly-defined functions are host+device, and this applies to the declarations in Builtin.def. But then when we see the declarations in intrin.h, they have no attributes, so are host-only functions. This is an error. (A better fix might be to make these builtins host-only, but that is a much bigger change.) Reviewers: rnk Subscribers: cfe-commits, echristo Differential Revision: https://reviews.llvm.org/D28317 llvm-svn: 291128
* [X86] Add test cases that cover pr31551. NFC.Zvi Rackover2017-01-053-0/+1647
| | | | llvm-svn: 291127
* less braces; NFCSanjay Patel2017-01-051-2/+1
| | | | llvm-svn: 291126
* test: add an explicit tripleSaleem Abdulrasool2017-01-051-1/+1
| | | | | | | Not all targets use the integrated assembler. Specify a triple to ensure we use the integrated as for this. llvm-svn: 291125
* [OpenMP] Add fields for flags in the offload entry descriptor.Samuel Antao2017-01-056-50/+71
| | | | | | | | | | | | | | | | | Summary: This patch adds two fields to the offload entry descriptor. One field is meant to signal Ctors/Dtors and `link` global variables, and the other is reserved for runtime library use. Currently, these fields are only filled with zeros in the current code generation, but that will change when `declare target` is added. The reason, we are adding these fields now is to make the code generation consistent with the runtime library proposal under review in https://reviews.llvm.org/D14031. Reviewers: ABataev, hfinkel, carlo.bertolli, kkwli0, arpith-jacob, Hahnfeld Subscribers: cfe-commits, caomhin, jholewinski Differential Revision: https://reviews.llvm.org/D28298 llvm-svn: 291124
* CodeGen: plumb header search down to the IASSaleem Abdulrasool2017-01-057-20/+51
| | | | | | | | | | | inline assembly may use the `.include` directive to include other content into the file. Without the integrated assembler, the `-I` group gets passed to the assembler. Emulate this by collecting the header search paths and passing them to the IAS. Resolves PR24811! llvm-svn: 291123
* [CostModel][X86] Add support for broadcast shuffle costsSimon Pilgrim2017-01-052-11/+186
| | | | | | | | Currently only for broadcasts with input and output of the same width. Differential Revision: https://reviews.llvm.org/D27811 llvm-svn: 291122
* [OpenMP] Update target codegen for NVPTX device.Arpith Chacko Jacob2017-01-053-323/+346
| | | | | | | | | | | | | | | | | This patch includes updates for codegen of the target region for the NVPTX device. It moves initializers from the compiler to the runtime and updates the worker loop to assume parallel work is retrieved from the runtime. A subsequent patch will update the codegen to retrieve the parallel work using calls to the runtime. It includes the removal of the inline attribute for the worker loop and disabling debug info in it. This allows codegen for a target directive and serial execution on the NVPTX device. Reviewers: ABataev Differential Revision: https://reviews.llvm.org/D28125 llvm-svn: 291121
* [X86] Optimize vector shifts with variable but uniform shift amountsZvi Rackover2017-01-0513-183/+110
| | | | | | | | | | | | | | | Summary: For instructions such as PSLLW/PSLLD/PSLLQ a variable shift amount may be passed in an XMM register. The lower 64-bits of the register are evaluated to determine the shift amount. This patch improves the construction of the vector containing the shift amount. Reviewers: craig.topper, delena, RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28353 llvm-svn: 291120
* [ThinLTO] Add parenthesis as per build warningTeresa Johnson2017-01-051-3/+2
| | | | | | Fixes a warning about "||" and "&&" due to r291108. llvm-svn: 291119
* Skip a test on darwin.Hafiz Abid Qadeer2017-01-051-0/+1
| | | | | | | My earlier commit today seem to cause a failure on a darwin buildbot. I am skipping the test while I investigate the failure. llvm-svn: 291118
* [AArch64] Remove mcpu option as this test is not target specific. NFC.Chad Rosier2017-01-051-1/+1
| | | | llvm-svn: 291117
* [PowerPC] Implement missing ISA 2.06 instructions.Tony Jiang2017-01-056-7/+62
| | | | | | | Instructions: fctidu[.], fctiwu[.], ftdiv, ftsqrt are not implemented. Implement them and add corresponding test cases in this patch. llvm-svn: 291116
* [ThinLTO] Use DenseSet instead of SmallPtrSet for holding GUIDsTeresa Johnson2017-01-051-4/+4
| | | | | | | | | Should fix some more bot failures from r291108. This should have been a DenseSet, since GUID is not a pointer type. It caused some bots to fail, but for some reason I wasnt't getting a build failure. llvm-svn: 291115
* Wdocumentation fixSimon Pilgrim2017-01-051-2/+2
| | | | llvm-svn: 291114
* Move code to the .cpp file. NFC.Rafael Espindola2017-01-052-9/+16
| | | | llvm-svn: 291113
* [AArch64] Remove unused arguments from tests. NFC.Chad Rosier2017-01-051-32/+32
| | | | llvm-svn: 291112
* [ThinLTO] Update new ModuleSummaryIndexYAML.h for r291108Teresa Johnson2017-01-051-2/+1
| | | | | | | | Should fix bot failures due to r291108 which happened due to a change required in ModuleSummaryIndexYAML.h which was just added in r291069. llvm-svn: 291111
* Detemplate SectionKey. NFC.Rafael Espindola2017-01-052-39/+23
| | | | llvm-svn: 291110
* [CostModel][X86] Pulled out common type legalization codeSimon Pilgrim2017-01-051-7/+4
| | | | llvm-svn: 291109
* [ThinLTO] Subsume all importing checks into a single flagTeresa Johnson2017-01-0510-178/+133
| | | | | | | | | | | | | | | | | | | Summary: This adds a new summary flag NotEligibleToImport that subsumes several existing flags (NoRename, HasInlineAsmMaybeReferencingInternal and IsNotViableToInline). It also subsumes the checking of references on the summary that was being done during the thin link by eligibleForImport() for each candidate. It is much more efficient to do that checking once during the per-module summary build and record it in the summary. Reviewers: mehdi_amini Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28169 llvm-svn: 291108
* Change which input sections we concatenateRafael Espindola2017-01-059-95/+124
| | | | | | | | | | | | | | | | | | | | | After Mark's patch I was wondering what was the rationale for the ELF spec requiring us to merge only sections with matching flags and types. I tried emailing https://groups.google.com/forum/#!forum/generic-abi, but looks like my emails are not being posted (the list is probably moderated). I emailed Cary Coutant instead. Cary pointed out that the section was a late addition and didn't got the scrutiny it deserved. Given that and the problems found by implementing the letter of the standard, I propose changing lld to merge all sections with the same name and issue errors if the types or some critical flags are different. This should allow an unmodified firefox linked with lld to run. This also merges some code with the linkerscript path. llvm-svn: 291107
* Currently isLikelyComplexAddressComputation tries to figure out if the given ↵Mohammed Agabaria2017-01-0512-64/+150
| | | | | | | | | | | | | stride seems to be 'complex' and need some extra cost for address computation handling. This code seems to be target dependent which may not be the same for all targets. Passed the decision whether the given stride is complex or not to the target by sending stride information via SCEV to getAddressComputationCost instead of 'IsComplex'. Specifically at X86 targets we dont see any significant address computation cost in case of the strided access in general. Differential Revision: https://reviews.llvm.org/D27518 llvm-svn: 291106
* [GlobalISel] Add support for address-taken basic blocksKristof Beyls2017-01-054-21/+23
| | | | | | | | | | | | | | | | | To make this work, pointers from the MachineBasicBlock to the LLVM-IR-level basic blocks need to be initialized, as the AsmPrinter uses this link to be able to print out labels for the basic blocks that are address-taken. Most of the changes in this commit are about adapting existing tests to include the basic block name that is now printed out in the MIR format, now that the name becomes available as the link to the LLVM-IR basic block is initialized. The relevant test change for the functionality added in this patch are the added "(address-taken)" strings in test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll. Differential Revision: https://reviews.llvm.org/D28123 llvm-svn: 291105
* [lldb-mi] Fix implementation for a few mi commandsHafiz Abid Qadeer2017-01-0514-12/+189
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Some of the mi commands implemented in lldb-mi are incomplete/not confirming to the spec. - `gdb-show` and `gdb-set` doesn't support getting/setting `disassembly-flavor` - `environment-cd` should also change the working directory for inferior - debugger CLI output should be printed as console-stream-output record, rather than being dumped directly to stdout - `target-select` should provide inner error message in mi response Related bug report: - https://llvm.org/bugs/show_bug.cgi?id=28026 - https://llvm.org/bugs/show_bug.cgi?id=28718 - https://llvm.org/bugs/show_bug.cgi?id=30265 Reviewers: ki.stfu, abidh Subscribers: abidh, ki.stfu, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D24711 llvm-svn: 291104
* Fix jModulesInfo handling for cross-path syntax debuggingPavel Labath2017-01-052-3/+11
| | | | | | | We were sending paths with the host path separator, which meant the remote target did not understand our packets correctly. llvm-svn: 291103
OpenPOWER on IntegriCloud