summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix typo in comment; NFCSanjoy Das2016-04-271-1/+1
| | | | llvm-svn: 267653
* [X86] Don't assume that MMX extractelts are from index 0.Ahmed Bougacha2016-04-272-1/+31
| | | | | | | It's probably the case for all 3 MMX users out there, but with hand-crafted IR, you can trigger selection failures. Fix that. llvm-svn: 267652
* [X86] Re-enable MMX i32 extractelt combine.Ahmed Bougacha2016-04-272-10/+18
| | | | | | | | | This effectively adds back the extractelt combine removed by r262358: the direct case can still occur (because x86_mmx is special, see r262446), but it's the indirect case that's now superseded by the generic combine. llvm-svn: 267651
* Detects the SAD pattern on X86 so that much better code will be emitted once ↵Cong Hou2016-04-273-7/+1120
| | | | | | | | the pattern is matched. Differential revision: http://reviews.llvm.org/D14840 llvm-svn: 267649
* [LVI] Add a comment explaining a subtle piece of codePhilip Reames2016-04-271-15/+23
| | | | | | Or at least, I didn't understand the implications the first several times I read it it. llvm-svn: 267648
* [Docs] Try to clarify the concept of domains for noalias scopeAdam Nemet2016-04-271-1/+9
| | | | | | | | | | | | | | | Summary: This tries to anchor down the concept of domains a bit better. I had trouble initially relating this to anything. Also talking to David Majnemer on IRC suggested that I wasn't the only one. Reviewers: hfinkel Subscribers: llvm-commits, majnemer Differential Revision: http://reviews.llvm.org/D18799 llvm-svn: 267647
* ThinLTO: do not promote GlobalVariable that have a specific section.Mehdi Amini2016-04-275-4/+117
| | | | | | | Differential Revision: http://reviews.llvm.org/D18298 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 267646
* SLSR: Use UnknownAddressSpace instead of 0 for pure arithmetic.Matt Arsenault2016-04-271-1/+3
| | | | | | | | | In the case where isLegalAddressingMode is used for cases not related to addressing modes, such as pure adds and muls, it should not be using address space 0. LSR already passes -1 as the address space in these cases. llvm-svn: 267645
* LTOCodeGenerator: turns linkonce(_odr) into weak_(odr) when present ↵Mehdi Amini2016-04-272-22/+53
| | | | | | | | | | | | | | | | | "MustPreserve" set Summary: If the linker requested to preserve a linkonce function, we should honor this even if we drop all uses. Reviewers: dexonsmith Subscribers: llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D19527 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 267644
* [LoopDist] Split main class. NFCAdam Nemet2016-04-271-86/+96
| | | | | | | | | | This splits out the per-loop functionality from the Pass class. With this the fact whether the loop is forced-distribute with the new metadata/pragma can be cached in the per-loop class rather than passed around. llvm-svn: 267643
* [LVI] Reduce compile time by lazily scanning blocks if neededPhilip Reames2016-04-272-26/+48
| | | | | | | | | | When encountering a non-local pointer, LVI would eagerly scan the block for dereferences of the given object to prove the pointer to be non null. That's all well and good, but *then* we'd go recurse through our input blocks. As a result, we could end up scanning each and every block we traverse, even if the final definition was obviously non null or we found a constant value somewhere up the chain. The previous code papered over this by using the isKnownNonNull routine from value tracking. This made the duplication less painful in the common case. Instead, we know do the block scan only *after* we've gotten the recursive results back. This lets us stop scanning individual blocks as soon as we've determined it to be non-null in any predecessor block and use our usual merge rules to propagate that information cheaply through successor blocks. For a pointer which can be found non-null, this does strictly less work and sometimes substaintially so. Note that the case where we *can't* prove something non-null is still the really expensive case. We end up scanning each and every block looking for a dereference and never end up finding one. llvm-svn: 267642
* [MachineInstrBundle] Actually set the PartialDeadDef flag only when the registerQuentin Colombet2016-04-271-1/+1
| | | | | | | | | is defined! The users were checking the proper thing (Defined + PartialDeadDef), but the information may have been wrong for other use cases, so fix that. llvm-svn: 267641
* ELF: Merge UndefinedBitcode and UndefinedElf. NFC.Peter Collingbourne2016-04-275-64/+45
| | | | | | Differential Revision: http://reviews.llvm.org/D19566 llvm-svn: 267640
* ELF: Re-implement -u directly and remove CanKeepUndefined flag.Peter Collingbourne2016-04-277-31/+29
| | | | | | | | | | | | | | | | The semantics of the -u flag are to load the lazy symbol named by the flag. We were previously relying on this behavior falling out of symbol resolution against a synthetic undefined symbol, but that didn't quite give us the correct behavior, so we needed a flag to mark symbols created with -u so we could treat them specially in the writer. However, it's simpler and less error prone to implement the required behavior directly and remove the flag. This fixes an issue where symbols loaded with -u would receive hidden visibility even when the definition in an object file had wider visibility. Differential Revision: http://reviews.llvm.org/D19560 llvm-svn: 267639
* [MachineInstrBundle] Update the comment for PhysRegInfo::DeadDef.Quentin Colombet2016-04-261-2/+4
| | | | | | | | I missed read the comment when I commited r267621 and thought the comment did not need update. Matthias kindly proved me wrong. Fixing that. llvm-svn: 267638
* ELF: Move code to where it is used, and related cleanups. NFC.Peter Collingbourne2016-04-267-97/+74
| | | | | | Differential Revision: http://reviews.llvm.org/D19490 llvm-svn: 267637
* Add optimization bisect opt-in calls for SystemZ passesAndrew Kaylor2016-04-263-0/+9
| | | | | | Differential Revision: http://reviews.llvm.org/D19562 llvm-svn: 267636
* Add optimization bisect opt-in calls for NVPTX passesAndrew Kaylor2016-04-265-1/+13
| | | | | | Differential Revision: http://reviews.llvm.org/D19518 llvm-svn: 267635
* [X86] Make sure it is safe to clobber EFLAGS, if need be, when choosingQuentin Colombet2016-04-263-0/+60
| | | | | | | | | | | | | | | the prologue. Do not use basic blocks that have EFLAGS live-in as prologue if we need to realign the stack. Realigning the stack uses AND instruction and this clobbers EFLAGS. An other alternative would have been to save and restore EFLAGS around the stack realignment code, but this is likely inefficient. Fixes PR27531. llvm-svn: 267634
* Module debugging: Add an assertion.Adrian Prantl2016-04-261-1/+3
| | | | llvm-svn: 267633
* PR27513: When determining which declaration to put into an exported lookupRichard Smith2016-04-2613-2/+51
| | | | | | | | | | | table for a module / PCH, never map from a normal declaration of a class to an injected-class-name declaration (or vice versa). Those declarations live in distinct lookup tables and should not be confused. We really shouldn't be using a CXXRecordDecl to represent an injected-class-name in the first place; I've filed PR27532 so we don't forget. llvm-svn: 267632
* PM: Port Reassociate to the new pass managerJustin Bogner2016-04-267-141/+207
| | | | llvm-svn: 267631
* Module debugging: Also correctly handle typedef'd foward-declared members.Adrian Prantl2016-04-264-12/+27
| | | | | | Thanks again to Richard Smith for pointing this out. llvm-svn: 267630
* [X86] Replace -mcpu with -mattr in several testsMitch Bodart2016-04-264-5/+5
| | | | | | Differential Revision: http://reviews.llvm.org/D19568 llvm-svn: 267629
* Reassociate: Convert another functor into a lambda. NFCJustin Bogner2016-04-261-15/+13
| | | | | | Also move the explanatory comment with it. llvm-svn: 267628
* [LVI] Cut short search if we know we can't return a useful resultPhilip Reames2016-04-261-9/+44
| | | | | | Previously we were recursing on our operands for unary and binary operators regardless of whether we knew how to reason about the operator in question. This has the effect of doing a potentially large amount of work, only to throw it away. By checking whether the operation is one LVI can handle, we can cut short the search and return the (overdefined) answer more quickly. The quality of the results produced should not change. llvm-svn: 267626
* Check 'r' and 'y specifiers of freebsd_kernel_printf format strings on PS4Sunil Srivastava2016-04-262-3/+10
| | | | | | This is an addendum to r229921. llvm-svn: 267625
* [SimplifyCFG] propagate branch metadata when creating selectSanjay Patel2016-04-262-2/+29
| | | | llvm-svn: 267624
* [X86] Teach the expansion of copy instructions how to do proper liveness.Quentin Colombet2016-04-261-15/+22
| | | | | | | When the simple analysis provided by MachineBasicBlock::computeRegisterLiveness fails, fall back on the LivePhysReg utility. llvm-svn: 267623
* [MachineBasicBlock] Take advantage of the partially dead information.Quentin Colombet2016-04-262-4/+10
| | | | | | | Thanks to that information we wouldn't lie on a register being live whereas it is not. llvm-svn: 267622
* [MachineInstrBundle] Improvement the recognition of dead definitions.Quentin Colombet2016-04-263-5/+12
| | | | | | | Now, it is possible to know that partial definitions are dead definitions and recognize that clobbered registers are also dead. llvm-svn: 267621
* [LVI] Apply transfer rule for overdefine inputs for binary operatorsPhilip Reames2016-04-262-11/+39
| | | | | | | | As pointed out by John Regehr over in http://reviews.llvm.org/D19485, LVI was being incredibly stupid about applying its transfer rules. Rather than gathering local facts from the expression itself, it was simply giving up entirely if one of the inputs was overdefined. This greatly impacts the precision of the overall analysis and makes it far more fragile as well. This patch builds on 267609 which did the same thing for unary casts. llvm-svn: 267620
* [NVPTX] Fix some usages of CodeGenOpt::None.Jingyue Wu2016-04-261-5/+9
| | | | | | | | | | NVPTXLowerKernelArgs is required for correctness, so it should not be guarded by CodeGenOpt::None. NVPTXPeephole is optimization only, so it should be skipped when CodeGenOpt::None. llvm-svn: 267619
* [LVI] A better fix for the assertion error introduced by 267609Philip Reames2016-04-262-10/+22
| | | | | | Essentially, I was using the wrong size function. For types which were sized, but not primitive, I wasn't getting a useful size for the operand and failed an assert. I fixed this, and also added a guard that the input is a sized type. Test case is for the original mistake. I'm not sure how to actually exercise the sized type check. llvm-svn: 267618
* [LVI] Speculative fix for assertion seen in clang botsPhilip Reames2016-04-261-0/+6
| | | | | | I'll clean this up and add a test case shortly. I want to make sure this does actually fix the bots; if not, I'll revert. llvm-svn: 267617
* Fix TestRegisterVariables.py on WindowsAdrian McCarthy2016-04-261-3/+3
| | | | | | | | Use __attribute__((regparm(x))) to ensure the compiler enregisters at least some arguments when calling functions. Differential Revision: http://reviews.llvm.org/D19548 llvm-svn: 267616
* [LowerExpectIntrinsic] make default likely/unlikely ratio biggerSanjay Patel2016-04-262-10/+22
| | | | | | | | | | We need the default ratio to be sufficiently large that it triggers transforms based on block frequency info (BFI) and plays well with the recently introduced BranchProbability used by CGP. Differential Revision: http://reviews.llvm.org/D19435 llvm-svn: 267615
* Reassociate: Simplify using lambdas. NFCJustin Bogner2016-04-261-17/+7
| | | | llvm-svn: 267614
* Return R_GOTREL for R_MIPS_GPREL*.Rafael Espindola2016-04-262-5/+6
| | | | | | | This lets Writer.cpp know that they are got relative, which will allow further simplifications. llvm-svn: 267613
* Module debugging: Add testcase for member classes of class template ↵Adrian Prantl2016-04-262-1/+18
| | | | | | specializations. llvm-svn: 267612
* Module debugging: Use the definition to determine module-defined types.Adrian Prantl2016-04-262-4/+11
| | | | | | Follow-up to r267464. Thanks to Richard Smith for pointing this out! llvm-svn: 267611
* [sanitizers] rewriting test assuming assert() changes coverage.Mike Aizatsky2016-04-261-19/+43
| | | | | | | | | | | | | Summary: On windows platform assert() call creates two distinct CFG edges which are coverage-instrumented. Simply calling assert would change coverage numbers on the platform. Subscribers: kubabrecka Differential Revision: http://reviews.llvm.org/D19514 llvm-svn: 267610
* [LVI] Infer local facts from unary expressionsPhilip Reames2016-04-262-16/+57
| | | | | | | | | | As pointed out by John Regehr over in http://reviews.llvm.org/D19485, LVI was being incredibly stupid about applying its transfer rules. Rather than gathering local facts from the expression itself, it was simply giving up entirely if one of the inputs was overdefined. This greatly impacts the precision of the overall analysis and makes it far more fragile as well. This patch implements only the unary operation case. Once this is in, I'll implement the same for the binary operations. Differential Revision: http://reviews.llvm.org/D19492 llvm-svn: 267609
* Optimization bisect support in X86-specific passesAndrew Kaylor2016-04-265-3/+13
| | | | | | Differential Revision: http://reviews.llvm.org/D19439 llvm-svn: 267608
* [CodeGen] Add getBuildVector and getSplatBuildVector helpers. NFCI.Ahmed Bougacha2016-04-2613-178/+173
| | | | | | Differential Revision: http://reviews.llvm.org/D17176 llvm-svn: 267606
* Revert "[SimplifyLibCalls] sprintf doesn't copy null bytes"David Majnemer2016-04-262-7/+5
| | | | | | | | | | The destination buffer that sprintf uses is restrict qualified, we do not need to worry about derived pointers referenced via format specifiers. This reverts commit r267580. llvm-svn: 267605
* Test commitErik Pilkington2016-04-261-0/+1
| | | | llvm-svn: 267604
* Call repl in getSymbolBody. NFC.Rafael Espindola2016-04-265-7/+7
| | | | | | Every caller was doing it. llvm-svn: 267603
* Move utility functions to DriverUtils.cpp.Rui Ueyama2016-04-263-28/+32
| | | | llvm-svn: 267602
* Try to get at_file_missing.c passing after LLVM r267556.Nico Weber2016-04-261-2/+2
| | | | | | | | | | r267556 made backslashes escape the next character unconditionally in rsp files. This test echos a path into a rsp file, and paths contain backslashes on Windows. Since it's not important for this test to get the filename from the rsp file, just pass it regularly. llvm-svn: 267601
OpenPOWER on IntegriCloud