summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* [DSE] Don't remove stores made live by a call which unwinds.Eli Friedman2016-08-121-16/+58
| | | | | | | | | | Issue exposed by noalias or more aggressive alias analysis. Fixes http://llvm.org/PR25422. Differential revision: https://reviews.llvm.org/D21007 llvm-svn: 278451
* Refactor isValidAssumeForContext to reduce duplication and indentation. NFC.Pete Cooper2016-08-121-27/+21
| | | | | | | This method had some duplicate code when we did or did not have a dom tree. Refactor it to remove the duplication, but also clean up the control flow to have less duplication. llvm-svn: 278450
* Use the range variant of find_if instead of unpacking begin/endDavid Majnemer2016-08-1210-45/+34
| | | | | | No functionality change is intended. llvm-svn: 278443
* Add comment /NFCXinliang David Li2016-08-111-1/+2
| | | | llvm-svn: 278438
* Fix typos /NFCXinliang David Li2016-08-111-2/+2
| | | | llvm-svn: 278436
* Remove unnecessary extra version of isValidAssumeForContext. NFC.Pete Cooper2016-08-111-11/+5
| | | | | | | | | | | There were 2 versions of this method. A public one which takes a const Instruction* and a private implementation which takes a mutable Value* and casts to an Instruction*. There was no need for the 2 versions as all callers pass a const Instruction* and there was no need for a mutable pointer as we only do analysis here. llvm-svn: 278434
* Use the range variant of find instead of unpacking begin/endDavid Majnemer2016-08-1155-126/+90
| | | | | | | | | If the result of the find is only used to compare against end(), just use is_contained instead. No functionality change is intended. llvm-svn: 278433
* Don't import variadic functionsPiotr Padlewski2016-08-113-4/+9
| | | | | | | | | | | | | | | | | | | | Summary: This patch adds IsVariadicFunction bit to summary in order to not import variadic functions. Inliner doesn't inline variadic functions because it is hard to reason about it. This one small fix improves Importer by about 16% (going from 86% to 100% of imported functions that are inlined anywhere) on some spec benchmarks like 'int' and others. Reviewers: eraman, mehdi_amini, tejohnson Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D23339 llvm-svn: 278432
* X86-FMA3: Implemented commute transformation for EVEX/AVX512 FMA3 opcodes.Vyacheslav Klochkov2016-08-116-562/+767
| | | | | | | | | | | This helped to improved memory-folding and register coalescing optimizations. Also, this patch fixed the tracker #17229. Reviewer: Craig Topper. Differential Revision: https://reviews.llvm.org/D23108 llvm-svn: 278431
* Re-commit r278066: Do not ignore SizeOfOptionalHeader in COFF header even if ↵Rui Ueyama2016-08-111-1/+3
| | | | | | PE header is not present. llvm-svn: 278429
* GlobalISel: support 'null' constant in translation.Tim Northover2016-08-111-0/+4
| | | | | | | | It's sharing the integer G_CONSTANT for now since I don't *think* it creates any ambiguity (even on weird archs). If that turns out wrong we can create a G_PTRCONSTANT or something. llvm-svn: 278423
* Extend trip count instead of truncating IV in LFTR, when legalEhsan Amiri2016-08-111-0/+27
| | | | | | | | | | | | | | | | | When legal, extending trip count in the loop control logic generates better code compared to truncating IV. This is because (1) extending trip count is a loop invariant operation (see genLoopLimit where we prove trip count is loop invariant). (2) Scalar Evolution seems to have problems understanding trunc when computing loop trip count. So removing them allows better analysis performed in Scalar Evolution. (In particular this fixes PR 28363 which is the motivation for this change). I am not going to perform any performance test. Any degradation caused by this should be an indication of a bug elsewhere. To prove legality, we rely on SCEV to prove zext(trunc(IV)) == IV (or similarly for sext). If this holds, we can prove equivalence of trunc(IV)==ExitCnt (1) and IV == zext(ExitCnt). Simply take zext of boths sides of (1) and apply the proven equivalence. This commit contains changes in a newly added testcase which was not included in the previous commit (which was reverted later on). https://reviews.llvm.org/D23075 llvm-svn: 278421
* [MSSA] Use is_containedDaniel Berlin2016-08-111-1/+1
| | | | llvm-svn: 278418
* Use range algorithms instead of unpacking begin/endDavid Majnemer2016-08-1143-144/+117
| | | | | | No functionality change is intended. llvm-svn: 278417
* [Hexagon] Allow non-returning calls in hardware loopsKrzysztof Parzyszek2016-08-113-2/+9
| | | | llvm-svn: 278416
* AMDGPU: Remove unused tablegen utilitiesMatt Arsenault2016-08-111-50/+0
| | | | llvm-svn: 278414
* [SCEV] Update interface to handle SCEVExpander insert point motion.Geoff Berry2016-08-112-10/+10
| | | | | | | | | | | | | | | | | | | | Summary: This is an extension of the fix in r271424. That fix dealt with builder insert points being moved by SCEV expansion, but only for the lifetime of the expand call. This change modifies the interface so that LSR can safely call expand multiple times at the same insert point and do the right thing if one of the expansions decides to move the original insert point. This is a fix for PR28719. Reviewers: sanjoy Subscribers: llvm-commits, mcrosier, mzolotukhin Differential Revision: https://reviews.llvm.org/D23342 llvm-svn: 278413
* Fix type truncation warningsTeresa Johnson2016-08-112-13/+14
| | | | | | | | | Avoid type truncation warnings from a 32-bit bot due to size_t not being unsigned long long, by converting the variables and constants to unsigned. This was introduced by r278338 and caused warnings here: http://bb.pgr.jp/builders/i686-mingw32-RA-on-linux/builds/15527/steps/build_llvmclang/logs/warnings%20%287%29 llvm-svn: 278406
* AMDGPU : Add intrinsic for instruction v_cvt_pk_u8_f32Wei Ding2016-08-112-0/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D23336 llvm-svn: 278403
* Fix PR 28933Daniel Berlin2016-08-111-5/+11
| | | | | | | | | | | | | | Summary: This fixes PR 28933 by making sure GVNHoist does not try to recreate memory accesses when it has not actually moved them. Reviewers: sebpop Subscribers: llvm-commits, george.burgess.iv Differential Revision: https://reviews.llvm.org/D23411 llvm-svn: 278401
* CodeGen: Avoid dereferencing end() in MachineSchedulerDuncan P. N. Exon Smith2016-08-111-2/+3
| | | | | | | | | | | | | | | | Check MachineInstr::isDebugValue for the same instruction as we're calling isSchedBoundary, avoiding the possibility of dereferencing end(). This is a functionality change even when I!=end(). Matthias had a look and agrees this is the right resolution (as opposed to checking for end()). This is triggered by a huge number of tests, but they happen to magically pass right now. I found this because WIP patches for PR26753 convert them into crashes. llvm-svn: 278394
* AMDGPU: Prune includesMatt Arsenault2016-08-115-28/+10
| | | | llvm-svn: 278391
* [Hexagon] Standardize "select" pseudo-instructionsKrzysztof Parzyszek2016-08-115-36/+42
| | | | | | | | - PS_pselect: general register pairs - PS_vselect: vector registers (+ 128B version) - PS_wselect: vector register pairs (+ 128B version) llvm-svn: 278390
* WholeProgramDevirt: generate more detailed and accurate remarks.Ivan Krasin2016-08-111-35/+75
| | | | | | | | | | | | | | | | | | | Summary: Keep track of all methods for which we have devirtualized at least one call and then print them sorted alphabetically. That allows to avoid duplicates and also makes the order deterministic. Add optimization names into the remarks, so that it's easier to understand how has each method been devirtualized. Fix a bug when wrong methods could have been reported for tryVirtualConstProp. Reviewers: kcc, mehdi_amini Differential Revision: https://reviews.llvm.org/D23297 llvm-svn: 278389
* If-conversion incorrectly calculates liveness of redefined registersKrzysztof Parzyszek2016-08-111-2/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D23207 llvm-svn: 278383
* Target independent codesize heuristics for Loop Idiom RecognitionAndrew Kaylor2016-08-111-3/+45
| | | | | | | | Patch by Sunita Marathe Differential Revision: https://reviews.llvm.org/D21449 llvm-svn: 278378
* Add a new method to create SimpleInliner instance and make pre-inliner use this.Easwaran Raman2016-08-112-2/+16
| | | | | | | | This adds a createFunctionInliningPass pass that takes an InlineParams object and use this to create the pre-inliner pass. This prevents the regular inliner's threshold flag from influencing the preinliner. Differential revision: https://reviews.llvm.org/D23377 llvm-svn: 278377
* [Hexagon] Skip byval arguments when checking parameter attributesKrzysztof Parzyszek2016-08-111-1/+3
| | | | | | | | | | From the point of view of register assignment, byval parameters are ignored: a byval parameter is not going to be assigned to a register, and it will not affect the assignments of subsequent parameters. When matching registers with parameters in the bit tracker, make sure to skip byval parameters before advancing the registers. llvm-svn: 278375
* Improve virtual register handling when computing debug informationDominic Chen2016-08-111-7/+16
| | | | | | | | | | | | Summary: Some backends, like WebAssembly, use virtual registers instead of physical registers. This crashes the DbgValueHistoryCalculator pass, which assumes that all registers are physical. Instead, skip virtual registers when iterating aliases, and assume that they are clobbered. Reviewers: dexonsmith, dschuff, aprantl Subscribers: yurydelendik, llvm-commits, jfb, sunfish Differential Revision: https://reviews.llvm.org/D22590 llvm-svn: 278371
* Make TwoAddressInstructionPass::rescheduleMIBelowKill subreg-awareMichael Kuperstein2016-08-111-14/+25
| | | | | | | | This fixes PR28824. Differential Revision: https://reviews.llvm.org/D23220 llvm-svn: 278370
* AMDGPU: Fix crashes on memory functionsMatt Arsenault2016-08-112-1/+9
| | | | llvm-svn: 278369
* AArch64: Assert on analyzeBranch failingMatt Arsenault2016-08-111-2/+4
| | | | llvm-svn: 278366
* [AliasSetTracker] Delete dead codeMichael Kuperstein2016-08-111-129/+0
| | | | | | | | Deletes unused remove() and containsPointer() interfaces. NFC. Differential Revision: https://reviews.llvm.org/D23360 llvm-svn: 278365
* Fix some Clang-tidy modernize and Include What You Use warnings.Eugene Zelenko2016-08-115-50/+147
| | | | | | Differential revision: https://reviews.llvm.org/D23291 llvm-svn: 278364
* AMDGPU: Remove custom getSubRegMatt Arsenault2016-08-112-78/+10
| | | | | | | This was kind of confusing, the subregister class shouldn't really be necessary. llvm-svn: 278362
* AMDGPU: Remove unused tracking of flat instructionsMatt Arsenault2016-08-113-25/+0
| | | | llvm-svn: 278361
* Hexagon: Avoid dereferencing end() in HexagonCopyToCombine::findPairableDuncan P. N. Exon Smith2016-08-111-2/+3
| | | | | | | | | | | | | Check for end() before skipping through debug values. This avoids dereferencing end() when the instruction is the final one in the basic block. (It still assumes that a debug value will not be the final instruction in the basic block. No tests seemed to violate that.) Many Hexagon tests trigger this, but they happen to magically pass right now. I found this because WIP patches for PR26753 convert them into crashes. llvm-svn: 278355
* AMDGPU : Add LLVM intrinsics for SAD related instructions.Wei Ding2016-08-112-11/+21
| | | | | | Differential Revision: http://reviews.llvm.org/D23133 llvm-svn: 278354
* GlobalISel: clear vreg mapping after translating each functionTim Northover2016-08-111-2/+4
| | | | | | | Otherwise we only materialize (shared) constants in the first function they appear in. This doesn't go well. llvm-svn: 278351
* Remove FIXME about asserting on the end iteratorReid Kleckner2016-08-111-5/+1
| | | | | | | | | After machine block placement, MBBs may not have terminators, and it is appropriate to check for the end iterator here. We can fold the check into the next if, as well. This look is really just looking for BBs that end in CATCHRET. llvm-svn: 278350
* [MCJIT] Improve documentation and error handling for MCJIT::runFunction.Lang Hames2016-08-111-1/+4
| | | | | | | | | | ExecutionEngine::runFunction is supposed to allow execution of arbitrary function types, but MCJIT can only reasonably support a limited subset of main-linke function types. This patch documents this limitation, and fixes MCJIT::runFunction to abort with a meaningful error at runtime if called with an unsupported function type. llvm-svn: 278348
* X86: Use operator lookup for operator==, NFCDuncan P. N. Exon Smith2016-08-111-2/+2
| | | | | | | Avoid relying on the MachineInstrBundleIterator operator== being implemented as a member function. llvm-svn: 278347
* IR: Don't cast the end iterator to Instruction*Duncan P. N. Exon Smith2016-08-111-2/+2
| | | | | | | | | | | End iterators are usually sentinels, not actually Instruction* at all. Stop casting to it just to get an iterator back. There is likely no observable functionality change here right now (although this is relying on UB, I doubt it was triggering anything), but I'll be removing the cast soon. llvm-svn: 278346
* CodeGen: Check for a terminator in llvm::getFuncletMembershipDuncan P. N. Exon Smith2016-08-111-0/+5
| | | | | | | | | | | | Check for an end iterator from MachineBasicBlock::getFirstTerminator in llvm::getFuncletMembership. If this is turned into an assertion, it fires in 48 X86 testcases (for example, CodeGen/X86/regalloc-spill-at-ehpad.ll). Since this is likely a latent bug (shouldn't all basic blocks end with a terminator?) I've filed PR28938. llvm-svn: 278344
* [SLP] Make RecursionMaxDepth a command line option (NFC)Matthew Simpson2016-08-111-2/+3
| | | | llvm-svn: 278343
* fix comment; NFCSanjay Patel2016-08-111-2/+3
| | | | llvm-svn: 278342
* use auto* with dyn_cast ; NFCSanjay Patel2016-08-111-2/+1
| | | | llvm-svn: 278340
* getParent()->getParent() == getFunction() ; NFCSanjay Patel2016-08-111-2/+1
| | | | llvm-svn: 278339
* Restore "Resolution-based LTO API."Teresa Johnson2016-08-115-7/+818
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This restores commit r278330, with fixes for a few bot failures: - Fix a late change I had made to the save temps output file that I missed due to existing files sitting on my disk - Fix a bunch of Windows bot failures with "ambiguous call to overloaded function" due to confusion between llvm::make_unique vs std::make_unique (preface the new make_unique calls with "llvm::") - Attempt to fix a modules bot failure by adding a missing include to LTO/Config.h. Original change: Resolution-based LTO API. Summary: This introduces a resolution-based LTO API. The main advantage of this API over existing APIs is that it allows the linker to supply a resolution for each symbol in each object, rather than the combined object as a whole. This will become increasingly important for use cases such as ThinLTO which require us to process symbol resolutions in a more complicated way than just adjusting linkage. Patch by Peter Collingbourne. Reviewers: rafael, tejohnson, mehdi_amini Subscribers: lhames, tejohnson, mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D20268 llvm-svn: 278338
* revert 278334Ehsan Amiri2016-08-111-27/+0
| | | | llvm-svn: 278337
OpenPOWER on IntegriCloud