summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Re-land r219354: Use llvm-symbolizer to symbolize LLVM/Clang crash dumps.Alexey Samsonov2014-10-101-1/+140
| | | | | | | | | | | | In fact, symbolization is now expected to work only on Linux and FreeBSD/NetBSD, where we have dl_iterate_phdr and can learn the main executable name without argv0 (it will be possible on BSD systems after http://reviews.llvm.org/D5693 lands). #ifdef-out the code for all the rest Unix systems. Reviewed in http://reviews.llvm.org/D5610 llvm-svn: 219534
* R600/SI: Add load / store machine optimizer pass.Matt Arsenault2014-10-107-1/+403
| | | | | | | | | | | | | Currently this only functions to match simple cases where ds_read2_* / ds_write2_* instructions can be used. In the future it might match some of the other weird load patterns, such as direct to LDS loads. Currently enabled only with a subtarget feature to enable easier testing. llvm-svn: 219533
* This patch teaches ScalarEvolution to pick and use !range metadata.Sanjoy Das2014-10-101-0/+41
| | | | | | | | | | | | It also makes it more aggressive in querying range information by adding a call to isKnownPredicateWithRanges to isLoopBackedgeGuardedByCond and isLoopEntryGuardedByCond. phabricator: http://reviews.llvm.org/D5638 Reviewed by: atrick, hfinkel llvm-svn: 219532
* [mips] Actually mark that the default case is unreachable as this switchChandler Carruth2014-10-101-1/+1
| | | | | | | | | is over a subset of condition codes. This fixes the -Werror build which warns about use of uninitialized variables in the default case. llvm-svn: 219531
* Implement floating point compare for mips fast-iselReed Kotler2014-10-101-2/+56
| | | | | | | | | | | | | | | | | | Summary: Expand SelectCmp to handle floating point compare Test Plan: fpcmpa.ll run 4 flavors of test-suite, mips32 r1/r2 O0/O2 Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits, rfuhler Differential Revision: http://reviews.llvm.org/D5567 llvm-svn: 219530
* Revert "DebugInfo: Ensure that all debug location scope chains from ↵David Blaikie2014-10-102-35/+2
| | | | | | | | | | | instructions within a function, lead to the function itself." This invariant is violated (& the assertions fire) on some Objective C++ in the test-suite. Reverting while I investigate. This reverts commit r219215. llvm-svn: 219523
* R600/SI: Disable copying of SCCMatt Arsenault2014-10-101-1/+5
| | | | llvm-svn: 219519
* implement integer compare in mips fast-iselReed Kotler2014-10-101-0/+99
| | | | | | | | | | | | | | | | | | Summary: implement SelectCmp (integer compare ) in mips fast-isel Test Plan: icmpa.ll also ran 4 test-suite flavors mips32 r1/r2 O0/O2 Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits, rfuhler, mcrosier Differential Revision: http://reviews.llvm.org/D5566 llvm-svn: 219518
* This patch de-pessimizes the calculation of loop trip counts inMark Heffernan2014-10-101-353/+325
| | | | | | | | | | | | | | | | | | | | | ScalarEvolution in the presence of multiple exits. Previously all loops exits had to have identical counts for a loop trip count to be considered computable. This pessimization was implemented by calling getBackedgeTakenCount(L) rather than getExitCount(L, ExitingBlock) inside of ScalarEvolution::getSmallConstantTripCount() (see the FIXME in the comments of that function). The pessimization was added to fix a corner case involving undefined behavior (pr/16130). This patch more precisely handles the undefined behavior case allowing the pessimization to be removed. ControlsExit replaces IsSubExpr to more precisely track the case where undefined behavior is expected to occur. Because undefined behavior is tracked more precisely we can remove MustExit from ExitLimit. MustExit was used to track the case where the limit was computed potentially assuming undefined behavior even if undefined behavior didn't necessarily occur. llvm-svn: 219517
* Add couple of missing 'override' keyword. NFC.Fariborz Jahanian2014-10-101-1/+1
| | | | llvm-svn: 219516
* [PowerPC] Reduce names from Power8Vector to P8VectorBill Schmidt2014-10-103-8/+7
| | | | | | Per Hal Finkel's review, improving typability of some variable names. llvm-svn: 219514
* [MiSched] Fix a logic error in tryPressure()Hal Finkel2014-10-101-2/+2
| | | | | | | | | | | | | Fixes a logic error in the MachineScheduler found by Steve Montgomery (and confirmed by Andy). This has gone unfixed for months because the fix has been found to introduce some small performance regressions. However, Andy has recommended that, at this point, we fix this to avoid further dependence on the incorrect behavior (and then follow-up separately on any regressions), and I agree. Fixes PR18883. llvm-svn: 219512
* Implement floating point to integer conversion in mips fast-iselReed Kotler2014-10-101-1/+69
| | | | | | | | | | | | | | | | | | Summary: Add the ability to convert 64 or 32 bit floating point values to integer in mips fast-isel Test Plan: fpintconv.ll ran 4 flavors of test-suite with no errors, misp32 r1/r2 O0/O2 Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits, rfuhler, mcrosier Differential Revision: http://reviews.llvm.org/D5562 llvm-svn: 219511
* Simplify a few uses of DwarfDebug::SPMapDavid Blaikie2014-10-102-22/+4
| | | | llvm-svn: 219510
* Reorder functions in WinCodeViewLineTables.cpp [NFC]Timur Iskhodzhanov2014-10-101-51/+53
| | | | | | This helps read the comments and understand the code in a natural order llvm-svn: 219508
* [dwarfdump] Prettyprint DW_AT_APPLE_property_attribute bitfield values.Frederic Riss2014-10-101-0/+19
| | | | | | | | | | | | | This change depends on the ApplePropertyString helper that I sent spearately. Not sure how you want this tested: as a tool test by adding a binary to dump, or as an llvm test starting from an IR file? Reviewers: dblaikie, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5689 llvm-svn: 219507
* [dwarfdump] Resolve also variable specifications/abstract_origins.Frederic Riss2014-10-102-11/+20
| | | | | | | | | | | | | | | | | DW_AT_specification and DW_AT_abstract_origin resolving was only performed on subroutine DIEs because it used the getSubroutineName method. Introduce a more generic getName() and use it to dump the reference attributes. Testcases have been updated to check the printed names instead of the offsets except when the name could be ambiguous. Reviewers: dblaikie, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5625 llvm-svn: 219506
* Reduce double set lookups. NFC.Benjamin Kramer2014-10-103-12/+5
| | | | llvm-svn: 219505
* [PowerPC] Add feature for Power8 vector extensionsBill Schmidt2014-10-103-2/+10
| | | | | | | | | | | | | | | | | | The current VSX feature for PowerPC specifies availability of the VSX instructions added with the 2.06 architecture version. With 2.07, the architecture adds new instructions to both the Category:Vector and Category:VSX instruction sets. Additionally, unaligned vector storage operations have improved performance. This patch adds a feature to provide access to the new instructions and performance capabilities of Power8. For compatibility with GCC, the feature is controlled via a new -mpower8-vector switch, and the feature causes the __POWER8_VECTOR__ builtin define to be generated by the preprocessor. There is a companion patch for cfe being committed at the same time. llvm-svn: 219501
* [mips][microMIPS] Implement ADDIUSP instructionZoran Jovanovic2014-10-105-0/+48
| | | | | | Differential Revision: http://reviews.llvm.org/D5084 llvm-svn: 219500
* [mips][microMIPS] Implement JR16 instructionZoran Jovanovic2014-10-101-0/+10
| | | | | | Differential Revision: http://reviews.llvm.org/D5062 llvm-svn: 219498
* [mips][microMIPS] Implement ADDIUS5 instructionZoran Jovanovic2014-10-103-0/+41
| | | | | | Differential Revision: http://reviews.llvm.org/D5049 llvm-svn: 219495
* ps][microMIPS] Implement JRC instructionZoran Jovanovic2014-10-101-0/+11
| | | | | | Differential Revision: http://reviews.llvm.org/D5045 llvm-svn: 219494
* [mips][microMIPS] Implement JALRS16 instructionZoran Jovanovic2014-10-102-0/+11
| | | | | | Differential Revision: http://reviews.llvm.org/D5027 llvm-svn: 219493
* Fix a small typo, NFCTimur Iskhodzhanov2014-10-101-1/+1
| | | | llvm-svn: 219492
* APInt: Unfold return expressions so RVO can work.Benjamin Kramer2014-10-101-10/+28
| | | | | | Saves a couple of expensive deep copies. NFC. llvm-svn: 219487
* Don't use an unqualified 'abs' function call with a builtin type.Chandler Carruth2014-10-101-2/+3
| | | | | | | | | | | | | | | | This is dangerous for numerous reasons. The primary risk here is with floating point or double types where if the wrong header files are included in a strange order this can implicitly convert to integers and then call the C abs function on the integers. There is a secondary risk that even impacts integers where if the namespace the code is written in ever defines an abs overload for types within that namespace the global abs will be hidden. The correct form is to call std::abs or write 'using std::abs' for builtin types (and only the latter is correct in any generic context). I've also added the requisite header to be a bit more explicit here. llvm-svn: 219484
* Sink the per-CU part of DwarfDebug::finishSubprogramDefinitions into ↵David Blaikie2014-10-103-15/+21
| | | | | | DwarfCompileUnit. llvm-svn: 219477
* Sink most of DwarfDebug::constructAbstractSubprogramScopeDIE down into ↵David Blaikie2014-10-104-29/+40
| | | | | | DwarfCompileUnit. llvm-svn: 219476
* [ADT] Add the scalbn function for APFloat.Chandler Carruth2014-10-101-0/+17
| | | | llvm-svn: 219473
* [LVI] Revert the remainder of "r218231 - Add two thresholds ↵Hal Finkel2014-10-101-22/+0
| | | | | | | | | lvi-overdefined-BB-threshold and lvi-overdefined-threshold" Some of r218231 was reverted with the code that used it in r218971, but not all of it. This removes the rest (which is now dead). llvm-svn: 219469
* Avoid unnecessary map lookup/insertion.David Blaikie2014-10-101-2/+2
| | | | llvm-svn: 219466
* SimplifyCFG: Don't convert phis into selects if we could remove undef behaviorArnold Schwaighofer2014-10-101-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead We used to transform this: define void @test6(i1 %cond, i8* %ptr) { entry: br i1 %cond, label %bb1, label %bb2 bb1: br label %bb2 bb2: %ptr.2 = phi i8* [ %ptr, %entry ], [ null, %bb1 ] store i8 2, i8* %ptr.2, align 8 ret void } into this: define void @test6(i1 %cond, i8* %ptr) { %ptr.2 = select i1 %cond, i8* null, i8* %ptr store i8 2, i8* %ptr.2, align 8 ret void } because the simplifycfg transformation into selects would happen to happen before the simplifycfg transformation that removes unreachable control flow (We have 'unreachable control flow' due to the store to null which is undefined behavior). The existing transformation that removes unreachable control flow in simplifycfg is: /// If BB has an incoming value that will always trigger undefined behavior /// (eg. null pointer dereference), remove the branch leading here. static bool removeUndefIntroducingPredecessor(BasicBlock *BB) Now we generate: define void @test6(i1 %cond, i8* %ptr) { store i8 2, i8* %ptr.2, align 8 ret void } I did not see any impact on the test-suite + externals. rdar://18596215 llvm-svn: 219462
* Improve sqrt estimate algorithm (fast-math)Sanjay Patel2014-10-091-17/+16
| | | | | | | | | | | | | | | | | | | This patch changes the fast-math implementation for calculating sqrt(x) from: y = 1 / (1 / sqrt(x)) to: y = x * (1 / sqrt(x)) This has 2 benefits: less code / faster code and one less estimate instruction that may lose precision. The only target that will be affected (until http://reviews.llvm.org/D5658 is approved) is PPC. The difference in codegen for PPC is 2 less flops for a single-precision sqrtf or vector sqrtf and 4 less flops for a double-precision sqrt. We also eliminate a constant load and extra register usage. Differential Revision: http://reviews.llvm.org/D5682 llvm-svn: 219445
* delete function names from commentsSanjay Patel2014-10-091-32/+30
| | | | llvm-svn: 219444
* delete function name from commentSanjay Patel2014-10-091-2/+2
| | | | llvm-svn: 219443
* Add ApplePropertyString dump helper to Dwarf.{h|cpp}.Frederic Riss2014-10-091-0/+33
| | | | | | | | | | Reviewers: dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5688 llvm-svn: 219442
* Fix bug in GPR to FPR moves in PPC64LE.Samuel Antao2014-10-091-4/+4
| | | | | | The current implementation of GPR->FPR register moves uses a stack slot. This mechanism writes a double word and reads a word. In big-endian the load address must be displaced by 4-bytes in order to get the right value. In little endian this is no longer required. This patch fixes the issue and adds LE regression tests to fast-isel-conversion which currently expose this problem. llvm-svn: 219441
* Remove unused parameterDavid Blaikie2014-10-092-6/+5
| | | | llvm-svn: 219440
* Sink DwarfDebug::createAndAddScopeChildren down into DwarfCompileUnit.David Blaikie2014-10-094-19/+17
| | | | llvm-svn: 219437
* Sink DwarfDebug::constructSubprogramScopeDIE down into DwarfCompileUnitDavid Blaikie2014-10-094-49/+55
| | | | llvm-svn: 219436
* [Reassociate] Don't canonicalize X - undef to X + (-undef).Chad Rosier2014-10-091-0/+4
| | | | | | | Phabricator Revision: http://reviews.llvm.org/D5674 PR21205 llvm-svn: 219434
* Remove a compiler bug workaround from 2007. The affected versions of gcc are ↵Benjamin Kramer2014-10-091-11/+1
| | | | | | | | long gone. NFC. llvm-svn: 219433
* Revert "[BasicAA] Revert "Revert r218714 - Make better use of zext and sign ↵Hal Finkel2014-10-091-41/+2
| | | | | | | | information."" This reverts commit r219135 -- still causing miscompiles in SPEC it seems... llvm-svn: 219432
* Fix typoMatt Arsenault2014-10-091-3/+3
| | | | llvm-svn: 219429
* R600/SI: Legalize CopyToReg during instruction selectionTom Stellard2014-10-093-14/+20
| | | | | | | The instruction emitter will crash if it encounters a CopyToReg node with a non-register operand like FrameIndex. llvm-svn: 219428
* [PBQP] Add missing headers from r219421.Lang Hames2014-10-091-0/+38
| | | | llvm-svn: 219425
* Sink DwarfDebug::createScopeChildrenDIE down into DwarfCompileUnit.David Blaikie2014-10-094-28/+31
| | | | llvm-svn: 219422
* [PBQP] Replace PBQPBuilder with composable constraints (PBQPRAConstraint).Lang Hames2014-10-096-455/+384
| | | | | | | | | | | | | | | | This patch removes the PBQPBuilder class and its subclasses and replaces them with a composable constraints class: PBQPRAConstraint. This allows constraints that are only required for optimisation (e.g. coalescing, soft pairing) to be mixed and matched. This patch also introduces support for target writers to supply custom constraints for their targets by overriding a TargetSubtargetInfo method: std::unique_ptr<PBQPRAConstraints> getCustomPBQPConstraints() const; This patch should have no effect on allocations. llvm-svn: 219421
* R600/SI: Legalize INSERT_SUBREG instructions during PostISelFoldingTom Stellard2014-10-091-0/+29
| | | | | | | | LLVM assumes INSERT_SUBREG will always have register operands, so we need to legalize non-register operands, like FrameIndexes, to avoid random assertion failures. llvm-svn: 219420
OpenPOWER on IntegriCloud