summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Restrict somewhat the memory-allocation pointer cmp opt from r223093Hal Finkel2014-12-042-4/+165
| | | | | | | | | | Based on review comments from Richard Smith, restrict this optimization from applying to globals that might resolve lazily to other dynamically-loaded modules, and also from dynamic allocas (which might be transformed into malloc calls). In short, take extra care that the compared-to pointer is really simultaneously live with the memory allocation. llvm-svn: 223347
* Add missing test fileJean-Daniel Dupas2014-12-041-0/+0
| | | | llvm-svn: 223346
* clang-format: More restrictively classify import declarations.Daniel Jasper2014-12-042-1/+6
| | | | | | | | | | | Before: import::SomeFunction(aaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaa); After: import::SomeFunction(aaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaa); llvm-svn: 223345
* clang-formatted ranged loops and assignment, NFC.Yaron Keren2014-12-041-12/+12
| | | | llvm-svn: 223344
* Add mach-o LC_RPATH support to llvm-objdumpJean-Daniel Dupas2014-12-045-0/+39
| | | | | | | | | | Summary: Add rpath load command support in Mach-O object and update llvm-objdump to use it. Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6512 llvm-svn: 223343
* [OPENMP] Codegen for 'omp master' directiveAlexey Bataev2014-12-044-3/+132
| | | | | | | | | | | | | | Patch adds 2 library functions to OpenMPRuntime class - int32 kmpc_master(ident_t *, int32 gtid) and void kmpc_end_master(ident_t *, int32 gtid); For 'omp master' directive the next code is generated: if (__kmpc_master(loc, gtid)) { <Associated structured block>; __kmpc_end_master(log, gtid); } Differential Revision: http://reviews.llvm.org/D6473 llvm-svn: 223342
* [PECOFF] Improve /export compatibility.Rui Ueyama2014-12-044-42/+63
| | | | | | | | | | | | | | | | | | | | | Looks like the rule of /export is more complicated than I was thinking. If /export:foo, for example, is given, and if the actual symbol name in an object file is _foo@<number>, we need to export that symbol as foo, not as the mangled name. If only /export:_foo@<number> is given, the symbol is exported as _foo@<number>. If both /export:foo and /export:_foo@<number> are given, they are considered as duplicates, and the linker needs to choose the unmangled name. The basic idea seems that the linker needs to export a symbol with the same name as given as /export. We exported mangled symbols. This patch fixes that issue. llvm-svn: 223341
* Always emit kernel arg info for SPIR.Sameer Sahasrabuddhe2014-12-044-13/+24
| | | | | | | | | | | | | | | http://llvm.org/bugs/show_bug.cgi?id=21555 Currently, kernel argument metadata is omitted unless the "-cl-kernel-arg-info" option is specified. But the SPIR 1.2 spec requires that all metadata except kernel_arg_name should always be emitted, and kernel_arg_name is only emitted when "-cl-kernel-arg-info" is specified. Patch ported by Ryan Burn from the Khronos SPIR generator. https://github.com/KhronosGroup/SPIR llvm-svn: 223340
* [X86] Clean up whitespace as well as minor coding styleMichael Liao2014-12-0433-409/+403
| | | | llvm-svn: 223339
* CodeGen: refactor ARM builtin handlingSaleem Abdulrasool2014-12-042-20/+22
| | | | | | | | Create a helper function to construct a value for the ARM hint intrinsic rather than inling the construction. In order to avoid the use of the sentinel value, inline the use of intrinsic instruction retrieval. NFC. llvm-svn: 223338
* Revert "Add missing test dependency and use a more canonical target name."Rafael Espindola2014-12-041-1/+0
| | | | | | | | | | This reverts commit r223336. NAKAMURA Takumi did the same thing in r223332! Sorry about the noise. llvm-svn: 223337
* Add missing test dependency and use a more canonical target name.Rafael Espindola2014-12-041-0/+1
| | | | llvm-svn: 223336
* [Hexagon] Adding lit exception if Hexagon isn't built.Colin LeMahieu2014-12-041-0/+3
| | | | llvm-svn: 223335
* [Hexagon] Marking some instructions as CodeGenOnly=0 and adding disassembly ↵Colin LeMahieu2014-12-044-3/+27
| | | | | | tests. llvm-svn: 223334
* CMake: try to actually fix the regexes for setting HOST_LINK_VERSION this ↵Hans Wennborg2014-12-041-4/+4
| | | | | | | | | | | | | | time (PR21268) The regex should not accept an empty version number. The previous attempt at r223106 failed, and the build was still erroring: CMake Error at tools/clang/CMakeLists.txt:269 (string): string sub-command REGEX, mode REPLACE regex "[^0-9]*([0-9.]*).*" matched an empty string. llvm-svn: 223333
* Introduce "llvm-ranlib" as a name of targets since ↵NAKAMURA Takumi2014-12-042-1/+2
| | | | | | Object/archive-symtab.test requires llvm-ranlib. llvm-svn: 223332
* Sort by alphabetical order.NAKAMURA Takumi2014-12-041-1/+1
| | | | llvm-svn: 223331
* Rewrite InputGraph's GroupRui Ueyama2014-12-0420-353/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The aim of this patch is to reduce the excessive abstraction from the InputGraph. We found that even a simple thing, such as sorting input files (Mach-O) or adding a new file to the input file list (PE/COFF), is nearly impossible with the InputGraph abstraction, because it hides too much information behind it. As a result, we invented complex interactions between components (e.g. notifyProgress() mechanism) and tricky code to work around that limitation. There were many occasions that we needed to write awkward code. This patch is a first step to make it cleaner. As a first step, this removes Group class from the InputGraph. The grouping feature is now directly handled by the Resolver. notifyProgress is removed since we no longer need that. I could have cleaned it up even more, but in order to keep the patch minimum, I focused on Group. SimpleFileNode class, a container of File objects, is now limited to have only one File. We shold have done this earlier. We used to allow putting multiple File objects to FileNode. Although SimpleFileNode usually has only one file, the Driver class actually used that capability. I modified the Driver class a bit, so that one FileNode is created for each input File. We should now probably remove SimpleFileNode and directly store File objects to the InputGraph in some way, because a container that can contain only one object is useless. This is a TODO. Mach-O input files are now sorted before they are passe to the Resolver. DarwinInputGraph class is no longer needed, so removed. PECOFF still has hacky code to add a new file to the input file list. This will be cleaned up in another patch. llvm-svn: 223330
* [X86] Restore X86 base pointer after call to llvm.eh.sjlj.setjmpMichael Liao2014-12-045-0/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit on - This patch fixes the bug described in http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-May/062343.html The fix allocates an extra slot just below the GPRs and stores the base pointer there. This is done only for functions containing llvm.eh.sjlj.setjmp that also need a base pointer. Because code containing llvm.eh.sjlj.setjmp saves all of the callee-save GPRs in the prologue, the offset to the extra slot can be computed before prologue generation runs. Impact at run-time on affected functions is:: - One extra store in the prologue, The store saves the base pointer. - One extra load after a llvm.eh.sjlj.setjmp. The load restores the base pointer. Because the extra slot is just above a gap between frame-pointer-relative and base-pointer-relative chunks of memory, there is no impact on other offset calculations other than ensuring there is room for the extra slot. http://reviews.llvm.org/D6388 Patch by Arch Robison <arch.robison@intel.com> llvm-svn: 223329
* [PowerPC] 'cc' should be an alias only to 'cr0'Hal Finkel2014-12-042-5/+3
| | | | | | | | | | | We had mistakenly believed that GCC's 'cc' referred to the entire condition-code register (cr0 through cr7) -- and implemented this in r205630 to fix PR19326, but 'cc' is actually an alias only to 'cr0'. This is causing LLVM to clobber too much with legacy code with inline asm using the 'cc' clobber. Fixes PR21451. llvm-svn: 223328
* Minor typo and link fixes for Statepoint documentationPhilip Reames2014-12-041-5/+3
| | | | llvm-svn: 223327
* [PECOFF] Improve compatibility of /export option.Rui Ueyama2014-12-042-2/+12
| | | | llvm-svn: 223326
* HexagonMCInst.h: Qualify constants explicitly to appease msc17.NAKAMURA Takumi2014-12-041-2/+2
| | | | llvm-svn: 223325
* For copy, cmake needs the full path to llvm-ar.Rafael Espindola2014-12-041-1/+2
| | | | | | This should fix the windows build. llvm-svn: 223324
* Allow target to specify prefix for labelsMatt Arsenault2014-12-0410-4/+18
| | | | | | | | Use the MCAsmInfo instead of the DataLayout, and allow specifying a custom prefix for labels specifically. HSAIL requires that labels begin with @, but global symbols with &. llvm-svn: 223323
* A few more checks for gc.statepoints in the VerifierPhilip Reames2014-12-041-0/+11
| | | | | | | | | This is simply a grab bag of unrelated checks: - A statepoint call can't be marked readonly or readnone - We don't currently support inline asm or varadic target functions. Both could be supported, but don't currently work. - I forgot to check that the number of call arguments actually matched the wrapped callee in my previous change. Included here. llvm-svn: 223322
* Add missing dependency on llvm-ar. Should hopefully fix the bots.Rafael Espindola2014-12-041-1/+2
| | | | llvm-svn: 223321
* Add test for __umulhReid Kleckner2014-12-031-12/+34
| | | | llvm-svn: 223319
* [PowerPC] Fix inline asm memory operands not to use r0Hal Finkel2014-12-032-2/+106
| | | | | | | | | | | | | | | On PowerPC, inline asm memory operands might be expanded as 0($r), where $r is a register containing the address. As a result, this register cannot be r0, and we need to enforce this register subclass constraint to prevent miscompiling the code (we'd get this constraint for free with the usual instruction definitions, but that scheme has no knowledge of how we end up printing inline asm memory operands, and so here we need to do it 'by hand'). We can accomplish this within the current address-mode selection framework by introducing an explicit COPY_TO_REGCLASS node. Fixes PR21443. llvm-svn: 223318
* [RegAllocFast] Handle implicit definitions conservatively.Quentin Colombet2014-12-032-8/+35
| | | | | | | | | | | | | | | | | Prior to this commit, physical registers defined implicitly were considered free right after their definition, i.e.. like dead definitions. Therefore, their uses had to immediately follow their definitions, otherwise the related register may be reused to allocate a virtual register. This commit fixes this assumption by keeping implicit definitions alive until they are actually used. The downside is that if the implicit definition was dead (and not marked at such), we block an otherwise available register. This is however conservatively correct and makes the fast register allocator much more robust in particular regarding the scheduling of the instructions. Fixes PR21700. llvm-svn: 223317
* Implement __umulh with __int128 arithmeticReid Kleckner2014-12-031-1/+6
| | | | | | Use the same approach as _umul128, but just return the high half. llvm-svn: 223316
* This reverts commit r223306 and r223277.Rafael Espindola2014-12-036-267/+19
| | | | | | The code is using uninitialized memory and failing on linux. llvm-svn: 223315
* [msan] allow -fsanitize-coverage=N together with -fsanitize=memory, ↵Kostya Serebryany2014-12-033-0/+34
| | | | | | compiler-rt part llvm-svn: 223314
* [msan] allow -fsanitize-coverage=N together with -fsanitize=memory, llvm partKostya Serebryany2014-12-033-3/+6
| | | | llvm-svn: 223312
* [msan] allow -fsanitize-coverage=N together with -fsanitize=memory, clang partKostya Serebryany2014-12-032-1/+2
| | | | llvm-svn: 223311
* Test commit.Jacques Pienaar2014-12-031-2/+2
| | | | llvm-svn: 223310
* Make llvm-ar a real build target and install it.Rafael Espindola2014-12-031-10/+5
| | | | llvm-svn: 223309
* Improve the comments on PutSTDIN, GetSTDOUT, and GetSTDERR.Zachary Turner2014-12-031-12/+51
| | | | | | Differential Revision: http://reviews.llvm.org/D6513 llvm-svn: 223308
* Add a test-case for lit xunit outputChris Matthews2014-12-031-0/+10
| | | | llvm-svn: 223307
* Move tests for llvm-objdump for universal files to X86 directory to fix ↵Kevin Enderby2014-12-033-0/+0
| | | | | | build bots. llvm-svn: 223306
* Don't allow test-suite names with . in them in xml outputChris Matthews2014-12-032-6/+8
| | | | llvm-svn: 223305
* Split the set of identified struct types into opaque and non-opaque ones.Rafael Espindola2014-12-033-109/+245
| | | | | | | | | | | | | | | | | | | The non-opaque part can be structurally uniqued. To keep this to just a hash lookup, we don't try to unique cyclic types. Also change the type mapping algorithm to be optimistic about a type not being recursive and only create a new type when proven to be wrong. This is not as strong as trying to speculate that we can keep the source type, but is simpler (no speculation to revert) and more powerfull than what we had before (we don't copy non-recursive types at least). I initially wrote this to try to replace the name based type merging. It is not strong enough to replace it, but is is a useful addition. With this patch the number of named struct types is a clang lto bootstrap goes from 49674 to 15986. llvm-svn: 223278
* Add support to llvm-objdump for Mach-O universal files and archives with -macho.Kevin Enderby2014-12-036-19/+267
| | | | llvm-svn: 223277
* fix typos, grammar, formatting; NFCSanjay Patel2014-12-031-22/+19
| | | | llvm-svn: 223276
* Strength Verifier checks around the types involved in a statepointPhilip Reames2014-12-031-6/+23
| | | | | | Add checks that the types in a gc.statepoint sequence match the wrapper callee and that relocating a pointer doesn't change it's type. llvm-svn: 223275
* correct spelling, NFCMatthias Braun2014-12-031-3/+3
| | | | llvm-svn: 223274
* Manually call ModulesDidLoad when the executable is loaded.Zachary Turner2014-12-031-0/+11
| | | | | | | | | This is a temporary workaround to get deferred breakpoint resolution working until Bug 21720 is addressed. Even with this workaround, it will only resolve deferred breakpoints in the executable module, and not in a shared library. llvm-svn: 223273
* Correctly shutdown when DoDestroy is called with an active exception.Zachary Turner2014-12-034-42/+109
| | | | | | | | | | | | | | | | | | | | | Previously if we got a DoDestroy while stopped at a breakpoint, we would detach and then say the process had exited. This is completely wrong, as it resulted in the python script incorrectly assuming that the process had actually exited and trying to delete the image, when in fact it had done no such thing. The fix employed here is that when we get a DoDestroy, we do 3 steps: 1) initiate a termination sequence on the process 2) If we were stopped handling an exception of any kind, mask it and let the program resume, causing the program to see the termination request and exit on its own. 3) Let the program exit normally, and close all of our handles before returning control back to DoDestroy. This fixes Bug 21722 and Bug 21723. llvm-svn: 223272
* CUDA host device code with two code pathsReid Kleckner2014-12-036-17/+97
| | | | | | | | | | | | | | | | | | | | | | | Summary: Allow CUDA host device functions with two code paths using __CUDA_ARCH__ to differentiate between code path being compiled. For example: __host__ __device__ void host_device_function(void) { #ifdef __CUDA_ARCH__ device_only_function(); #else host_only_function(); #endif } Patch by Jacques Pienaar. Reviewed By: rnk Differential Revision: http://reviews.llvm.org/D6457 llvm-svn: 223271
* [SimplifyLibCalls] Improve double->float shrinking to consider constantsMatthias Braun2014-12-032-14/+57
| | | | | | | | | | This allows cases like float x; fmin(1.0, x); to be optimized to fminf(1.0f, x); rdar://19049359 Differential Revision: http://reviews.llvm.org/D6496 llvm-svn: 223270
OpenPOWER on IntegriCloud