summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [libFuzzer] add -merge flag to merge corporaKostya Serebryany2015-10-246-0/+73
| | | | llvm-svn: 251168
* Fix ADT/UniqueVector.h to resolve implicit dependency.NAKAMURA Takumi2015-10-241-0/+1
| | | | llvm-svn: 251165
* llvm/module.modulemap: AVR.def should be textual header.NAKAMURA Takumi2015-10-241-0/+1
| | | | llvm-svn: 251163
* AMDGPU: Print modifiers when dumping AMDGPUOperandMatt Arsenault2015-10-241-1/+1
| | | | llvm-svn: 251160
* [RS4GC] Rename stripDereferenceabilityInfo into stripNonValidAttributes.Igor Laevsky2015-10-231-18/+18
| | | | llvm-svn: 251157
* Add a RAW mode to StringTableBuilder.Rafael Espindola2015-10-238-28/+44
| | | | | | | | | | | | In this mode it just tries to tail merge the strings without imposing any other format constrains. It will not, for example, add a null byte between them. Also add support for keeping a tentative size and offset if we decide to not optimize after all. This will be used shortly in lld for merging SHF_STRINGS sections. llvm-svn: 251153
* Revert rL251061 [SimplifyCFG] Extend SimplifyResume to handle phi of trivial ↵Chen Li2015-10-232-107/+11
| | | | | | landing pad. llvm-svn: 251149
* Handle non-constant shifts in computeKnownBits, and use computeKnownBits for ↵Hal Finkel2015-10-237-40/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | constant folding in InstCombine/Simplify First, the motivation: LLVM currently does not realize that: ((2072 >> (L == 0)) >> 7) & 1 == 0 where L is some arbitrary value. Whether you right-shift 2072 by 7 or by 8, the lowest-order bit is always zero. There are obviously several ways to go about fixing this, but the generic solution pursued in this patch is to teach computeKnownBits something about shifts by a non-constant amount. Previously, we would give up completely on these. Instead, in cases where we know something about the low-order bits of the shift-amount operand, we can combine (and together) the associated restrictions for all shift amounts consistent with that knowledge. As a further generalization, I refactored all of the logic for all three kinds of shifts to have this capability. This works well in the above case, for example, because the dynamic shift amount can only be 0 or 1, and thus we can say a lot about the known bits of the result. This brings us to the second part of this change: Even when we know all of the bits of a value via computeKnownBits, nothing used to constant-fold the result. This introduces the necessary code into InstCombine and InstSimplify. I've added it into both because: 1. InstCombine won't automatically pick up the associated logic in InstSimplify (InstCombine uses InstSimplify, but not via the API that passes in the original instruction). 2. Putting the logic in InstCombine allows the resulting simplifications to become part of the iterative worklist 3. Putting the logic in InstSimplify allows the resulting simplifications to be used by everywhere else that calls SimplifyInstruction (inlining, unrolling, and many others). And this requires a small change to our definition of an ephemeral value so that we don't break the rest case from r246696 (where the icmp feeding the @llvm.assume, is also feeding a br). Under the old definition, the icmp would not be considered ephemeral (because it is used by the br), but this causes the assume to remove itself (in addition to simplifying the branch structure), and it seems more-useful to prevent that from happening. llvm-svn: 251146
* GVN: don't try to replace instruction with itself.Tim Northover2015-10-232-5/+40
| | | | | | | | | | | After some look-ahead PRE was added for GEPs, an instruction could end up in the table of candidates before it was actually inspected. When this happened the pass might decide it was the best candidate to replace itself. This didn't go well. Should fix PR25291 llvm-svn: 251145
* Fix the variable names to match the LLVM style.Rafael Espindola2015-10-232-30/+30
| | | | llvm-svn: 251143
* [SCEV] Fix stylistic issue in MatchBinaryAddToConst; NFCISanjoy Das2015-10-231-1/+1
| | | | | | | | | | Instead of checking `(FlagsPresent & ExpectedFlags) != 0`, check `(FlagsPresent & ExpectedFlags) == ExpectedFlags`. Right now they're equivalent since `ExpectedFlags` can only be either `FlagNUW` or `FlagNSW`, but if we ever pass in `ExpectedFlags` as `FlagNUW | FlagNSW` then checking `(FlagsPresent & ExpectedFlags) != 0` would be wrong. llvm-svn: 251142
* [Inliner] Don't inline through callsites with operand bundlesSanjoy Das2015-10-232-0/+21
| | | | | | | | | | | | | | | | Summary: This change teaches the LLVM inliner to not inline through callsites with unknown operand bundles. Currently all operand bundles are "unknown" operand bundles but in the near future we will add support for inlining through some select kinds of operand bundles. Reviewers: reames, chandlerc, majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14001 llvm-svn: 251141
* [CMake] Fixing dependency issue with parallel make when building with ↵Chris Bieneman2015-10-231-1/+8
| | | | | | | | LLVM_OPTIMIZED_TABLEGEN. Patch by Alex Wang llvm-svn: 251138
* [X86] Clean up the tail call eligibility logicReid Kleckner2015-10-232-32/+78
| | | | | | | | | | | | | | | | | | | Summary: The logic here isn't straightforward because our support for TargetOptions::GuaranteedTailCallOpt. Also fix a bug where we were allowing tail calls to cdecl functions from fastcall and vectorcall functions. We were special casing thiscall and stdcall callers rather than checking for any convention that requires clearing stack arguments before returning. Reviewers: hans Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14024 llvm-svn: 251137
* [RuntimeDyld][COFF] Fix a think-o in the handling of the IMAGE_REL_AMD64_ADDR64Lang Hames2015-10-232-1/+7
| | | | | | relocation that was introduced in r250733. llvm-svn: 251135
* [libFuzzer] remove some old code; also make ↵Kostya Serebryany2015-10-234-13/+4
| | | | | | __sanitizer_get_total_unique_caller_callee_pairs weak so that newer libFuzzer works with older asan llvm-svn: 251133
* AMDGPU: Fix parsing of 32-bit literals with sign bit setMatt Arsenault2015-10-234-5/+31
| | | | llvm-svn: 251132
* Fix another reference to in-source buildsJonathan Roelofs2015-10-231-9/+8
| | | | llvm-svn: 251127
* [ARM] Renaming +t2dsp feature into +dsp, as discussed on llvm-devArtyom Skrobov2015-10-236-13/+13
| | | | llvm-svn: 251125
* [ARM CodeGen] @llvm.debugtrap call may be removed when restoring callee ↵Oleg Ranevskyy2015-10-232-1/+22
| | | | | | | | | | | | | | | | | saved registers Summary: When ARMFrameLowering::emitPopInst generates a "pop" instruction to restore the callee saved registers, it checks if the LR register is among them. If so, the function may decide to remove the basic block's terminator and replace it with a "pop" to the PC register instead of LR. This leads to a problem when the block's terminator is preceded by a "llvm.debugtrap" call. The MI iterator points to the trap in such a case, which is also a terminator. If the function decides to restore LR to PC, it erroneously removes the trap. Reviewers: asl, rengolin Subscribers: aemerson, jfb, rengolin, dschuff, llvm-commits Differential Revision: http://reviews.llvm.org/D13672 llvm-svn: 251123
* Test commit: fix typo in comment.Oleg Ranevskyy2015-10-232-2/+2
| | | | llvm-svn: 251122
* [llvm-readobj] Don't cast qualifiers away. Now gcc is happy again.Davide Italiano2015-10-231-7/+8
| | | | | | Reported by: mikael.holmen at ericsson.com llvm-svn: 251117
* [CodeGen] Mark setjmp/catchret MBBs address-takenJoseph Tremoulet2015-10-239-19/+103
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This ensures that BranchFolding (and similar) won't remove these blocks. Also allow AsmPrinter::EmitBasicBlockStart to process MBBs which are address-taken but do not have BBs that are address-taken, since otherwise its call to getAddrLabelSymbolTableToEmit would fail an assertion on such blocks. I audited the other callers of getAddrLabelSymbolTableToEmit (and getAddrLabelSymbol); they all have BBs known to be address-taken except for the call through getAddrLabelSymbol from WinException::create32bitRef; that call is actually now unreachable, so I've removed it and updated the signature of create32bitRef. This fixes PR25168. Reviewers: majnemer, andrew.w.kaylor, rnk Subscribers: pgavlin, llvm-commits Differential Revision: http://reviews.llvm.org/D13774 llvm-svn: 251113
* [BasicAA] Bugfix for r251016James Molloy2015-10-232-2/+19
| | | | | | | | If the loaded type sizes don't match the element type of the sequential type, all bets are off and the addresses may, indeed, overlap. Surprisingly, this just got caught in one test, on one builder, out of the 30+ builders testing this change. Congratulations go to http://lab.llvm.org:8011/builders/clang-aarch64-lnt/builds/5205. llvm-svn: 251112
* Revert "[AArch64]Merge halfword loads into a 32-bit load"James Molloy2015-10-232-264/+45
| | | | | | This reverts commit r250719. This introduced a codegen fault in SPEC2000.gcc, when compiled for Cortex-A53. llvm-svn: 251108
* [SCEV] Get rid of an unnecessary lambda; NFCSanjoy Das2015-10-231-11/+9
| | | | llvm-svn: 251099
* [mips][microMIPS] Implement SHLL.PH, SHLL_S.PH, SHLL.QB, SHLLV.PH, ↵Zlatko Buljan2015-10-237-32/+146
| | | | | | | | SHLLV_S.PH, SHLLV.QB, SHLLV_S.W, SHLL_S.W, SHRA.QB and SHRA_R.QB instructions Differential Revision: http://reviews.llvm.org/D13929 llvm-svn: 251098
* [SCEV] Fix a latent bug in `getPreStartForExtend`Sanjoy Das2015-10-231-1/+3
| | | | | | | | | | | | | | | | | | I could not come up a way to test this -- I think this bug is latent today, and will not actually result in a miscompile. In `getPreStartForExtend`, SCEV constructs `PreStart` as a sum of all of `SA`'s operands except `Op`. It also uses `SA`'s no-wrap flags, and this is problematic because removing an element from an add expression can make it signed-wrap. E.g. if `SA` was `(127 + 1 + -1)`, then it could safely be `<nsw>` (since `sext(127) + sext(1) + sext(-1)` == `sext(127 + 1 + -1)`), but `(127 + 1)` (== `PreStart` if `Op` is `-1`) is not `<nsw>`. Transferring `<nuw>` from `SA` to `PreStart` is safe, as far as I can tell. llvm-svn: 251097
* [AVR] Add ELF constants to headersDylan McKay2015-10-236-0/+152
| | | | | | | | Also adds a 'trivial' ELF file. This was generated by assembling and linking a file with the symbol main which contains a single return instruction. llvm-svn: 251096
* Support, IR: silence -Wunused-parameterSaleem Abdulrasool2015-10-233-4/+4
| | | | | | If this is used outside of LLVM with -Werror, this would cause a failure. llvm-svn: 251094
* Add more intrumentation/runtime helper interfaces (NFC)Xinliang David Li2015-10-232-25/+72
| | | | | | | | | | | This patch converts the remaining references to literal strings for names of profile runtime entites (such as profile runtime hook, runtime hook use function, profile init method, register function etc). Also added documentation for all the new interfaces. llvm-svn: 251093
* [LangRef] Fix the doc for operand bundlesSanjoy Das2015-10-231-8/+0
| | | | | | | I accidentally messed this up after a merge conflict in a previous commit. llvm-svn: 251089
* SLPVectorizer: AllSameOpcode* starts "true" only for instructionsMehdi Amini2015-10-231-3/+4
| | | | | | | r251085 wasn't as NFC as intended... From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 251087
* SLPVectorizer: refactor reorderInputsAccordingToOpcode (NFC)Mehdi Amini2015-10-231-52/+81
| | | | | | | This is intended to simplify the changes needed to solve PR25247. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 251085
* [CodeGen] Remove usage of NDEBUG in header.Davide Italiano2015-10-232-12/+0
| | | | | | Moreover, this seems unused. llvm-svn: 251081
* [libFuzzer] use the indirect caller-callee counter as an independent search ↵Kostya Serebryany2015-10-227-1/+79
| | | | | | heuristic llvm-svn: 251078
* [libFuzzer] more refactoring the code that checks the coverage. NFCKostya Serebryany2015-10-222-8/+9
| | | | llvm-svn: 251075
* [libFuzzer] refactoring the code that checks the coverage. NFCKostya Serebryany2015-10-222-33/+43
| | | | llvm-svn: 251074
* Minor bug fix in Profile Name Prefix interfaceXinliang David Li2015-10-221-1/+1
| | | | | | Exposed in uses by clang FE. llvm-svn: 251070
* [libFuzzer] remove the deprecated 'tokens' featureKostya Serebryany2015-10-227-99/+8
| | | | llvm-svn: 251069
* LoopPass: Remove redoLoop, it isn't used. NFCJustin Bogner2015-10-222-19/+0
| | | | | | | | In r251064 I removed a logically unreachable call to `redoLoop`, and now there aren't any callers of this API at all. Remove the needless complexity. llvm-svn: 251067
* LoopPass: Simplify the API for adding a new loop. NFCJustin Bogner2015-10-223-38/+25
| | | | | | | The insertLoop() API is only used to add new loops, and has confusing ownership semantics. Simplify it by replacing it with addLoop(). llvm-svn: 251064
* [SimplifyCFG] Extend SimplifyResume to handle phi of trivial landing pad.Chen Li2015-10-222-11/+107
| | | | | | | | | | | | Summary: Currently SimplifyResume can convert an invoke instruction to a call instruction if its landing pad is trivial. In practice we could have several invoke instructions with trivial landing pads and share a common rethrow block, and in the common rethrow block, all the landing pads join to a phi node. The patch extends SimplifyResume to check the phi of landing pad and their incoming blocks. If any of them is trivial, remove it from the phi node and convert the invoke instruction to a call instruction. Reviewers: hfinkel, reames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13718 llvm-svn: 251061
* Add helper functions and remove hard coded references to instProf related ↵Xinliang David Li2015-10-223-14/+50
| | | | | | | | | | | | name/name-prefixes This is a clean up patch that defines instr prof section and variable name prefixes in a common header with access helper functions. clang FE change will be done as a follow up once this patch is in. Differential Revision: http://reviews.llvm.org/D13919 llvm-svn: 251058
* [Sink] Don't check BB.empty()David Majnemer2015-10-221-1/+1
| | | | | | | | As an invariant, BasicBlocks cannot be empty when passed to a transform. This is not the case for MachineBasicBlocks and the Sink pass was ported from the MachineSink pass which would explain the check's existence. llvm-svn: 251057
* [ASan] Enable instrumentation of dynamic allocas by default.Alexey Samsonov2015-10-221-1/+1
| | | | llvm-svn: 251056
* [SCEV] Remove a test case added in r249168Sanjoy Das2015-10-221-37/+7
| | | | | | | | | | The test case wasn't testing what it was commented to be testing; and when I tried to fix the test I noticed that SCEV does not support the simplification that the test was supposed to test. This change removes the test case to avoid confusion. llvm-svn: 251053
* [SCEV] Commute zero extends through <nuw> additionsSanjoy Das2015-10-222-0/+49
| | | | llvm-svn: 251052
* [SCEV] Opportunistically interpret unsigned constraints as signedSanjoy Das2015-10-224-0/+87
| | | | | | | | | | | | | | | Summary: An unsigned comparision is equivalent to is corresponding signed version if both the operands being compared are positive. Teach SCEV to use this fact when profitable. Reviewers: atrick, hfinkel, reames, nlewycky Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13687 llvm-svn: 251051
* [SCEV] Teach SCEV some axioms about non-wrapping arithmeticSanjoy Das2015-10-223-2/+124
| | | | | | | | | | | | | | | | | | | Summary: - A s< (A + C)<nsw> if C > 0 - A s<= (A + C)<nsw> if C >= 0 - (A + C)<nsw> s< A if C < 0 - (A + C)<nsw> s<= A if C <= 0 Right now `C` needs to be a constant, but we can later generalize it to be a non-constant if needed. Reviewers: atrick, hfinkel, reames, nlewycky Subscribers: sanjoy, llvm-commits Differential Revision: http://reviews.llvm.org/D13686 llvm-svn: 251050
OpenPOWER on IntegriCloud