summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Move the EH symbol to the asm printer and use it for the SJLJ case too.Rafael Espindola2015-03-177-35/+12
| | | | llvm-svn: 232475
* [mips] [IAS] Add support for the XOR $reg,imm pseudo-instruction.Toma Tabacu2015-03-171-0/+2
| | | | | | | | | | | | | | | | Summary: This adds a MipsInstAlias which expands to XORi $reg,$reg,imm. For example, "xor $6, 0x3A" should be expanded to "xori $6, $6, 58". This should work for all MIPS ISAs. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8284 llvm-svn: 232473
* Remove dead code. NFC.Rafael Espindola2015-03-172-28/+0
| | | | llvm-svn: 232472
* Replace a use of GetTempSymbol with createTempSymbol.Rafael Espindola2015-03-175-12/+26
| | | | | | This is cleaner and avoids a crash in a corner case. llvm-svn: 232471
* Fix r232466 by adding 'i' to the mappings for inline assembly memory ↵Daniel Sanders2015-03-171-0/+1
| | | | | | | | | constraints. It's not completely clear why 'i' has historically been treated as a memory constraint. According to the documentation, it represents a constant immediate. llvm-svn: 232470
* [ARM] Add support for ARMV6K subtarget (LLVM)Renato Golin2015-03-179-16/+33
| | | | | | | | | | | | | | | | | | | | | ARMv6K is another layer between ARMV6 and ARMV6T2. This is the LLVM side of the changes. ARMV6 family LLVM implementation. +-------------------------------------+ | ARMV6 | +----------------+--------------------+ | ARMV6M (thumb) | ARMV6K (arm,thumb) | <- From ARMV6K and ARMV6M processors +----------------+--------------------+ have support for hint instructions | ARMV6T2 (arm,thumb,thumb2) | (SEV/WFE/WFI/NOP/YIELD). They can +-------------------------------------+ be either real or default to NOP. | ARMV7 (arm,thumb,thumb2) | The two processors also use +-------------------------------------+ different encoding for them. Patch by Vinicius Tinti. llvm-svn: 232468
* [ppc] Distinguish the 'es', 'o', 'm', 'Q', 'Z', and 'Zy' inline assembly ↵Daniel Sanders2015-03-172-14/+36
| | | | | | | | | | | | | | | | | | | | | | | memory constraints. Summary: But still handle them the same way since I don't know how they differ on this target. Of these, 'es', and 'Q' do not have backend tests but are accepted by clang. No functional change intended. Depends on D8173. Reviewers: hfinkel Reviewed By: hfinkel Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8213 llvm-svn: 232466
* Teach Twine to support SmallString.Yaron Keren2015-03-173-23/+15
| | | | | | | | Enable removing .str() member calls for these frequent cases. http://reviews.llvm.org/D6372 llvm-svn: 232465
* [AArch64] Use intermediate step for concat_vectors of illegal truncs.Ahmed Bougacha2015-03-171-0/+31
| | | | | | | | | | | | | | | | | | Optimize concat_vectors of truncated vectors, where the intermediate type is illegal, to avoid said illegality, e.g., (v4i16 (concat_vectors (v2i16 (truncate (v2i64))), (v2i16 (truncate (v2i64))))) -> (v4i16 (truncate (v4i32 (concat_vectors (v2i32 (truncate (v2i64))), (v2i32 (truncate (v2i64))))))) This isn't really target-specific, and, as such, would best go in the DAGCombiner. However, ISD::TRUNCATE legality isn't keyed on both input and result type, so we might generate worse code when we don't know better. On AArch64 we know it's fine for v2i64->v4i16 and v4i32->v8i8. rdar://20022387 llvm-svn: 232459
* [AArch64] Factor out N->getOperand()s; format. NFCI.Ahmed Bougacha2015-03-171-13/+12
| | | | llvm-svn: 232458
* [IRCE] Add a -irce-print-range-checks option.Sanjoy Das2015-03-171-6/+15
| | | | | | | -irce-print-range-checks prints out the set of range checks recognized by IRCE. llvm-svn: 232451
* MapMetadata: Allow unresolved metadata if it won't changeDuncan P. N. Exon Smith2015-03-171-1/+5
| | | | | | | | | Allow unresolved nodes through the `MapMetadata()` if `RF_NoModuleLevelChanges`, since there's no remapping to do anyway. This fixes PR22929. I'll add a clang test as a follow-up. llvm-svn: 232449
* [IRCE] Add comments, NFC.Sanjoy Das2015-03-171-4/+27
| | | | | | | This change adds some comments that justify why a potentially overflowing operation is safe. llvm-svn: 232445
* [IRCE] Support half-range checks.Sanjoy Das2015-03-171-128/+152
| | | | | | | | | | | | This change to IRCE gets it to recognize "half" range checks. Half range checks are range checks that only either check if the index is `slt` some positive integer ("length") or if the index is `sge` `0`. The range solver does not try to be clever / aggressive about solving half-range checks -- it transforms "I < L" to "0 <= I < L" and "0 <= I" to "0 <= I < INT_SMAX". This is safe, but not always optimal. llvm-svn: 232444
* llvm-cov: Warn instead of error if a .gcda has arcs from an exit blockJustin Bogner2015-03-171-1/+3
| | | | | | Patch by Vanderson M. Rosario. Thanks! llvm-svn: 232443
* AsmWriter: Assert on unresolved metadata nodesDuncan P. N. Exon Smith2015-03-171-0/+2
| | | | | | | | | | | | Assert that `MDNode::isResolved()`. While in theory the `Verifier` should catch this, it doesn't descend into all debug info, and the `DebugInfoVerifier` doesn't call into the `Verifier`. Besides, this helps to catch bugs when `-disable-verify=true`. Note that I haven't come across a place where this fails with clang today, so no testcase. llvm-svn: 232442
* GCOV: Make the exit block placement from r223193 optionalJustin Bogner2015-03-161-7/+13
| | | | | | | | By default we want our gcov emission to stay 4.2 compatible, which means we need to continue emit the exit block last by default. We add an option to emit it before the body for users that need it. llvm-svn: 232438
* LowerBitSets: do not use private aliases at all on Darwin.Peter Collingbourne2015-03-161-12/+17
| | | | | | | LLVM currently turns these into linker-private symbols, which can be dead stripped by the Darwin linker. llvm-svn: 232435
* Pass in a "const Triple &T" instead of a raw StringRef.Rafael Espindola2015-03-1610-32/+24
| | | | llvm-svn: 232429
* Remove unused argument. NFC.Rafael Espindola2015-03-169-27/+26
| | | | llvm-svn: 232428
* Add testing for mismatched explicit type on a gep operator when loading from ↵David Blaikie2015-03-161-1/+2
| | | | | | bitcode llvm-svn: 232427
* Add testing for mismatched explicit type on a load instruction when loading ↵David Blaikie2015-03-161-3/+3
| | | | | | from bitcode llvm-svn: 232424
* There is only one Asm streamer, there is no need for targets to register it.Rafael Espindola2015-03-1610-87/+73
| | | | | | | Instead, have the targets register a TargetStreamer to be use with the asm streamer (if any). llvm-svn: 232423
* InstrProf: Fix CoverageMappingReader on big endianJustin Bogner2015-03-161-16/+28
| | | | | | | | This makes the reader check the endianness of the object file its given and behave appropriately. For the test I dug up a really old linker and created a ppc-apple-darwin file for llvm-cov to read. llvm-svn: 232422
* Test bitcode parsing error-handling for incorrect explicit typeDavid Blaikie2015-03-161-2/+8
| | | | | | | | (turns out I had regressed this when sinking handling of this type down into GetElementPtrInst::Create - since that asserted before the error handling was performed) llvm-svn: 232420
* Verifier: Don't call debug info verifier if the module is brokenDuncan P. N. Exon Smith2015-03-161-1/+6
| | | | | | | | | | | | | | | | | | | | If `Verifier` has already found a failure, don't call `DebugInfoVerifier`. The latter sometimes crashes in `DebugInfoFinder` when the former would give a nice message. The only two cases I found it crashing are explicit verifier tests I've added: - test/Verifier/llvm.dbg.declare-expression.ll - test/Verifier/llvm.dbg.value-expression.ll However, I assume frontends with bugs will create invalid IR as well. IMO, the `DebugInfoVerifier` should never crash (instead, it should fail to verify), but subtleties like that will be easier to work out once it's enabled again. This is part of PR22777. llvm-svn: 232418
* AsmWriter: Handle broken metadata nodesDuncan P. N. Exon Smith2015-03-161-2/+2
| | | | | | | Print out temporary `MDNode`s so we don't crash in the verifier (or during `dump()` output). llvm-svn: 232417
* Verifier: Simplify logic in processCallInst(), NFCDuncan P. N. Exon Smith2015-03-161-8/+4
| | | | | | No need for local variables here. llvm-svn: 232413
* IR: Take advantage of -verify checks for MDExpressionDuncan P. N. Exon Smith2015-03-164-13/+4
| | | | | | | | | | | | | | | | | | Now that we check `MDExpression` during `-verify` (r232299), make the `DIExpression` wrapper more strict: - remove redundant checks in `DebugInfoVerifier`, - overload `get()` to `cast_or_null<MDExpression>` (superseding `getRaw()`), - stop checking for null in any accessor, and - remove `DIExpression::Verify()` entirely in favour of `MDExpression::isValid()`. There is still some logic in this class, mostly to do with high-level iterators; I'll defer cleaning up those until the rest of the wrappers are similarly strict. llvm-svn: 232412
* DebugInfo: Simplify logic in DIType::Verify(), NFCDuncan P. N. Exon Smith2015-03-161-18/+20
| | | | | | | | | | Clarify the logic in `DIType::Verify()` by checking `isBasicType()` earlier, by skipping `else` after `return`s, and by documenting an otherwise opaque check. No functionality change. llvm-svn: 232410
* Verifier: Remove unnecessary double-checksDuncan P. N. Exon Smith2015-03-161-4/+0
| | | | | | | | | | | Turns out `visitIntrinsicFunctionCall()` descends into all operands already, so explicitly descending in `visitDbgIntrinsic()` (part of r232296) isn't useful. Updating a testcase that doesn't really need `-verify-debug-info` (since r231082) as confirmation. llvm-svn: 232408
* AsmParser: Stop requiring 'name:' when it's not printedDuncan P. N. Exon Smith2015-03-161-3/+3
| | | | | | | | | r230877 optimized which fields are written out for `CHECK`-ability, but apparently missed changing some of them to optional in `LLParser`. Fixes PR22921. llvm-svn: 232400
* Fix uses of reserved identifiers starting with an underscore followed by an ↵David Blaikie2015-03-1626-129/+103
| | | | | | | | | uppercase letter This covers essentially all of llvm's headers and libs. One or two weird cases I wasn't sure were worth/appropriate to fix. llvm-svn: 232394
* [AsmPrinter] Use the per-function subtarget to emit inline asm instructions thatAkira Hatanaka2015-03-162-28/+15
| | | | | | | | | | are not at the file level. Previously, the default subtarget created from the target triple was used to emit inline asm instructions. Compilation would fail in cases where the feature bits necessary to assemble an inline asm instruction in a function weren't set. llvm-svn: 232392
* Fix doxygen comments from r232268Duncan P. N. Exon Smith2015-03-162-16/+16
| | | | llvm-svn: 232388
* R600/SI: don't try min3/max3/med3 with f64Tom Stellard2015-03-161-0/+1
| | | | | | | | | | There are no opcodes for this. This also adds a test case. v2: make test more robust Patch by: Grigori Goronzy llvm-svn: 232386
* fix comments to match code; NFCSanjay Patel2015-03-161-3/+3
| | | | llvm-svn: 232385
* [MIPS] Fix justify error for small structuresPetar Jovanovic2015-03-161-1/+1
| | | | | | | | | | | | | | | Fix justify error for small structures bigger than 32 bits in fixed arguments for MIPS64 big endian. There was a problem when small structures are passed as fixed arguments. The structures that are bigger than 32 bits but smaller than 64 bits were not left justified properly on MIPS64 big endian. This is fixed by shifting the value to make it left justified when appropriate. Patch by Aleksandar Beserminji. Differential Revision: http://reviews.llvm.org/D8174 llvm-svn: 232382
* Use the i8 immediate cmp instructions when possible.Rafael Espindola2015-03-161-1/+8
| | | | llvm-svn: 232378
* Revert r232374: [hexagon] Distinguish the 'o', 'v', and 'm' inline assembly ↵Daniel Sanders2015-03-162-8/+5
| | | | | | | | memory constraints. 2007-12-17-InvokeAsm.ll fails on the buildbot but not on my own system. Will investigate. llvm-svn: 232376
* Don't repeat names in comments and clang-format this function.Rafael Espindola2015-03-161-7/+10
| | | | llvm-svn: 232375
* [hexagon] Distinguish the 'o', 'v', and 'm' inline assembly memory constraints.Daniel Sanders2015-03-162-5/+8
| | | | | | | | | | | | | | | | | | Summary: But still handle them the same way since I don't know how they differ on this target. No functional change intended. Reviewers: kparzysz, adasgupt Reviewed By: kparzysz, adasgupt Subscribers: colinl, llvm-commits Differential Revision: http://reviews.llvm.org/D8204 llvm-svn: 232374
* Make each target map all inline assembly memory constraints to ↵Daniel Sanders2015-03-1611-0/+67
| | | | | | | | | | | | | | | | | | | InlineAsm::Constraint_m. NFC. Summary: This is instead of doing this in target independent code and is the last non-functional change before targets begin to distinguish between different memory constraints when selecting code for the ISD::INLINEASM node. Next, each target will individually move away from the idea that all memory constraints behave like 'm'. Subscribers: jholewinski, llvm-commits Differential Revision: http://reviews.llvm.org/D8173 llvm-svn: 232373
* [mips] [IAS] Outline NOP creation. NFC.Toma Tabacu2015-03-161-22/+26
| | | | | | | | | | | | | | Summary: Make the code more readable by outlining NOP creation. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8320 llvm-svn: 232371
* Fix build failure on MSVC compilers.Gabor Horvath2015-03-161-3/+2
| | | | llvm-svn: 232368
* [llvm] Replacing asserts with static_asserts where appropriateGabor Horvath2015-03-167-8/+16
| | | | | | | | | | | | | | | | Summary: This patch consists of the suggestions of clang-tidy/misc-static-assert check. Reviewers: alexfh Reviewed By: alexfh Subscribers: xazax.hun, llvm-commits Differential Revision: http://reviews.llvm.org/D8343 llvm-svn: 232366
* asan: fix overflows in isSafeAccessDmitry Vyukov2015-03-161-3/+3
| | | | | | | | | As pointed out in http://reviews.llvm.org/D7583 The current checks can cause overflows when object size/access offset cross Quintillion bytes. http://reviews.llvm.org/D8193 llvm-svn: 232358
* One more try with unused.Michael Gottesman2015-03-161-1/+2
| | | | llvm-svn: 232357
* Add in an unreachable after a covered switch to appease certain bots.Michael Gottesman2015-03-161-0/+1
| | | | llvm-svn: 232356
* Remove a used that snuck in that seems to be triggering the MSVC buildbots.Michael Gottesman2015-03-161-2/+1
| | | | llvm-svn: 232355
OpenPOWER on IntegriCloud