summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Opaque Pointer Types: GEP API migrations to specify the gep type explicitlyDavid Blaikie2015-03-244-8/+12
| | | | | | | | | | | | | | | | | | | | | The changes to InstCombine (& SCEV) do seem a bit silly - it doesn't make anything obviously better to have the caller access the pointers element type (the thing I'm trying to remove) than the GEP itself, but it's a helpful migration step. This will allow me to more obviously lock down GEP (& Load, etc) API usage, then fix all the code that accesses pointer element types except the places that need to be removed (most of the InstCombines) anyway - at which point I'll need to just remove all that code because it won't be meaningful anymore (there will be no pointer types, so no bitcasts to combine) SCEV looks like it'll need some restructuring - we'll have to do a bit more work for GEP canonicalization, since it'll depend on how it's used if we can even manage to canonicalize it to a non-ugly GEP. I guess we can do some fun stuff like voting (do 2 out of 3 load from the GEP with a certain type that gives a pretty GEP? Does every typed use of the GEP use either a specific type or a generic type (i8*, etc)?) llvm-svn: 233131
* optimize the AVX2 (integer) version of vperm2 into a shuffleSanjay Patel2015-03-241-1/+1
| | | | | | | | | | | | ...because this is what happens when an instruction set puts its underwear on after its pants. This is an extension of r232852, r233100, and 233110: http://llvm.org/viewvc/llvm-project?view=revision&revision=232852 http://llvm.org/viewvc/llvm-project?view=revision&revision=233100 http://llvm.org/viewvc/llvm-project?view=revision&revision=233110 llvm-svn: 233127
* Opaque Pointer Types: GEP API migrations to specify the gep type explicitlyDavid Blaikie2015-03-245-16/+26
| | | | | | | | | | | | | | The changes to InstCombine do seem a bit silly - it doesn't make anything obviously better to have the caller access the pointers element type (the thing I'm trying to remove) than the GEP itself, but it's a helpful migration step. This will allow me to more obviously lock down GEP (& Load, etc) API usage, then fix all the code that accesses pointer element types except the places that need to be removed (most of the InstCombines) anyway - at which point I'll need to just remove all that code because it won't be meaningful anymore (there will be no pointer types, so no bitcasts to combine) llvm-svn: 233126
* Merge empty landing pads in SimplifyCFGPhilip Reames2015-03-241-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch tries to merge duplicate landing pads when they branch to a common shared target. Given IR that looks like this: lpad1: %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 cleanup br label %shared_resume lpad2: %exn2 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 cleanup br label %shared_resume shared_resume: call void @fn() ret void } We can rewrite the users of both landing pad blocks to use one of them. This will generally allow the shared_resume block to be merged with the common landing pad as well. Without this change, tail duplication would likely kick in - creating N (2 in this case) copies of the shared_resume basic block. Differential Revision: http://reviews.llvm.org/D8297 llvm-svn: 233125
* Revert "Remove an InstCombine that seems to have become redundant."David Blaikie2015-03-241-13/+28
| | | | | | | | Assertion fires in compiler-rt. Guess it does fire.. This reverts commit r233116. llvm-svn: 233121
* Reset the CFA offset at the start of every FDE.Rafael Espindola2015-03-241-1/+7
| | | | | | This fixes PR21515. llvm-svn: 233120
* AArch64: use a different means to determine whether to byte swap relocations.Peter Collingbourne2015-03-241-3/+18
| | | | | | | | This code depended on a bug in the FindAssociatedSection function that would cause it to return the wrong result for certain absolute expressions. Instead, use EvaluateAsRelocatable. llvm-svn: 233119
* Remove an InstCombine that seems to have become redundant.David Blaikie2015-03-241-28/+13
| | | | | | | | Assert that this doesn't fire - I'll remove all of this later, but just leaving it in for a while in case this is firing & we just don't have test coverage. llvm-svn: 233116
* [X86, AVX] instcombine vperm2 intrinsics with zero inputs into shufflesSanjay Patel2015-03-241-28/+42
| | | | | | | | | | | | | | | This is the IR optimizer follow-on patch for D8563: the x86 backend patch that converts this kind of shuffle back into a vperm2. This is also a continuation of the transform that started in D8486. In that patch, Andrea suggested that we could convert vperm2 intrinsics that use zero masks into a single shuffle. This is an implementation of that suggestion. Differential Revision: http://reviews.llvm.org/D8567 llvm-svn: 233110
* Revert r233062 ""float2int": Add a new pass to demote from float to int ↵Hans Wennborg2015-03-244-545/+0
| | | | | | | | | | | where possible." This caused PR23008, compiles failing with: "Use still stuck around after Def is destroyed: %.sroa.speculated" Also reverting follow-up r233064. llvm-svn: 233105
* [IRCE] Fix how IRCE checks for no-sign-overflow.Sanjoy Das2015-03-241-14/+24
| | | | | | | | | IRCE requires the induction variables it handles to not sign-overflow. The current scheme of checking if sext({X,+,S}) == {sext(X),+,sext(S)} fails when SCEV simplifies sext(X) too. After this change we //also// check no-signed-wrap by looking at the flags set on the SCEVAddRecExpr. llvm-svn: 233102
* [IRCE] Fix a regression introduced in r232444.Sanjoy Das2015-03-241-9/+20
| | | | | | | IRCE should not try to eliminate range checks that check an induction variable against a loop-varying length. llvm-svn: 233101
* [X86, AVX] recognize shufflevector with zero input as a vperm2 (PR22984)Sanjay Patel2015-03-241-20/+56
| | | | | | | | | | | | | | vperm2x128 instructions have the special ability (aka free hardware capability) to shuffle zero values into a vector. This patch recognizes that type of shuffle and generates the appropriate control byte. https://llvm.org/bugs/show_bug.cgi?id=22984 Differential Revision: http://reviews.llvm.org/D8563 llvm-svn: 233100
* Verifier: Start recursing into !dbg attachmentsDuncan P. N. Exon Smith2015-03-241-4/+2
| | | | | | | | | | The main verifier already recurses through the other entry points, so we might as well descend here too. This temporarily duplicates some work already done in `verifyDebugInfo()`, but eventually I'll be removing the other side. llvm-svn: 233095
* Verifier: !llvm.dbg.cu must point at compile unitsDuncan P. N. Exon Smith2015-03-241-0/+11
| | | | | | Duplicate this check from `verifyDebugInfo()`. llvm-svn: 233094
* Refactor: Simplify boolean expressions in lib/AnalysisDavid Blaikie2015-03-241-6/+3
| | | | | | | | | | | | Simplify boolean expressions using `true` and `false` with `clang-tidy` Patch by Richard Thomson. Reviewed By: nlewycky Differential Revision: http://reviews.llvm.org/D8528 llvm-svn: 233091
* Refactor: Simplify boolean expressions in AArch64 targetDavid Blaikie2015-03-242-3/+3
| | | | | | | | | | | | Simplify boolean expressions using `true` and `false` with `clang-tidy` Patch by Richard Thomson. Reviewed By: rengolin Differential Revision: http://reviews.llvm.org/D8525 llvm-svn: 233089
* [mips] Support 16-bit offsets for 'm' inline assembly memory constraint.Daniel Sanders2015-03-241-1/+9
| | | | | | | | | | | | Reviewers: vkalintiris Reviewed By: vkalintiris Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8435 llvm-svn: 233086
* R600/SI: Insert more NOPs after READLANE on VI, don't use NOPs on CIMarek Olsak2015-03-241-1/+16
| | | | | | This is a candidate for stable. llvm-svn: 233080
* R600/SI: Select V_BFE_U32 for and+shift with a non-literal offsetMarek Olsak2015-03-243-15/+14
| | | | llvm-svn: 233079
* R600/SI: Custom-select 32-bit S_BFE from bitwise opcodesMarek Olsak2015-03-241-12/+104
| | | | llvm-svn: 233078
* R600/SI: Improve BFM supportMarek Olsak2015-03-242-3/+20
| | | | llvm-svn: 233077
* R600/SI: Use V_FRACT_F64 for faster 64-bit floor on SIMarek Olsak2015-03-244-1/+73
| | | | | | | Other f64 opcodes not supported on SI can be lowered in a similar way. v2: use complex VOP3 patterns llvm-svn: 233076
* R600/SI: Expand fract to floor, then only select V_FRACT on CIMarek Olsak2015-03-244-3/+32
| | | | | | | | | V_FRACT is buggy on SI. R600-specific code is left intact. v2: drop the multiclass, use complex VOP3 patterns llvm-svn: 233075
* Internalize the StackMapLiveness pass.Benjamin Kramer2015-03-241-6/+45
| | | | | | No need to have its own header when it's not used anywhere. NFC. llvm-svn: 233072
* Revert "Use std::bitset for SubtargetFeatures"Michael Kuperstein2015-03-2425-268/+246
| | | | | | | | This reverts commit r233055. It still causes buildbot failures (gcc running out of memory on several platforms, and a self-host failure on arm), although less than the previous time. llvm-svn: 233068
* Silencing some MSVC warnings "C4805: '^' : unsafe mix of type 'bool' and ↵Aaron Ballman2015-03-241-1/+1
| | | | | | type 'unsigned int' in operation"; NFC. llvm-svn: 233067
* [mips] Simplify boolean expressions in Mips target with `clang-tidy`Simon Atanasyan2015-03-242-11/+7
| | | | | | | | | | No functional changes. Patch by Richard Thomson. Differential Revision: http://reviews.llvm.org/D8522 llvm-svn: 233065
* [float2int] Sort includes and add missing raw_ostream include.Benjamin Kramer2015-03-241-6/+7
| | | | llvm-svn: 233064
* [mips] Distinguish 'R', 'ZC', and 'm' inline assembly memory constraint.Daniel Sanders2015-03-246-12/+111
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Previous behaviour of 'R' and 'm' has been preserved for now. They will be improved in subsequent commits. The offset permitted by ZC varies according to the subtarget since it is intended to match the restrictions of the pref, ll, and sc instructions. The restrictions on these instructions are: * For microMIPS: 12-bit signed offset. * For Mips32r6/Mips64r6: 9-bit signed offset. * Otherwise: 16-bit signed offset. Reviewers: vkalintiris Reviewed By: vkalintiris Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8414 llvm-svn: 233063
* "float2int": Add a new pass to demote from float to int where possible.James Molloy2015-03-244-0/+544
| | | | | | | | | | | | It is possible to have code that converts from integer to float, performs operations then converts back, and the result is provably the same as if integers were used. This can come from different sources, but the most obvious is a helper function that uses floats but the arguments given at an inlined callsites are integers. This pass considers all integers requiring a bitwidth less than or equal to the bitwidth of the mantissa of a floating point type (23 for floats, 52 for doubles) as exactly representable in floating point. To reduce the risk of harming efficient code, the pass only attempts to perform complete removal of inttofp/fptoint operations, not just move them around. llvm-svn: 233062
* Use std::bitset for SubtargetFeaturesMichael Kuperstein2015-03-2425-246/+268
| | | | | | | | | | | | | Previously, subtarget features were a bitfield with the underlying type being uint64_t. Since several targets (X86 and ARM, in particular) have hit or were very close to hitting this bound, switching the features to use a bitset. No functional change. The first time this was committed (r229831), it caused several buildbot failures. At least some of the ARM ones were due to gcc/binutils issues, and should now be fixed. Differential Revision: http://reviews.llvm.org/D8542 llvm-svn: 233055
* [Orc] Move delta-handling for trampoline sizes into the resolver block.Lang Hames2015-03-241-0/+2
| | | | | | | This is the first step towards adding a target-independent callback handler API. llvm-svn: 233049
* [SelectionDAG] Fixed issue with uitofp vector constant folding being treated ↵Simon Pilgrim2015-03-231-4/+2
| | | | | | | | | | | | | | | | | | | | | | | as sitofp While the uitofp scalar constant folding treats an integer as an unsigned value (from lang ref): %X = sitofp i8 -1 to double ; yields double:-1.0 %Y = uitofp i8 -1 to double ; yields double:255.0 The vector constant folding was always using sitofp: %X = sitofp <2 x i8> <i8 -1, i8 -1> to <2 x double> ; yields <double -1.0, double -1.0> %Y = uitofp <2 x i8> <i8 -1, i8 -1> to <2 x double> ; yields <double -1.0, double -1.0> This patch fixes this so that the correct opcode is used for sitofp and uitofp. %X = sitofp <2 x i8> <i8 -1, i8 -1> to <2 x double> ; yields <double -1.0, double -1.0> %Y = uitofp <2 x i8> <i8 -1, i8 -1> to <2 x double> ; yields <double 255.0, double 255.0> Differential Revision: http://reviews.llvm.org/D8560 llvm-svn: 233033
* DebugInfo: Overload get() in DIDescriptor subclassesDuncan P. N. Exon Smith2015-03-231-25/+44
| | | | | | | | | | | | | | | Continue to simplify the `DIDescriptor` subclasses, so that they behave more like raw pointers. Remove `getRaw()`, replace it with an overloaded `get()`, and overload the arrow and cast operators. Two testcases started to crash on the arrow operators with this change because of `scope:` references that weren't real scopes. I fixed them. Soon I'll add verifier checks for them too. This also adds explicit dereference operators. Previously, the builtin dereference against `operator MDNode *()` would have worked, but now the builtins are ambiguous. llvm-svn: 233030
* Refactor how passes get a symbol at the end of a section.Rafael Espindola2015-03-234-24/+30
| | | | | | | | | | There is now a canonical symbol at the end of a section that different passes can request. This also allows us to assert that we don't switch back to a section whose end symbol has already been printed. llvm-svn: 233026
* [AArch64, ARM] Enable GlobalMerge with -O3 rather than -O1.Ahmed Bougacha2015-03-232-2/+2
| | | | | | | | | | | | | | | | | | | | The pass used to be enabled by default with CodeGenOpt::Less (-O1). This is too aggressive, considering the pass indiscriminately merges all globals together. Currently, performance doesn't always improve, and, on code that uses few globals (e.g., the odd file- or function- static), more often than not is degraded by the optimization. Lengthy discussion can be found on llvmdev (AArch64-focused; ARM has similar problems): http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-February/082800.html Also, it makes tooling and debuggers less useful when dealing with globals and data sections. GlobalMerge needs to better identify those cases that benefit, and this will be done separately. In the meantime, move the pass to run with -O3 rather than -O1, on both ARM and AArch64. llvm-svn: 233024
* Refactor: Simplify boolean expressions in R600 targetDavid Blaikie2015-03-231-2/+2
| | | | | | | | | | Simplify boolean expressions with `true` and `false` using `clang-tidy` Patch by Richard Thomson. Differential Revision: http://reviews.llvm.org/D8520 llvm-svn: 233020
* Update variable name and reuse existing variable. NFC.Rafael Espindola2015-03-231-5/+5
| | | | llvm-svn: 233014
* Raising minimum required CMake version to 2.8.12.2.Chris Bieneman2015-03-232-2/+2
| | | | | | This commit is in reference to the llvm-dev thread: http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-March/083672.html llvm-svn: 233008
* Refactor: Simplify boolean expressions in llvm IRDavid Blaikie2015-03-231-28/+22
| | | | | | | | | | | Simplify boolean expressions using `true` and `false` with `clang-tidy` Patch by Richard Thomson with a few other simplifications to fix else-after-returns in the surrounding code. Differential Revision: http://reviews.llvm.org/D8527 llvm-svn: 233005
* Refactor: Simplify boolean expressions in llvm SupportDavid Blaikie2015-03-231-1/+1
| | | | | | | | | | | | | Simplify boolean expressions using `true` and `false` with `clang-tidy` Patch by Richard Thomson - I dropped the parens and != 0 test, for consistency with other patches/tests like this, but I'm open to the notion that we should add the explicit non-zero test in all these sort of cases (non-bool assigned to a bool). Differential Revision: http://reviews.llvm.org/D8526 llvm-svn: 233004
* Refactor: Simplify boolean expressions in x86 targetDavid Blaikie2015-03-233-8/+5
| | | | | | | | | | Simplify boolean expressions with `true` and `false` with `clang-tidy` Patch by Richard Thomson. Differential Revision: http://reviews.llvm.org/D8519 llvm-svn: 233002
* Re-sort includes with sort-includes.py and insert raw_ostream.h where it's used.Benjamin Kramer2015-03-2383-61/+111
| | | | llvm-svn: 232998
* [ctorutils] Update and sort includes. NFC.Benjamin Kramer2015-03-231-1/+2
| | | | llvm-svn: 232995
* [winehprepare] Update and sort includes. NFC.Benjamin Kramer2015-03-231-1/+2
| | | | llvm-svn: 232994
* Another set of missing raw_ostream.h. Still no functional change.Benjamin Kramer2015-03-232-1/+3
| | | | llvm-svn: 232993
* R600/SI: Merge tables for commutingMatt Arsenault2015-03-233-32/+3
| | | | | | | Don't use a separate table for compares anymore, and use the same VOP2_REV class. llvm-svn: 232992
* R600/SI: Only use one range of isCommutable for comparesMatt Arsenault2015-03-231-38/+2
| | | | | | Also don't count the class instructions as isCompare anymore. llvm-svn: 232991
* R600/SI: Remove redundant unsetting of hasSideEffectsMatt Arsenault2015-03-231-2/+0
| | | | | | These are already set in the base class for the instruction. llvm-svn: 232990
OpenPOWER on IntegriCloud