summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [Reassociate] Make sure EraseInst sets MadeChangeMikael Holmen2017-06-272-0/+31
| | | | | | | | | | | | | | | | | | | | | Summary: EraseInst didn't report that it made IR changes through MadeChange. It is essential that changes to the IR are reported correctly, since for example ReassociatePass::run() will indicate that all analyses are preserved otherwise. And the CGPassManager determines if the CallGraph is up-to-date based on status from InstructionCombiningPass::runOnFunction(). Reviewers: craig.topper, rnk, davide Reviewed By: rnk, davide Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34616 llvm-svn: 306368
* [PowerPC] set optimization level in SelectionDAGISelHiroshi Inoue2017-06-277-51/+53
| | | | | | | | | PowerPC backend does not pass the current optimization level to SelectionDAGISel and so SelectionDAGISel works with the default optimization level regardless of the current optimization level. This patch makes the PowerPC backend set the optimization level correctly. Differential Revision: https://reviews.llvm.org/D34615 llvm-svn: 306367
* [COFF, ARM64] Fix typo in COFF ARM64 Relocation TypeMandeep Singh Grang2017-06-271-1/+1
| | | | | | | | | | | | | | | | Summary: Fixed IMAGE_REL_ARM64_PAGEBASE_REL2 ==> IMAGE_REL_ARM64_PAGEBASE_REL21 Refer: http://www.microsoft.com/whdc/system/platform/firmware/PECOFF.mspx Reviewers: zturner, rnk, ruiu Reviewed By: ruiu Subscribers: aemerson, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D34659 llvm-svn: 306366
* [InstCombine] Add test cases demonstrating that we don't optmize ↵Craig Topper2017-06-271-0/+27
| | | | | | select+cmp+cttz/ctlz when the bitwidth is larger than 64 bits. llvm-svn: 306365
* [CodeGen][ObjC] Fix GNU's encoding of bit-field ivars.Akira Hatanaka2017-06-275-45/+78
| | | | | | | | | | | | | | | | | According to the documentation, when encoding a bit-field, GNU runtime needs its starting position in addition to its type and size. https://gcc.gnu.org/onlinedocs/gcc/Type-encoding.html Prior to r297702, the starting position information was not being encoded, which is incorrect, and after r297702, an assertion started to fail because an ObjCIvarDecl was being passed to a function expecting a FieldDecl. This commit moves LookupFieldBitOffset to ASTContext and uses the function to encode the starting position of bit-fields. llvm-svn: 306364
* [AVR] Migrate to new MCAsmBackend applyFixup and processFixupValueLeslie Zhai2017-06-272-28/+26
| | | | | | | | | | | | Reviewers: rafael, dylanmckay, jroelofs, meadori Reviewed By: rafael, meadori Subscribers: meadori, llvm-commits Differential Revision: https://reviews.llvm.org/D34551 llvm-svn: 306359
* [SROA] Further test cleanup and add a test for the actual propagation ofChandler Carruth2017-06-271-4/+25
| | | | | | the nonnull attribute distinct from rewriting it into an assume. llvm-svn: 306358
* Make test/parallel/omp_nested.c not use so many threadsHal Finkel2017-06-271-0/+5
| | | | | | | | | | | | | | | | | | | I've found it very difficult to get test/parallel/omp_nested.c to pass consistently across my build environments. The problem is that it creates N^2 threads (it is testing nested parallel regions), and that often exceeds the thread limits on systems with many cores. We do raise the process limits in lit, and that often helps, but if running lit with a smaller number of threads or on a system where we're otherwise resource constrained, this particular test tends to fail (because the runtime cannot create a sufficient number of threads). This seems to work: if the maximum number of threads is more than some small number, then cap the number of threads used for the parallel region. The choice of 4 here is somewhat arbitrary. Differential Revision: https://reviews.llvm.org/D32033 llvm-svn: 306357
* [CFLAA] Move FunctionHandle to llvm::cflaa.Davide Italiano2017-06-273-5/+4
| | | | | | | Also, while here, remove an unneeded `using namespace llvm`. Thanks to George for the suggestion. llvm-svn: 306355
* [CFLAA] Move a common function to the header to reduce duplication.Davide Italiano2017-06-273-24/+17
| | | | | | Differential Revision: https://reviews.llvm.org/D34660 llvm-svn: 306354
* [SROA] Clean up a test case a bit prior to adding more testing forChandler Carruth2017-06-271-15/+13
| | | | | | nonnull as part of fixing PR32902. llvm-svn: 306353
* ScheduleDAGInstrs: Fix fixupKills() adding too many kill flags.Matthias Braun2017-06-272-1/+46
| | | | | | | | | Remove invalid shortcut in fixupKills(): A register needs to be marked live even when we are not adding a kill flag. This is because a partially live register must not get a kill flags, but it still needs to be fully marked live when walking backwards. llvm-svn: 306352
* [CFLAA] Use raw pointers instead of Optional<Pointer>. NFC.Davide Italiano2017-06-271-9/+9
| | | | | | | | | Using Optional<> here doesn't seem to be terribly valuable, but this is not the main point of this change. The change enables us to merge the (now) two identical copies of parentFunctionOfValue() that Steensgaard's and Andersens' provide. llvm-svn: 306351
* Remove redundant check.Richard Smith2017-06-271-6/+0
| | | | llvm-svn: 306350
* Fix this test to use a construct that actually forces struct layout to ↵Richard Smith2017-06-271-1/+1
| | | | | | happen when testing -Wpadded. llvm-svn: 306349
* [CFLAA] Change FunctionHandle to be common to Steensgaard's and Andersens'Davide Italiano2017-06-265-49/+52
| | | | | | Differential Revision: https://reviews.llvm.org/D34638 llvm-svn: 306348
* AST: enhance mangling for blocks with MS ABISaleem Abdulrasool2017-06-262-10/+178
| | | | | | | | | | | | When generating the decorated name for a static variable inside a BlockDecl, construct a scope for the block invocation function that homes the parameter. This allows for arbitrary nesting of the blocks even if the variables are shadowed. Furthermore, using this for the name allows for undname to properly undecorated the name for us. It shows up as the synthetic __block_invocation function that the compiler emitted in the local scope. llvm-svn: 306347
* Revert r301742, which caused us to try to evaluate all full-expressions.Richard Smith2017-06-265-17/+85
| | | | | | | | | | | | | | Also add testcases for a bunch of expression forms that cause our evaluator to crash. See PR33140 and PR32864 for crashes that this was causing. This reverts r305287, which reverted r305239, which reverted r301742. The previous revert claimed that buildbots were broken, but did not add any testcases and the buildbots have lost all memory of what was wrong here. Changes to test/OpenMP are not reverted; another change has triggered those tests to change their output in the same way that r301742 did. llvm-svn: 306346
* DAGCombine: Make sure we only eliminate trunc/extend when the scales of ↵Wolfgang Pieb2017-06-262-5/+44
| | | | | | | | | | | | truncation and extension match. This fixes PR33368. Reviewer: rksimon Differential Revision: https://reviews.llvm.org/D34069 llvm-svn: 306345
* revert r306336 for breaking ppc test.Dehao Chen2017-06-2612-77/+68
| | | | llvm-svn: 306344
* [clang] Enable printf check for CFIndexAlexander Shaposhnikov2017-06-263-1/+33
| | | | | | | | | | | | | | According to https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Strings/Articles/formatSpecifiers.html CFIndex and NSInteger should be treated the same way (see the section Platform Dependencies). This diff changes the function shouldNotPrintDirectly in SemaChecking.cpp accordingly and adds tests for the "fixit" and the warning. Differential revision: https://reviews.llvm.org/D34496 Test plan: make check-all llvm-svn: 306343
* [Sanitizers] 64 bit allocator respects allocator_may_return_null flagAlex Shlyapnikov2017-06-266-98/+168
| | | | | | | | | | | | | | | | Summary: Make SizeClassAllocator64 return nullptr when it encounters OOM, which allows the entire sanitizer's allocator to follow allocator_may_return_null=1 policy (LargeMmapAllocator: D34243, SizeClassAllocator64: D34433). Reviewers: eugenis Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D34540 llvm-svn: 306342
* [CodeGen] Fix some Clang-tidy modernize-use-using and Include What You Use ↵Eugene Zelenko2017-06-2618-226/+354
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 306341
* [Coverage] Improve readability by using a struct. NFC.Vedant Kumar2017-06-262-24/+30
| | | | llvm-svn: 306340
* reverting 306331.Ayal Zaks2017-06-261-293/+286
| | | | | | Causes TBAA metadata to be generates on reverse shuffles, investigating. llvm-svn: 306338
* [x86] add tests for missing sbb transforms; NFCSanjay Patel2017-06-261-0/+80
| | | | llvm-svn: 306337
* Enable vectorizer-maximize-bandwidth by default.Dehao Chen2017-06-2612-68/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: vectorizer-maximize-bandwidth is generally useful in terms of performance. I've tested the impact of changing this to default on speccpu benchmarks on sandybridge machines. The result shows non-negative impact: spec/2006/fp/C++/444.namd 26.84 -0.31% spec/2006/fp/C++/447.dealII 46.19 +0.89% spec/2006/fp/C++/450.soplex 42.92 -0.44% spec/2006/fp/C++/453.povray 38.57 -2.25% spec/2006/fp/C/433.milc 24.54 -0.76% spec/2006/fp/C/470.lbm 41.08 +0.26% spec/2006/fp/C/482.sphinx3 47.58 -0.99% spec/2006/int/C++/471.omnetpp 22.06 +1.87% spec/2006/int/C++/473.astar 22.65 -0.12% spec/2006/int/C++/483.xalancbmk 33.69 +4.97% spec/2006/int/C/400.perlbench 33.43 +1.70% spec/2006/int/C/401.bzip2 23.02 -0.19% spec/2006/int/C/403.gcc 32.57 -0.43% spec/2006/int/C/429.mcf 40.35 +0.27% spec/2006/int/C/445.gobmk 26.96 +0.06% spec/2006/int/C/456.hmmer 24.4 +0.19% spec/2006/int/C/458.sjeng 27.91 -0.08% spec/2006/int/C/462.libquantum 57.47 -0.20% spec/2006/int/C/464.h264ref 46.52 +1.35% geometric mean +0.29% The regression on 453.povray seems real, but is due to secondary effects as all hot functions are bit-identical with and without the flag. I started this patch to consult upstream opinions on this. It will be greatly appreciated if the community can help test the performance impact of this change on other architectures so that we can decided if this should be target-dependent. Reviewers: hfinkel, mkuper, davidxl, chandlerc Reviewed By: chandlerc Subscribers: rengolin, sanjoy, javed.absar, bjope, dorit, magabari, RKSimon, llvm-commits, mzolotukhin Differential Revision: https://reviews.llvm.org/D33341 llvm-svn: 306336
* [asan] Flag 'asan_gen_prefixes.cc' as unsupported on iOS. The ARM and ARM64 ↵Kuba Mracek2017-06-261-0/+2
| | | | | | assemblers can use different label prefixes than the expected. llvm-svn: 306335
* Fix the bug when handling shufflevector for aarch64.Dehao Chen2017-06-262-2/+28
| | | | | | | | | | | | | | Summary: This Fixes https://bugs.llvm.org/show_bug.cgi?id=33600 Reviewers: mssimpso, davidxl, Carrot Reviewed By: mssimpso Subscribers: aemerson, rengolin, sanjoy, javed.absar, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D34641 llvm-svn: 306334
* RenameIndependentSubregs: Fix iterator problemMatt Arsenault2017-06-262-0/+70
| | | | | | | | | | Fixes bug 33597. Use of substituteRegister in the tied operand case messes up the register use iterator, causing some uses to be left unprocessed. llvm-svn: 306333
* Add missing forward declaration.Vassil Vassilev2017-06-261-0/+1
| | | | | | This should fix our modules builds. llvm-svn: 306332
* [LV] Changing the interface of ValueMap, NFC.Ayal Zaks2017-06-261-286/+293
| | | | | | | | | | | | Instead of providing access to the internal MapStorage holding all Values associated with a given Key, used for setting or resetting them all together, ValueMap keeps its MapStorage internal; its new interface allows getting, setting or resetting a single Value, per part or per part-and-lane. Follows the discussion in https://reviews.llvm.org/D32871. Differential Revision: https://reviews.llvm.org/D34473 llvm-svn: 306331
* [WebAssembly] Add more support for weak symbolsSam Clegg2017-06-264-0/+72
| | | | | | | | | Add weak symbol tests to MC Add symbol flags to output of `llvm-readobj -t`. Differential Revision: https://reviews.llvm.org/D34635 llvm-svn: 306330
* AArch64: legalize G_EXTRACT operations.Tim Northover2017-06-268-15/+168
| | | | | | | This is the dual problem to legalizing G_INSERTs so most of the code and testing was cribbed from there. llvm-svn: 306328
* Check that the initializer of a non-dependent constexpr variable is constant ↵Richard Smith2017-06-262-6/+14
| | | | | | even within templates. llvm-svn: 306327
* Remove some redundant setup when preprocessing .pcm files.Richard Smith2017-06-262-10/+0
| | | | | | Both of these steps are immediately overwritten by the FrontendAction setup. llvm-svn: 306325
* [DWARF] NFC: Give DwarfFormat a 1-byte base type.Paul Robinson2017-06-263-6/+6
| | | | | | | In particular this reduces DWARFFormParams from 64 to 32 bits; pass it around by value. llvm-svn: 306324
* Fix -Wpessimizing-move.Rui Ueyama2017-06-261-1/+1
| | | | llvm-svn: 306323
* Add trap instructions for ARM and MIPS.Rui Ueyama2017-06-2611-133/+131
| | | | | | | This patch fills holes in executable sections with 0xd4 (ARM) or 0xef (MIPS). These trap instructions were suggested by Theo de Raadt. llvm-svn: 306322
* When preprocessing with -frewrite-imports and -fmodule-file=, do not pass allRichard Smith2017-06-266-16/+40
| | | | | | | | | | | modules to preprocessing of nested .pcm files. Making those module files available results in loading more .pcm files than necessary, and potentially in misbehavior if a module makes itself visible during its own compilation (as parts of that module that have not yet been processed would then become visible). llvm-svn: 306320
* Only use libdl when it is availableDimitry Andric2017-06-261-1/+1
| | | | | | | | | | | | | | | | Summary: On BSDs, there is no `libdl.so`, and functions like `dlopen` are implemented in the main C library instead. Use the `CMAKE_DL_LIBS` variable instead of hardcoding a dependency on the `dl` library. Reviewers: grokos, joerg, emaste Reviewed By: emaste Subscribers: jlpeyton, mgorny, openmp-commits Differential Revision: https://reviews.llvm.org/D34632 llvm-svn: 306319
* AArch64: remove all kill flags when extending register liveness.Tim Northover2017-06-262-1/+26
| | | | | | | | | | | | When we forward a stored value to a load and eliminate it entirely we need to make sure the liveness of the register is maintained all the way to its use. Previously we only cleared liveness on the store doing the forwarding, but there could be other killing uses in between. We already do the right thing when the load has to be converted into something else, it was just this one path that skipped it. llvm-svn: 306318
* [Sema] Fix a crash-on-invalid when a template parameter list has a classAkira Hatanaka2017-06-2610-13/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | definition or non-reference class type. The crash occurs when there is a template parameter list in a class that is missing the closing angle bracket followed by a definition of a struct. For example: class C0 { public: template<typename T, typename T1 = T // missing closing angle bracket struct S0 {}; C0() : m(new S0<int>) {} S0<int> *m; }; This happens because the parsed struct is added to the scope of the enclosing class without having its access specifier set, which results in an assertion failure in SemaAccess.cpp later. This commit fixes the crash by adding the parsed struct to the enclosing file scope and marking structs as invalid if they are defined in template parameter lists. rdar://problem/31783961 rdar://problem/19570630 Differential Revision: https://reviews.llvm.org/D33606 llvm-svn: 306317
* Tweak to match change in LLVM API, in r306315.Paul Robinson2017-06-261-2/+2
| | | | llvm-svn: 306316
* [DWARF] NFC: Collect info used by DWARFFormValue into a helper.Paul Robinson2017-06-2611-255/+208
| | | | | | | | | | | Some forms have sizes that depend on the DWARF version, DWARF format (32/64-bit), or the size of an address. Collect these into a struct to simplify passing them around. Require callers to provide one when they query a form's size. Differential Revision: http://reviews.llvm.org/D34570 llvm-svn: 306315
* [X86][SSE] Check SSE2/SSE3 codegen tests on i686 and x86_64Simon Pilgrim2017-06-262-184/+456
| | | | llvm-svn: 306314
* [GVN] Recommit the patch "Add phi-translate support in scalarpre".Wei Mi2017-06-265-34/+321
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recommit fixes three bugs: The first one is to use CurrentBlock instead of PREInstr's Parent as param of performScalarPREInsertion because the Parent of a clone instruction may be uninitialized. The second one is stop PRE when CurrentBlock to its predecessor is a backedge and an operand of CurInst is defined inside of CurrentBlock. The same value defined inside of loop in last iteration can not be regarded as available. The third one is an out-of-bound array access in a flipped if guard. Right now scalarpre doesn't have phi-translate support, so it will miss some simple pre opportunities. Like the following testcase, current scalarpre cannot recognize the last "a * b" is fully redundent because a and b used by the last "a * b" expr are both defined by phis. long a[100], b[100], g1, g2, g3; __attribute__((pure)) long goo(); void foo(long a, long b, long c, long d) { g1 = a * b; if (__builtin_expect(g2 > 3, 0)) { a = c; b = d; g2 = a * b; } g3 = a * b; // fully redundant. } The patch adds phi-translate support in scalarpre. This is only a temporary solution before the newpre based on newgvn is available. llvm-svn: 306313
* AMDGPU: Setup SP/FP in callee function prolog/epilogMatt Arsenault2017-06-265-5/+110
| | | | llvm-svn: 306312
* Replace trivial use of external rc.exe by writing our own .res file.Eric Beckmann2017-06-268-78/+145
| | | | | | | | | This patch removes the dependency on the external rc.exe tool by writing a simple .res file using our own library. In this patch I also added an explicit definition for the .res file magic. Furthermore, I added a unittest for embeded manifests and fixed a bug exposed by the test. llvm-svn: 306311
* [libcxx] Annotate c++17 aligned new/delete operators with availabilityAkira Hatanaka2017-06-263-10/+52
| | | | | | | | | | | | | | | | | | | | | | | attribute. This is needed because older versions of libc++ do not have these operators. If users target an older deployment target and try to compile programs in which these operators are explicitly called, the compiler will complain. The following is the list of minimum deployment targets for the four OSes: macosx: 10.13 ios: 11.0 tvos: 11.0 watchos: 4.0 rdar://problem/32664169 Differential Revision: https://reviews.llvm.org/D34556 llvm-svn: 306310
OpenPOWER on IntegriCloud