summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* ARM: report an error when attempting to target a misalgined BLXTim Northover2016-05-103-3/+86
| | | | | | | The CodeGen problem was fixed in r269101, but we still miscompiled assembly that tried the same thing. llvm-svn: 269126
* MemCpyOpt: combine local load/store sequences into memcpy.Tim Northover2016-05-102-48/+575
| | | | | | | | Sort of the BB-local equivalent to idiom-recognizer: if we have a basic-block that really implements a memcpy operation, backends can benefit from seeing this. llvm-svn: 269125
* Loop unroller: set thresholds for optsize and minsize functions to zeroHans Wennborg2016-05-106-172/+38
| | | | | | | | | | | | | | | Before r268509, Clang would disable the loop unroll pass when optimizing for size. That commit enabled it to be able to support unroll pragmas in -Os builds. However, this regressed binary size in one of Chromium's DLLs with ~100 KB. This restores the original behaviour of no unrolling at -Os, but doing it in LLVM instead of Clang makes more sense, and also allows the pragmas to keep working. Differential revision: http://reviews.llvm.org/D20115 llvm-svn: 269124
* update test to use FileCheck for tighter checkingSanjay Patel2016-05-101-8/+114
| | | | llvm-svn: 269123
* update test to use FileCheck for tighter checkingSanjay Patel2016-05-101-3/+17
| | | | llvm-svn: 269122
* Enable loopreroll for sext of loop control only IVLawrence Hu2016-05-102-12/+219
| | | | | | | | | This patch extend loopreroll to allow the instruction chain of loop control only IV has sext. Differential Revision: http://reviews.llvm.org/D19820 llvm-svn: 269121
* SDAG: Avoid relying on the return value of SelectCode in SystemZ. NFCJustin Bogner2016-05-101-12/+20
| | | | | | | | | | This is a bit of a spot fix for now. I'll try to fix this up more comprehensively soon. This is part of the work to have Select return void instead of an SDNode *, which is in turn part of llvm.org/pr26808. llvm-svn: 269120
* Revert r26084: Enable loopreroll for sext of loop control only IVLawrence Hu2016-05-102-219/+12
| | | | llvm-svn: 269119
* Wildcard away paths in fixit CHECKs in my last testcaseReid Kleckner2016-05-101-9/+9
| | | | | | Oops. :( llvm-svn: 269118
* Revert r269093: Enable loopreroll for sext of loop control only IVLawrence Hu2016-05-101-0/+186
| | | | llvm-svn: 269117
* Add -Wcast-calling-convention to warn when casting away calling conventionsReid Kleckner2016-05-103-2/+149
| | | | | | | | | | | | | | | | | | | | | | Summary: This only warns on casts of the address of a function defined in the current TU. In this case, the fix is likely to be local and the warning useful. Here are some things we could experiment with in the future: - Fire on declarations as well as definitions - Limit the warning to non-void function prototypes - Limit the warning to mismatches of caller and callee cleanup CCs This warning is currently off by default while we study its usefulness. Reviewers: thakis, rtrieu Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D17348 llvm-svn: 269116
* [X86] Properly check that EAX is dead when copying EFLAGS.Quentin Colombet2016-05-102-4/+76
| | | | | | | | | | | | This fixes a bug introduced in r267623, where we got smarter and avoided to save EAX before using it. However, we failed to check if any of the subregister of EAX were alive and thus, missed cases where we have to save EAX before using it. The problem may happen on every X86/i386/... platform. This fixes llvm.org/PR27624 llvm-svn: 269115
* [InstSimplify] use computeKnownBits on shift amount operandsSanjay Patel2016-05-102-0/+163
| | | | | | | | | | | | | | Do simplifications common to all shift instructions based on the amount shifted: 1. If the shift amount is known larger than the bitwidth, the result is undefined. 2. If the valid bits of the shift amount are all known to be 0, it's a shift by zero, so the shift operand is the result. Note that we could generalize the shift-by-zero transform into a shift-by-constant if all of the valid bits in the shift amount are known, but that would have to be done in InstCombine rather than here because it would mean we need to create a new shift instruction. Differential Revision: http://reviews.llvm.org/D19874 llvm-svn: 269114
* SDAG: Avoid relying on the return value of SelectCode in Hexagon. NFCJustin Bogner2016-05-101-3/+11
| | | | | | | | | | This is a bit of a spot fix for now. I'll try to fix this up more comprehensively soon. This is part of the work to have Select return void instead of an SDNode *, which is in turn part of llvm.org/pr26808. llvm-svn: 269112
* Update clang for LLVM API change.Peter Collingbourne2016-05-101-3/+1
| | | | llvm-svn: 269111
* Cloning: Clean up the interface to the CloneFunction function.Peter Collingbourne2016-05-105-56/+32
| | | | | | | | | | | | | | | | | | | | | Remove the ModuleLevelChanges argument, and the ability to create new subprograms for cloned functions. The latter was added without review in r203662, but it has no in-tree clients (all non-test callers pass false for ModuleLevelChanges [1], so it isn't reachable outside of tests). It also isn't clear that adding a duplicate subprogram to the compile unit is always the right thing to do when cloning a function within a module. If this functionality comes back it should be accompanied with a more concrete use case. Furthermore, all in-tree clients add the returned function to the module. Since that's pretty much the only sensible thing you can do with the function, just do that in CloneFunction. [1] http://llvm-cs.pcc.me.uk/lib/Transforms/Utils/CloneFunction.cpp/rCloneFunction Differential Revision: http://reviews.llvm.org/D18628 llvm-svn: 269110
* [InstCombine] Fold icmp ugt/ult (udiv i32 C2, X), C1.Chad Rosier2016-05-102-3/+112
| | | | | | | | | | This patch adds support for two optimizations: icmp ugt (udiv C2, X), C1 -> icmp ule X, C2/(C1+1) icmp ult (udiv C2, X), C1 -> icmp ugt X, C2/C1 Differential Revision: http://reviews.llvm.org/D20123 llvm-svn: 269109
* [VFS] Change unittest to try appeasing win10 buildbotBruno Cardoso Lopes2016-05-101-2/+2
| | | | | | | http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/5103 Follow up from r269100. llvm-svn: 269108
* ScheduleDAGInstrs: Comment on why subreg defs are not seen as uses; NFCMatthias Braun2016-05-101-0/+4
| | | | | | | | Usually subregister definitions are consider uses of the remaining lanes that did not get defined. Add a comment why the code in ScheduleDAGInstrs does not add use dependencies regardless. llvm-svn: 269107
* [SystemZ] Add support for additional branch extended mnemonicsKit Barton2016-05-103-15/+130
| | | | | | | | | | | | | Added support for extended mnemonics for the following branch instructions and load/store-on-condition opcodes: BR, LOCR, LOCGR, LOC, LOCG, STOC, STOCG Phabricator: http://reviews.llvm.org/D19729 Committing on behalf of Zhan Liau llvm-svn: 269106
* [SCCP] Partially propagate informations when the input is not fully defined.Davide Italiano2016-05-102-0/+4
| | | | | | | | | | With this patch: %r1 = lshr i64 -1, 4294967296 -> undef Before this patch: %r1 = lshr i64 -1, 4294967296 -> 0 llvm-svn: 269105
* [CMake] Add some extra variables to LLVMConfig.cmake.inChris Bieneman2016-05-101-0/+2
| | | | | | | | Compiler-RT needs LLVM_LIBRARY_DIR, LLVM_BINARY_DIR. Setting these in LLVMConfig.cmake will allow Compiler-RT to not need to run llvm-config as long as the LLVMConfig.cmake module is in the CMake module path. llvm-svn: 269104
* Debug Info: Prevent DW_AT_abstract_origin from being emitted twiceAdrian Prantl2016-05-102-7/+57
| | | | | | | | | | | | for the same subprogram. This fixes a bug where DW_AT_abstract_origin is being emitted twice for the same subprogram if a function is both inlined and emitted in the same translation unit, by restoring the pre-r266446 behavior. http://reviews.llvm.org/D20072 llvm-svn: 269103
* Add a link to the format description.Rafael Espindola2016-05-101-0/+2
| | | | llvm-svn: 269102
* ARM: stop emitting blx instructions for most calls on MachO.Tim Northover2016-05-1029-180/+129
| | | | | | | | | | | I'm really not sure why we were in the first place, it's the linker's job to convert between BL/BLX as necessary. Even worse, using BLX left Thumb calls that could be locally resolved completely unencodable since all offsets to BLX are multiples of 4. rdar://26182344 llvm-svn: 269101
* [VFS] Reconstruct the VFS overlay tree for more accurate lookupBruno Cardoso Lopes2016-05-102-2/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way we currently build the internal VFS overlay representation leads to inefficient path search and might yield wrong answers when asked for recursive or regular directory iteration. Currently, when reading an YAML file, each YAML root entry is placed inside a new root in the filesystem overlay. In the crash reproducer, a simple "@import Foundation" currently maps to 43 roots, and when looking up paths, we traverse a directory tree for each of these different roots, until we find a match (or don't). This has two consequences: - It's slow. - Directory iteration gives incomplete results since it only return results within one root - since contents of the same directory can be declared inside different roots, the result isn't accurate. This is in part fault of the way we currently write out the YAML file when emitting the crash reproducer - we could generate only one root and that would make it fast and correct again. However, we should not rely on how the client writes the YAML, but provide a good internal representation regardless. This patch builds a proper virtual directory tree out of the YAML representation, allowing faster search and proper iteration. Besides the crash reproducer, this potentially benefits other VFS clients. llvm-svn: 269100
* [WebAssembly] Reduce strictness of static destructor testDerek Schuff2016-05-101-6/+3
| | | | | | It didn't work on non-asserts builds llvm-svn: 269099
* [AMDGPU][NFC] Rename SIInsertNops -> SIDebuggerInsertNopsKonstantin Zhuravlyov2016-05-104-19/+21
| | | | | | Differential Revision: http://reviews.llvm.org/D20117 llvm-svn: 269098
* LPM: Drop require<loops> from these tests, it's redundant. NFCJustin Bogner2016-05-102-2/+2
| | | | | | | | The LoopPassManager needs to calculate the loops analysis in order to iterate over the loops at all. Requiring it is redundant and just adds noise to the RUN lines here. llvm-svn: 269097
* Make "@name =" mandatory for globals in .ll files.Rafael Espindola2016-05-1031-139/+99
| | | | | | | | | | | | | | | | | | | | | | | An oddity of the .ll syntax is that the "@var = " in @var = global i32 42 is optional. Writing just global i32 42 is equivalent to @0 = global i32 42 This means that there is a pretty big First set at the top level. The current implementation maintains it manually. I was trying to refactor it, but then started wondering why keep it a all. I personally find the above syntax confusing. It looks like something is missing. This patch removes the feature and simplifies the parser. llvm-svn: 269096
* In some cases, type lookup has to deal with situations where it cannot ↵Enrico Granata2016-05-101-1/+23
| | | | | | | | | | reconstruct a compile unit or a function, but it still has a valid symbol - and it can use that in order to figure out the preferential language for lookups This is not the right thing for all clients (notably the expression parser), so put it in type lookup specific code Fixes rdar://problem/22422313 llvm-svn: 269095
* Re-apply r269081 and r269082 with a fix for MSVC.Peter Collingbourne2016-05-104-51/+134
| | | | llvm-svn: 269094
* Enable loopreroll for sext of loop control only IVLawrence Hu2016-05-101-186/+0
| | | | | | | | | This patch extend loopreroll to allow the instruction chain of loop control only IV has sext. Differential Revision: http://reviews.llvm.org/D19820 llvm-svn: 269093
* Fix PR26655: Bail out if all regs of an inst BUNDLE have the correct kill flagMandeep Singh Grang2016-05-103-27/+59
| | | | | | | | | | | | | | | | | | | | Summary: While setting kill flags on instructions inside a BUNDLE, we bail out as soon as we set kill flag on a register. But we are missing a check when all the registers already have the correct kill flag set. We need to bail out in that case as well. This patch refactors the old code and simply makes use of the addRegisterKilled function in MachineInstr.cpp in order to determine whether to set/remove kill on an instruction. Reviewers: apazos, t.p.northover, pete, MatzeB Subscribers: MatzeB, davide, llvm-commits Differential Revision: http://reviews.llvm.org/D17356 llvm-svn: 269092
* Revert r269081 and r269082 while I try to find the right incantation to fix ↵Peter Collingbourne2016-05-104-133/+51
| | | | | | MSVC build. llvm-svn: 269091
* [PGO] resubmit r268969Rong Xu2016-05-103-1/+14
| | | | | | Put the test into a target specific directory. llvm-svn: 269090
* Introduce CGCXXABI::canCallMismatchedFunctionTypeDerek Schuff2016-05-105-11/+24
| | | | llvm-svn: 269089
* more cleanupDerek Schuff2016-05-101-4/+4
| | | | llvm-svn: 269088
* Clarify condition, remove redundant checkDerek Schuff2016-05-101-5/+7
| | | | llvm-svn: 269087
* Clean up condition, add ARM to testDerek Schuff2016-05-102-8/+10
| | | | llvm-svn: 269086
* Do not register incompatible C++ destructors with __cxa_atexitDerek Schuff2016-05-103-4/+42
| | | | | | | | | | | | | | | | | | | | | | Summary: For a static object with a nontrivial destructor, clang generates an initializer function (__cxx_global_var_init) which registers that object's destructor using __cxa_atexit. However some ABIs (ARM, WebAssembly) use destructors that return 'this' instead of having void return (which does not match the signature of function pointers passed to __cxa_atexit). This results in undefined behavior when the destructors are called. All the calling conventions I know of on ARM can tolerate this, but WebAssembly requires the signatures of indirect calls to match the called function. This patch disables that direct registration of destructors for ABIs that have this-returning destructors. Subscribers: aemerson, jfb, cfe-commits, dschuff Differential Revision: http://reviews.llvm.org/D19275 llvm-svn: 269085
* Enable loopreroll for sext of loop control only IVLawrence Hu2016-05-102-12/+219
| | | | | | | This patch extend loopreroll to allow the instruction chain of loop control only IV has sext. llvm-svn: 269084
* [WebAssembly] Preliminary fast-isel support.Dan Gohman2016-05-109-9/+580
| | | | llvm-svn: 269083
* Use doxygen style comments.Peter Collingbourne2016-05-101-5/+5
| | | | llvm-svn: 269082
* WholeProgramDevirt: Move logic for finding devirtualizable call sites to ↵Peter Collingbourne2016-05-104-51/+133
| | | | | | | | | | | | | Analysis. The plan is to eventually make this logic simpler, however I expect it to be a little tricky for the foreseeable future (at least until we're rid of pointee types), so move it here so that it can be reused to build a summary index for devirtualization. Differential Revision: http://reviews.llvm.org/D20005 llvm-svn: 269081
* Simplify LLParser::ParseOptionalLinkage. NFC.Rafael Espindola2016-05-101-19/+34
| | | | llvm-svn: 269080
* clang/test/CodeGen/avx512f-builtins.c: Fix for -Asserts.NAKAMURA Takumi2016-05-101-15/+15
| | | | llvm-svn: 269079
* [X86][AVX512] Added another masked shuffle combine from load testSimon Pilgrim2016-05-101-0/+13
| | | | llvm-svn: 269077
* [ScheduleDAG] Make sure to process all def operands before any use operandsKrzysztof Parzyszek2016-05-102-8/+45
| | | | | | | | | | | | | | | | | An example from Hexagon where things went wrong: %R0<def> = L2_loadrigp <ga:@fp04> ; load function address J2_callr %R0<kill>, ..., %R0<imp-def> ; call *R0, return value in R0 ScheduleDAGInstrs::buildSchedGraph would visit all instructions going backwards, and in each instruction it would visit all operands in their order on the operand list. In the case of this call, it visited the use of R0 first, then removed it from the set Uses after it visited the def. This caused the DAG to be missing the data dependence edge on R0 between the load and the call. Differential Revision: http://reviews.llvm.org/D20102 llvm-svn: 269076
* [PR27599] [SystemZ] [SelectionDAG] Fix extension of atomic cmpxchg result.Marcin Koscielnicki2016-05-105-9/+108
| | | | | | | | | | | | Currently, SelectionDAG assumes 8/16-bit cmpxchg returns either a sign extended result, or a zero extended result. SystemZ takes a third option by returning junk in the high bits (rotated contents of the other bytes in the memory word). In that case, don't use Assert*ext, and zero-extend the result ourselves if a comparison is needed. Differential Revision: http://reviews.llvm.org/D19800 llvm-svn: 269075
OpenPOWER on IntegriCloud