summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Change the test case for llvm-objdump’s -archive-headers option to not ↵Kevin Enderby2015-01-161-4/+4
| | | | | | | | | check the size while I once again try to figure out why only the clang-cmake-armv7-a15-full bot is getting that value wrong. llvm-svn: 226345
* Update a commentPhilip Reames2015-01-161-1/+3
| | | | | | Be a bit more explicit about the fact that addrspace(1) is not reserved. llvm-svn: 226344
* clang-format all the GC related files (NFC)Philip Reames2015-01-1614-627/+613
| | | | | | Nothing interesting here... llvm-svn: 226342
* [RuntimeDyld] Track symbol visibility in RuntimeDyld.Lang Hames2015-01-166-40/+95
| | | | | | | | | | | | | | | | | | | RuntimeDyld symbol info previously consisted of just a Section/Offset pair. This patch replaces that pair type with a SymbolInfo class that also tracks symbol visibility. A new method, RuntimeDyld::getExportedSymbolLoadAddress, is introduced which only returns a non-zero result for exported symbols. For non-exported or non-existant symbols this method will return zero. The RuntimeDyld::getSymbolAddress method retains its current behavior, returning non-zero results for all symbols regardless of visibility. No in-tree clients of RuntimeDyld are changed. The newly introduced functionality will be used by the Orc APIs. No test case: Since this patch doesn't modify the behavior for any in-tree clients we don't have a good tool to test this with yet. Once Orc is in we can use it to write regression tests that test these changes. llvm-svn: 226341
* R600: Clean up floor testsMatt Arsenault2015-01-164-151/+146
| | | | | | | | These were using different naming schemes, not using multiple check prefixes and not using -LABEL. llvm-svn: 226333
* Fix the Archive::Child::getRawSize() method used by llvm-objdump’s ↵Kevin Enderby2015-01-164-3/+13
| | | | | | | | -archive-headers option and tweak its use in llvm-objdump. Add back the test case for the -archive-headers option. llvm-svn: 226332
* [Kaleidoscope] Run clang-format over chapter 4 of kaleidoscope.Lang Hames2015-01-161-44/+38
| | | | | | I forgot to do this for r226308. Thanks to Eric Christopher for the reminder. llvm-svn: 226327
* [Hexagon] Converting halfword to doubleword multiply intrinsics.Colin LeMahieu2015-01-162-37/+303
| | | | llvm-svn: 226326
* [Hexagon] Converting accumulating halfword multiply intrinsics to patterns.Colin LeMahieu2015-01-162-90/+838
| | | | llvm-svn: 226324
* [Hexagon] Beginning converting intrinsics to patterns instead of duplicated ↵Colin LeMahieu2015-01-162-71/+499
| | | | | | definitions. Converting halfword multiply intrinsics. llvm-svn: 226318
* [RuntimeDyld] Add 'stub_addr' to comment describing RuntimeDyldChecker's syntax.Lang Hames2015-01-161-0/+1
| | | | llvm-svn: 226316
* [Hexagon] Fix 226309, replacement atomic store patterns didn't actually ↵Colin LeMahieu2015-01-161-0/+17
| | | | | | exist, added new versions. llvm-svn: 226315
* llvm-readobj: add IMAGE_REL_ARM_MOV32(T) to the enumerationSaleem Abdulrasool2015-01-161-0/+1
| | | | | | | Add an additional based relocation to the enumeration of based relocation names. The lack of the enumerator value causes issues when inspecting WoA binaries. llvm-svn: 226314
* X86: fix comment typo in AsmParserSaleem Abdulrasool2015-01-161-1/+1
| | | | | | Fix a typo. NFC. llvm-svn: 226313
* Move ownership of GCStrategy objects to LLVMContextPhilip Reames2015-01-1621-66/+102
| | | | | | | | | | | | Note: This change ended up being slightly more controversial than expected. Chandler has tentatively okayed this for the moment, but I may be revisiting this in the near future after we settle some high level questions. Rather than have the GCStrategy object owned by the GCModuleInfo - which is an immutable analysis pass used mainly by gc.root - have it be owned by the LLVMContext. This simplifies the ownership logic (i.e. can you have two instances of the same strategy at once?), but more importantly, allows us to access the GCStrategy in the middle end optimizer. To this end, I add an accessor through Function which becomes the canonical way to get at a GCStrategy instance. In the near future, this will allows me to move some of the checks from http://reviews.llvm.org/D6808 into the Verifier itself, and to introduce optimization legality predicates for some of the recent additions to InstCombine. (These will follow as separate changes.) Differential Revision: http://reviews.llvm.org/D6811 llvm-svn: 226311
* [Hexagon] Removing old duplicate atomic load/store patterns.Colin LeMahieu2015-01-161-65/+0
| | | | llvm-svn: 226309
* [Kaleidoscope] Fix a bug in Chapter 4 of the Kaleidoscope tutorial where repeatLang Hames2015-01-161-55/+253
| | | | | | | | calls to functions weren't evaluated correctly. Patch by Charlie Turner. Thanks Charlie! llvm-svn: 226308
* Remove gc.root's findCustomSafePoints mechanismPhilip Reames2015-01-165-58/+11
| | | | | | | | | | | | Searching all of the existing gc.root implementations I'm aware of (all three of them), there was exactly one use of this mechanism, and that was to implement a performance improvement that should have been applied to the default lowering. Having this function is requiring a dependency on a CodeGen class (MachineFunction), in a class which is otherwise completely independent of CodeGen. I could solve this differently, but given that I see absolutely no value in preserving this mechanism, I going to just get rid of it. Note: Tis is the first time I'm intentionally breaking previously supported gc.root functionality. Given 3.6 has branched, I believe this is a good time to do this. Differential Revision: http://reviews.llvm.org/D7004 llvm-svn: 226305
* [Hexagon] Converting old patterns to new versions using classes.Colin LeMahieu2015-01-161-164/+253
| | | | llvm-svn: 226304
* Check commit accessSumanth Gundapaneni2015-01-161-1/+0
| | | | llvm-svn: 226302
* [AVX512] Add intrinsics for masked aligned FP loads and storesAdam Nemet2015-01-163-1/+106
| | | | | | | | | | Similar to the unaligned cases. Test was generated with update_llc_test_checks.py. Part of <rdar://problem/17688758> llvm-svn: 226296
* [AVX512] Remove trailing whitespaces in this testAdam Nemet2015-01-161-12/+12
| | | | llvm-svn: 226295
* IR: Allow 16-bits for column infoDuncan P. N. Exon Smith2015-01-165-14/+17
| | | | | | Raise the limit for column information from 8 bits to 16 bits. llvm-svn: 226291
* IR: Cleanup dead code, NFCDuncan P. N. Exon Smith2015-01-161-5/+0
| | | | | | | Line/column fixups already exist in `MDLocation`. Delete the duplicated logic in `DebugLoc`. llvm-svn: 226290
* [Hexagon] Updating call/jump instruction patterns.Colin LeMahieu2015-01-165-45/+40
| | | | llvm-svn: 226288
* [X86][DAG] Disable target specific combine on INSERTPS dag nodes at -O0.Andrea Di Biagio2015-01-162-2/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch disables target specific combine on X86ISD::INSERTPS dag nodes if optlevel is CodeGenOpt::None. The backend currently implements a target specific combine rule that converts a vector load used by an INSERTPS dag node into a scalar load plus a scalar_to_vector. This allows ISel to select a single INSERTPSrm instead of two instructions (i.e. a vector load plus INSERTPSrr). However, the existing target combine rule on INSERTPS nodes only works under the assumption that ISel will always be able to match an INSERTPSrm. This is not true in general at -O0, since the backend only allows folding a load into the memory operand of an instruction if the optimization level is not CodeGenOpt::None. In the example below: // __m128 test(__m128 a, __m128 *b) { __m128 c = _mm_insert_ps(a, *b, 1 << 6); return c; } // Before this patch, at -O0, the backend would have canonicalized the load to 'b' into a scalar load plus scalar_to_vector. Later on, ISel would have selected an INSERTPSrr leaving the insertps mask in an inconsistent state: movss 4(%rdi), %xmm1 insertps $64, %xmm1, %xmm0 # xmm0 = xmm1[1],xmm0[1,2,3]. With this patch, the backend avoids folding the vector load into the operand of the INSERTPS. The new codegen at -O0 is: movaps (%rdi), %xmm1 insertps $64, %xmm1, %xmm0 # %xmm1[1],xmm0[1,2,3]. llvm-svn: 226277
* [mips] Remove a redundant semicolon and add space before curly brackets. NFC.Toma Tabacu2015-01-161-2/+2
| | | | llvm-svn: 226269
* [X86] Refactored stack memory folding tests to explicitly force register ↵Simon Pilgrim2015-01-161-62/+60
| | | | | | | | | | | | | | spilling The current 'big vectors' stack folded reload testing pattern is very bulky and makes it difficult to test all instructions as big vectors will tend to use only the ymm instruction implementations. This patch changes the tests to use a nop call that lists explicit xmm registers as sideeffects, with this we can force a partial register spill of the relevant registers and then check that the reload is correctly folded. The asm generated only adds the forced spill, a nop instruction and a couple of extra labels (a fraction of the current approach). More exhaustive tests will follow shortly, I've added some extra tests (the xmm versions of some of the existing folding tests) as a starting point. Differential Revision: http://reviews.llvm.org/D6932 llvm-svn: 226264
* Revert r226242 - Revert Revert Don't create new comdats in CodeGenTimur Iskhodzhanov2015-01-1615-63/+137
| | | | | | This breaks AddressSanitizer (ninja check-asan) on Windows llvm-svn: 226251
* Use report_fatal_error instead of llvm_unreachable, so we don't crash on ↵Filipe Cabecinhas2015-01-163-1/+2
| | | | | | user input llvm-svn: 226248
* [PowerPC] Adjust PatchPoints for ppc64leHal Finkel2015-01-163-21/+34
| | | | | | | | | | Bill Schmidt pointed out that some adjustments would be needed to properly support powerpc64le (using the ELF V2 ABI). For one thing, R11 is not available as a scratch register, so we need to use R12. R12 is also available under ELF V1, so to maintain consistency, I flipped the order to make R12 the first scratch register in the array under both ABIs. llvm-svn: 226247
* Fix Reassociate handling of constant in presence of undef floatMehdi Amini2015-01-162-3/+31
| | | | | | http://reviews.llvm.org/D6993 llvm-svn: 226245
* Revert "Revert Don't create new comdats in CodeGen"Rafael Espindola2015-01-1615-137/+63
| | | | | | | | | | | | | | | | | | This reverts commit r226173, adding r226038 back. No change in this commit, but clang was changed to also produce trivial comdats for costructors, destructors and vtables when needed. Original message: Don't create new comdats in CodeGen. This patch stops the implicit creation of comdats during codegen. Clang now sets the comdat explicitly when it is required. With this patch clang and gcc now produce the same result in pr19848. llvm-svn: 226242
* Work around to get the build bot clang-cmake-armv7-a15-full green byKevin Enderby2015-01-161-10/+0
| | | | | | | removing the macho-archive-headers.test added with r226228 that it is failing on for now while I try to figure out what is going on. llvm-svn: 226241
* Another attempt to fix the build bot clang-cmake-armv7-a15-full failing onKevin Enderby2015-01-161-2/+2
| | | | | | the macho-archive-headers.test added with r226228. llvm-svn: 226239
* Add a new pass "inductive range check elimination"Sanjoy Das2015-01-1611-0/+1830
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IRCE eliminates range checks of the form 0 <= A * I + B < Length by splitting a loop's iteration space into three segments in a way that the check is completely redundant in the middle segment. As an example, IRCE will convert len = < known positive > for (i = 0; i < n; i++) { if (0 <= i && i < len) { do_something(); } else { throw_out_of_bounds(); } } to len = < known positive > limit = smin(n, len) // no first segment for (i = 0; i < limit; i++) { if (0 <= i && i < len) { // this check is fully redundant do_something(); } else { throw_out_of_bounds(); } } for (i = limit; i < n; i++) { if (0 <= i && i < len) { do_something(); } else { throw_out_of_bounds(); } } IRCE can deal with multiple range checks in the same loop (it takes the intersection of the ranges that will make each of them redundant individually). Currently IRCE does not do any profitability analysis. That is a TODO. Please note that the status of this pass is *experimental*, and it is not part of any default pass pipeline. Having said that, I will love to get feedback and general input from people interested in trying this out. This pass was originally r226201. It was reverted because it used C++ features not supported by MSVC 2012. Differential Revision: http://reviews.llvm.org/D6693 llvm-svn: 226238
* This should fix the build bot clang-cmake-armv7-a15-full failing onKevin Enderby2015-01-161-2/+0
| | | | | | the macho-archive-headers.test added with r226228. llvm-svn: 226232
* R600/SI: Add patterns for v_cvt_{flr|rpi}_i32_f32Matt Arsenault2015-01-154-2/+176
| | | | llvm-svn: 226230
* Fix edge case when Start overflowed in 32 bit modeFilipe Cabecinhas2015-01-152-3/+4
| | | | llvm-svn: 226229
* Add the option, -archive-headers, used with -macho to print the Mach-O ↵Kevin Enderby2015-01-156-3/+151
| | | | | | archive headers to llvm-objdump. llvm-svn: 226228
* R600/SI: Fix trailing comma with modifiersMatt Arsenault2015-01-152-2/+15
| | | | | | | Instructions with 1 operand can still use source modifiers, so make sure we don't print an extra comma afterwards. llvm-svn: 226226
* [Hexagon] Adding new-value store and bit reverse instructions.Colin LeMahieu2015-01-153-0/+133
| | | | llvm-svn: 226224
* Report fatal errors instead of segfaulting/asserting on a few invalid ↵Filipe Cabecinhas2015-01-1517-17/+97
| | | | | | | | | | | | | | | | | accesses while reading MachO files. Summary: Shift an older “invalid file” test to get a consistent naming for these tests. Bugs found by afl-fuzz Reviewers: rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6945 llvm-svn: 226219
* [Object] Add SF_Exported flag. This flag will be set on all symbols that wouldLang Hames2015-01-153-2/+23
| | | | | | | | | be exported from a dylib if their containing object file were linked into one. No test case: No command line tools query this flag, and there are no Object unit tests. llvm-svn: 226217
* Revert r226201 (Add a new pass "inductive range check elimination")Sanjoy Das2015-01-1511-1809/+0
| | | | | | | The change used C++11 features not supported by MSVC 2012. I will fix the change to use things supported MSVC 2012 and recommit shortly. llvm-svn: 226216
* InductiveRangeCheckElimination: Remove extra ';'David Majnemer2015-01-151-3/+3
| | | | | | This silences a GCC warning. llvm-svn: 226215
* Fixing pedantic build warnings.Andrew Kaylor2015-01-151-2/+3
| | | | llvm-svn: 226214
* [Hexagon] Fix 226206 by uncommenting required pattern and changing patterns ↵Colin LeMahieu2015-01-152-62/+15
| | | | | | for simple load-extends. llvm-svn: 226210
* [PowerPC] Loosen ELFv1 PPC64 func descriptor loads for indirect callsHal Finkel2015-01-1510-81/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Function pointers under PPC64 ELFv1 (which is used on PPC64/Linux on the POWER7, A2 and earlier cores) are really pointers to a function descriptor, a structure with three pointers: the actual pointer to the code to which to jump, the pointer to the TOC needed by the callee, and an environment pointer. We used to chain these loads, and make them opaque to the rest of the optimizer, so that they'd always occur directly before the call. This is not necessary, and in fact, highly suboptimal on embedded cores. Once the function pointer is known, the loads can be performed ahead of time; in fact, they can be hoisted out of loops. Now these function descriptors are almost always generated by the linker, and thus the contents of the descriptors are invariant. As a result, by default, we'll mark the associated loads as invariant (allowing them to be hoisted out of loops). I've added a target feature to turn this off, however, just in case someone needs that option (constructing an on-stack descriptor, casting it to a function pointer, and then calling it cannot be well-defined C/C++ code, but I can imagine some JIT-compilation system doing so). Consider this simple test: $ cat call.c typedef void (*fp)(); void bar(fp x) { for (int i = 0; i < 1600000000; ++i) x(); } $ cat main.c typedef void (*fp)(); void bar(fp x); void foo() {} int main() { bar(foo); } On the PPC A2 (the BG/Q supercomputer), marking the function-descriptor loads as invariant brings the execution time down to ~8 seconds from ~32 seconds with the loads in the loop. The difference on the POWER7 is smaller. Compiling with: gcc -std=c99 -O3 -mcpu=native call.c main.c : ~6 seconds [this is 4.8.2] clang -O3 -mcpu=native call.c main.c : ~5.3 seconds clang -O3 -mcpu=native call.c main.c -mno-invariant-function-descriptors : ~4 seconds (looks like we'd benefit from additional loop unrolling here, as a first guess, because this is faster with the extra loads) The -mno-invariant-function-descriptors will be added to Clang shortly. llvm-svn: 226207
* [Hexagon] Updating indexed load-extend patterns and changing test to new ↵Colin LeMahieu2015-01-152-56/+44
| | | | | | expected output. llvm-svn: 226206
OpenPOWER on IntegriCloud