summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Use some braces to format this a little better.Eric Christopher2016-03-151-5/+9
| | | | llvm-svn: 263527
* BitcodeWriter dyn_cast cleanup for r263275 (NFC)Teresa Johnson2016-03-151-8/+5
| | | | | | | Address review suggestions from dblaikie: change a few dyn_cast to cast and fold a cast into if condition. llvm-svn: 263526
* Fix llvm/llvm/lib/Transforms/Utils/LoopUnroll.cpp:285:53: error: suggestEric Christopher2016-03-151-11/+9
| | | | | | parentheses around '&&' within '||' [-Werror=parentheses]. llvm-svn: 263525
* Move global ID computation from Function to GlobalValue (NFC)Teresa Johnson2016-03-158-55/+55
| | | | | | | | Since the static getGlobalIdentifier and getGUID methods are now called for global values other than functions, reflect that by moving these methods to the GlobalValue class. llvm-svn: 263524
* Workaround the fact that "b" is now a separate command object from ↵Enrico Granata2016-03-152-6/+6
| | | | | | | | | | "_regexp-break", and thus "help b" doesn't show the possible syntaxes It would be nice to have a longer-term plan for how to handle help for regular expression commands, since their syntax is highly irregular. I can see a few options (*), but for now this is a reasonable stop-gag measure for the most blatant regression. (*) the simplest is, of course, to detect a regex command and inherit the syntax for any aliases thereof; it would be nice if this also didn't show the underlying regex command name when the alias is used llvm-svn: 263523
* DenseMap: make .resize() do the intuitive thingFiona Glaser2016-03-152-1/+18
| | | | | | | | | | | | | | | | | | | In some places, like InstCombine, we resize a DenseMap to fit the elements we intend to put in it, then insert those elements (to avoid continual reallocations as it grows). But .resize(foo) doesn't actually do what people think; it resizes to foo buckets (which is really an implementation detail the user of DenseMap probably shouldn't care about), not the space required to fit foo elements. DenseMap grows if 3/4 of its buckets are full, so this actually causes one forced reallocation every time instead of avoiding a reallocation. This patch makes .resize(foo) do the intuitive thing: it grows to the size necessary to fit foo elements without new allocations. Also include a test to verify that .resize() actually does what we think it does. llvm-svn: 263522
* [MachO] Add MachO alt-entry directive support.Lang Hames2016-03-1517-15/+147
| | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the MachO .alt_entry assembly directive, and uses it for global aliases with non-zero GEP offsets. The alt_entry flag indicates that a symbol should be layed out immediately after the preceding symbol. Conceptually it introduces an alternate entry point for a function or data structure. E.g.: safe_foo: // check preconditions for foo .alt_entry fast_foo fast_foo: // body of foo, can assume preconditions. The .alt_entry flag is also implicitly set on assembly aliases of the form: a = b + C where C is a non-zero constant, since these have the same effect as an alt_entry symbol: they introduce a label that cannot be moved relative to the preceding one. Setting the alt_entry flag on aliases of this form fixes http://llvm.org/PR25381. llvm-svn: 263521
* Add some test coverage for the changes in alias helpEnrico Granata2016-03-151-0/+18
| | | | llvm-svn: 263520
* Improve the way we decide whether an alias is a dashdash aliasEnrico Granata2016-03-151-1/+2
| | | | llvm-svn: 263519
* [libFuzzer] use max_len exactly equal to the max size of input. Fix 32-bit buildKostya Serebryany2016-03-151-1/+2
| | | | llvm-svn: 263518
* This was printing arguments twice in dash-dash aliases; don't do thatEnrico Granata2016-03-151-24/+24
| | | | llvm-svn: 263517
* [StatepointLowering] Move an assertion; NFCISanjoy Das2016-03-151-6/+4
| | | | | | | | Instead of running an explicit loop over `gc.relocate` calls hanging off of a `gc.statepoint`, assert the validity of the type of the value being relocated in `visitRelocate`. llvm-svn: 263516
* [MC] Rename TLSCALL as it's not ARM specific.Davide Italiano2016-03-154-8/+8
| | | | | | | | | | | | | | `MCSymbolRefExpr` variant kind for TLSCALL is prefixed with _ARM_ since this is how it was originally implemented. The X86_64 version is exactly the same so there's no reason to create a new variant, we can just rename the existing one to be machine-independent. This generalization is the first step to implement support for GNU2 TLS dialect in MC. Differential Revision: http://reviews.llvm.org/D18160 llvm-svn: 263515
* [ThinLTO] Clang side of renaming of function index (NFC)Teresa Johnson2016-03-154-22/+22
| | | | | | | | | This is the companion to an LLVM patch that renamed the function index data structures and files to use the more general module summary index. (Recommit after fixing LLVM side to add back missed file) llvm-svn: 263514
* [ThinLTO] Renaming of function index to module summary index (NFC)Teresa Johnson2016-03-1547-388/+388
| | | | | | | | | | | | | | | (Resubmitting after fixing missing file issue) With the changes in r263275, there are now more than just functions in the summary. Completed the renaming of data structures (started in r263275) to reflect the wider scope. In particular, changed the FunctionIndex* data structures to ModuleIndex*, and renamed related variables and comments. Also renamed the files to reflect the changes. A companion clang patch will immediately succeed this patch to reflect this renaming. llvm-svn: 263513
* Temporarily Revert "[X86][SSE] Simplify vector LOAD + EXTEND onEric Christopher2016-03-144-90/+53
| | | | | | | | | pre-SSE41 hardware" as it seems to be causing crashes during code generation in halide. PR forthcoming. This reverts commit r263303. llvm-svn: 263512
* Add dependency to llvm-dis.Rui Ueyama2016-03-141-1/+1
| | | | | | test/ELF/lto/save-temps.ll uses the tool. llvm-svn: 263511
* Use ELFT instead of ELFFile<ELFT>.Rui Ueyama2016-03-1414-170/+146
| | | | llvm-svn: 263510
* [LoopUnroll] Respect the convergent attribute.Justin Lebar2016-03-143-5/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Specifically, when we perform runtime loop unrolling of a loop that contains a convergent op, we can only unroll k times, where k divides the loop trip multiple. Without this change, we'll happily unroll e.g. the following loop for (int i = 0; i < N; ++i) { if (i == 0) convergent_op(); foo(); } into int i = 0; if (N % 2 == 1) { convergent_op(); foo(); ++i; } for (; i < N - 1; i += 2) { if (i == 0) convergent_op(); foo(); foo(); }. This is unsafe, because we've just added a control-flow dependency to the convergent op in the prelude. In general, runtime unrolling loops that contain convergent ops is safe only if we don't have emit a prelude, which occurs when the unroll count divides the trip multiple. Reviewers: resistor Subscribers: llvm-commits, mzolotukhin Differential Revision: http://reviews.llvm.org/D17526 llvm-svn: 263509
* MathExtrasTest.cpp: Use EXPECT_DOUBLE_EQ here, instead of EXPECT_FLOAT_EQ.NAKAMURA Takumi2016-03-141-1/+1
| | | | llvm-svn: 263508
* Missed this file in previous checkinMarshall Clow2016-03-141-6/+33
| | | | llvm-svn: 263507
* Implement LWG2577: {shared,unique}_lock</tt> should use std::addressofMarshall Clow2016-03-1413-55/+163
| | | | llvm-svn: 263506
* clang/test/CodeGenCXX/virtual-function-attrs.cpp: Appease i686-mingw32 to ↵NAKAMURA Takumi2016-03-141-3/+3
| | | | | | expect x86_thiscallcc. llvm-svn: 263505
* Object: Add ELF types to ELFType.Rui Ueyama2016-03-141-6/+49
| | | | | | | | | | | | | | These types are defined in ELFFile, so in order to use them, you have to write ELFFile<ELFT>::SomeType. But there seems to be no reason to have ELFFile have these types. This patch allows you to write ELFT::SomeType instead. This simplifies libObject users. This is an example: http://reviews.llvm.org/D18129 http://reviews.llvm.org/D18130 llvm-svn: 263504
* Imporove load to store => memcpyAmaury Sechet2016-03-142-25/+128
| | | | | | | | | | Summary: This now try to reorder instructions in order to help create the optimizable pattern. Reviewers: craig.topper, spatel, dexonsmith, Prazek, chandlerc, joker.eph, majnemer Differential Revision: http://reviews.llvm.org/D16523 llvm-svn: 263503
* Make getAlignment a non-member function. NFC.Rui Ueyama2016-03-141-8/+6
| | | | | | This function did not rely on Writer class. llvm-svn: 263502
* Re-add ConstantFoldInstOperands form taking opcode and return type.Manuel Jacob2016-03-142-4/+26
| | | | | | | | | | | | | | | | | | | | | | | Summary: This form was replaced by a form taking an instruction instead of opcode and return type in r258391. After committing this change (and some depending, follow-up changes) it turned out in the review thread to be controversial. The discussion didn't come to a conclusion yet. I'm re-adding the old form to fix the API regression and to provide a better base for discussion, possibly on llvm-dev. A difference to the original function is that it can't be called with GEPs (similarly to how it was already the case for compares). In order to support opaque pointers in the future, folding GEPs needs to be passed the source element type, which is not possible with the current API. Reviewers: dberlin, reames Subscribers: dblaikie, eddyb Differential Revision: http://reviews.llvm.org/D17901 llvm-svn: 263501
* Remove code added for debugging purposes. NFC.Easwaran Raman2016-03-141-3/+3
| | | | llvm-svn: 263500
* Lots of progress on the CommandAlias refactoringEnrico Granata2016-03-147-136/+299
| | | | | | | | | This cleans things up such CommandAlias essentially can work as its own object; the aliases still live in a separate map, but are now just full-fledged CommandObjectSPs This patch also cleans up help generation for aliases, allows aliases to vend their own help, and adds a tweak such that "dash-dash aliases", such as po, don't show the list of options for their underlying command, since those can't be provided anyway I plan to fix up a few more things here, and then add a test case and proclaim victory llvm-svn: 263499
* llvm-shlib: Remove the option to override __cxa_atexitJustin Bogner2016-03-143-19/+1
| | | | | | | | | | | | | | If anybody is actually using this, it probably doesn't do what they think it does. This actually causes the dylib to *export* a __cxa_atexit symbol, so anything that links it probably loses their exit time destructors as well as disabling LLVM's. This just removes the option entirely. If somebody does need this behaviour we should figure out a more principled way to do it. This is effectively a revert of r223805. llvm-svn: 263498
* llvm-config: fix --libs on LinuxReid Kleckner2016-03-141-7/+9
| | | | | | | | | | | | | | | | | | | | Summary: llvm-config --libs does not produce correct output since commit r260263 (llvm-config: Add preliminary Windows support) changed naming format of the libraries. This patch updates llvm-config to recognize new naming format and output correct linker flags. Ref: https://llvm.org/bugs/show_bug.cgi?id=26581 Patch by Vedran Miletić Reviewers: ehsan, rnk, pxli168 Subscribers: pxli168 Differential Revision: http://reviews.llvm.org/D17300 llvm-svn: 263497
* Error messages should start with lowercase letters.Rui Ueyama2016-03-142-6/+6
| | | | llvm-svn: 263496
* Factor out MachineBlockPlacement::fillWorkLists. NFCAmaury Sechet2016-03-141-36/+39
| | | | | | | | | | | | Summary: There are places in MachineBlockPlacement where a worklist is filled in pretty much identical way. The code is duplicated. This refactor it so that the same code is used in both scenarii. Reviewers: chandlerc, majnemer, rafael, MatzeB, escha, silvas Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18077 llvm-svn: 263495
* Revert "[ThinLTO] Clang side of renaming of function index (NFC)"Teresa Johnson2016-03-144-22/+22
| | | | | | This reverts commit r263491. Missed a file on the LLVM side. llvm-svn: 263494
* Revert "[ThinLTO] Renaming of function index to module summary index (NFC)"Teresa Johnson2016-03-1447-369/+796
| | | | | | This reverts commit r263490. Missed a file. llvm-svn: 263493
* [ThinLTO] Clang side of renaming of function index (NFC)Teresa Johnson2016-03-144-22/+22
| | | | | | | This is the companion to an LLVM patch that renamed the function index data structures and files to use the more general module summary index. llvm-svn: 263491
* [ThinLTO] Renaming of function index to module summary index (NFC)Teresa Johnson2016-03-1447-796/+369
| | | | | | | | | | | | | With the changes in r263275, there are now more than just functions in the summary. Completed the renaming of data structures (started in r263275) to reflect the wider scope. In particular, changed the FunctionIndex* data structures to ModuleIndex*, and renamed related variables and comments. Also renamed the files to reflect the changes. A companion clang patch will immediately succeed this patch to reflect this renaming. llvm-svn: 263490
* [JITEventListener] Fix some -Wundef warningsKeno Fischer2016-03-141-2/+2
| | | | | | | | | | | | | | | | | | | | Summary: This check was added in rL152620, and has started causing downstream warnings in Julia: ``` In file included from /home/tkelman/Julia/julia-0.5/src/codegen.cpp:22:0: /home/tkelman/Julia/julia-0.5/usr/include/llvm/ExecutionEngine/JITEventListener.h:84:5: warning: "LLVM_USE_INTEL_JITEVENTS" is not defined [-Wundef] #if LLVM_USE_INTEL_JITEVENTS ^ /home/tkelman/Julia/julia-0.5/usr/include/llvm/ExecutionEngine/JITEventListener.h:100:5: warning: "LLVM_USE_OPROFILE" is not defined [-Wundef] #if LLVM_USE_OPROFILE ^ ``` Patch by Tony Kelman. Reviewers: loladiro Differential Revision: http://reviews.llvm.org/D17254 llvm-svn: 263487
* Shuffle an #undef to avoid a warning on FreeBSDEd Maste2016-03-141-2/+1
| | | | | | | | | | On FreeBSD _LIBCPP_EXTERN_TEMPLATE is being defined from something included by lldb/lldb-private.h. Undefine it after the #include to avoid the redefinition warning. Differential Revision: http://reviews.llvm.org/D17402 llvm-svn: 263486
* Revert "Turn LoopLoadElimination on again"Adam Nemet2016-03-141-2/+2
| | | | | | | | | This reverts commit r263472. There is an LNT failure on clang-ppc64be-linux-lnt. Turn this off, while I am investigating. llvm-svn: 263485
* [CMake] Updating Apple Clang CMake cachesChris Bieneman2016-03-142-9/+58
| | | | | | | | This is a big update that gets the public configurations more in line with the ones we're actually using internally to ship Clang in Xcode. From here forward I expect most of the changes in these files to be incremental as the changes get made internally. llvm-svn: 263483
* allow branch weight metadata on select instructions (PR26636)Sanjay Patel2016-03-144-5/+58
| | | | | | | | | | | | | | | | | | | | | | | As noted in: https://llvm.org/bugs/show_bug.cgi?id=26636 This doesn't accomplish anything on its own. It's the first step towards preserving and using branch weights with selects. The next step would be to make sure we're propagating the info in all of the other places where we create selects (SimplifyCFG, InstCombine, etc). I don't think there's an easy fix to make this happen; we have to look at each transform individually to determine how to correctly propagate the weights. Along with that step, we need to then use the weights when making subsequent transform decisions such as discussed in http://reviews.llvm.org/D16836. The inliner test is independent but closely related. It verifies that metadata is preserved when both branches and selects are cloned. Differential Revision: http://reviews.llvm.org/D18133 llvm-svn: 263482
* [attrs] Handle convergent CallSites.Justin Lebar2016-03-144-58/+107
| | | | | | | | | | | | | | | | | | | | | | | Summary: Previously we had a notion of convergent functions but not of convergent calls. This is insufficient to correctly analyze calls where the target is unknown, e.g. indirect calls. Now a call is convergent if it targets a known-convergent function, or if it's explicitly marked as convergent. As usual, we can remove convergent where we can prove that no convergent operations are performed in the call. Originally landed as r261544, then reverted in r261544 for (incidental) build breakage. Re-landed here with no changes. Reviewers: chandlerc, jingyue Subscribers: llvm-commits, tra, jhen, hfinkel Differential Revision: http://reviews.llvm.org/D17739 llvm-svn: 263481
* [docs] "Straightforward" is one word.Justin Lebar2016-03-141-1/+1
| | | | llvm-svn: 263480
* [docs] Fix typo in docs/CodeGenerator.rst.Justin Lebar2016-03-141-1/+1
| | | | llvm-svn: 263479
* [SystemZ] Add missing isBranch flags to certain instructionUlrich Weigand2016-03-141-9/+11
| | | | | | | | | | | | Some instructions were missing isBranch, isCall, or isTerminator flags. This didn't really affect code generation since most of the affected patterns were used only for the AsmParser and/or disassembler. However, it could affect tools using the MC layer to disassemble and parse binary code (e.g. via MCInstrDesc::mayAffectControlFlow). llvm-svn: 263478
* Relax test introduced in r263464 to accept ARM ABI output.Peter Collingbourne2016-03-141-1/+1
| | | | | | Should fix ARM bots. llvm-svn: 263477
* [SLPVectorizer] Fix dependency listKeno Fischer2016-03-141-0/+1
| | | | | | | | | | | | | | | Summary: DemandedBits was added to the requirements of SLPVectorizer in rL261212 (and various earlier version of it), but the appropriate initialization statement was accidentally forgotten. Ref [[ https://github.com/JuliaLang/julia/issues/14998 | JuliaLang/julia#14998 ]]. Patch by Yichao Yu. Reviewers: mssimpso Differential Revision: http://reviews.llvm.org/D18152 llvm-svn: 263476
* Reverting r263474; it turns out there are uses of the public interface, but ↵Aaron Ballman2016-03-141-2/+2
| | | | | | | | | MSVC wasn't caring about them. http://lab.llvm.org:8080/green//job/clang-stage1-cmake-RA-incremental_build/21475/consoleFull#-45876453249ba4694-19c4-4d7e-bec5-911270d8a58c http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/8879 llvm-svn: 263475
* The file header of TrailingObjects.h suggests that TrailingObjects be ↵Aaron Ballman2016-03-141-2/+2
| | | | | | inherited privately because the public APIs it exposes are not meant as part of the interface. There's no functional change because nothing currently relied on these being inherited publicly. llvm-svn: 263474
OpenPOWER on IntegriCloud