summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix an issue in the verifier where we could try to read information out of a ↵Owen Anderson2015-03-101-1/+5
| | | | | | | | | | malformed statepoint intrinsic. In this situation we would always have already flagged an error on the statepoint intrinsic, but then we carry on to parse other, related GC intrinsics, and could end up crashing during that verification when they try to access data from the malformed statepoint. llvm-svn: 231759
* Fix an infinite loop in InstCombine when an instruction with no users and ↵Owen Anderson2015-03-101-0/+4
| | | | | | | | | | | side effects can be constant folded. ReplaceInstUsesWith needs to return nullptr when the input has no users, because in that case it does not mutate the program. Otherwise, we can get stuck in an infinite loop of repeatedly attempting to constant fold and instruction with no users. llvm-svn: 231755
* Move variable into assert to fix -Asserts builds.Rafael Espindola2015-03-101-4/+2
| | | | llvm-svn: 231753
* Remove incredibly confusing isBaseAddressKnownZero.Rafael Espindola2015-03-102-4/+2
| | | | | | | | | | | | | | | When referring to a symbol in a dwarf section on ELF we should use .long foo instead of .long foo - .debug_something because ELF is unaware of the content of the sections and therefore needs relocations. This has nothing to do with optimizing a -0. llvm-svn: 231751
* Use a better name for compile unit labels.Rafael Espindola2015-03-102-3/+1
| | | | | | | | | | | | | They mark the start of a compile unit, so name them .Lcu_*. Using Section->getLabelBeginName() makes it looks like they mark the start of the section. While at it, switch to createTempSymbol to avoid collisions with labels created in inline assembly. Not sure if a "don't crash" test is worth it. With this getLabelBeginName is dead, delete it. llvm-svn: 231750
* removed function names from comments; NFCSanjay Patel2015-03-101-10/+10
| | | | llvm-svn: 231749
* DwarfAccelTable: remove unneeded bucket terminators.Frederic Riss2015-03-101-2/+3
| | | | | | | | | | | Last commit fixed the handling of hash collisions, but it introdcuced unneeded bucket terminators in some places. The generated table was correct, it can just be a tiny bit smaller. As the previous table was correct, the test doesn't need updating. If we really wanted to test this, I could add the section size to the dwarf dump and test for a precise value there. IMO the correctness test is sufficient. llvm-svn: 231748
* use range-based for loops; NFCSanjay Patel2015-03-101-12/+9
| | | | llvm-svn: 231747
* Move label creation close to emission. NFC.Rafael Espindola2015-03-104-12/+10
| | | | llvm-svn: 231744
* Added ConstantExpr support to CFLAA.George Burgess IV2015-03-101-40/+143
| | | | | | | | CFLAA didn't know how to properly handle ConstantExprs; it would silently ignore them. This was a problem if the ConstantExpr is, say, a GEP of a global, because CFLAA wouldn't realize that there's a global there. :) llvm-svn: 231743
* Added special handling for inttoptr in CFLAA.George Burgess IV2015-03-101-10/+22
| | | | | | | | | | We now treat pointers given to ptrtoint and pointers retrieved from inttoptr as similar to arguments or globals (can alias anything, etc.) This solves some of the problems we were having with giving incorrect results. llvm-svn: 231741
* DataLayout is mandatory, update the API to reflect it with references.Mehdi Amini2015-03-10112-2673/+2320
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Now that the DataLayout is a mandatory part of the module, let's start cleaning the codebase. This patch is a first attempt at doing that. This patch is not exactly NFC as for instance some places were passing a nullptr instead of the DataLayout, possibly just because there was a default value on the DataLayout argument to many functions in the API. Even though it is not purely NFC, there is no change in the validation. I turned as many pointer to DataLayout to references, this helped figuring out all the places where a nullptr could come up. I had initially a local version of this patch broken into over 30 independant, commits but some later commit were cleaning the API and touching part of the code modified in the previous commits, so it seemed cleaner without the intermediate state. Test Plan: Reviewers: echristo Subscribers: llvm-commits From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 231740
* [sanitizer] fix instrumentation with -mllvm ↵Kostya Serebryany2015-03-101-7/+10
| | | | | | -sanitizer-coverage-block-threshold=0 to actually do something useful. llvm-svn: 231736
* [sanitizer] decrease sanitizer-coverage-block-threshold from 1000 to 500 as ↵Kostya Serebryany2015-03-101-1/+1
| | | | | | another horrible workaround for PR17409 llvm-svn: 231733
* DwarfAccelTable: Fix handling of hash collisions.Frederic Riss2015-03-101-5/+35
| | | | | | | | | | | | | | | | | It turns out accelerator tables where totally broken if they contained entries with colliding hashes. The failure mode is pretty bad, as it not only impacted the colliding entries, but would basically make all the entries after the first hash collision pointing in the wrong place. The testcase uses the symbol names that where found to collide during a clang build. From a performance point of view, the patch adds a sort and a linear walk over each bucket contents. While it has a measurable impact on the accelerator table emission, it's not showing up significantly in clang profiles (and I'd argue that correctness is priceless :-)). llvm-svn: 231732
* Temporarily revert r231726 and r231724 as they're breaking the build.:Eric Christopher2015-03-105-46/+57
| | | | | | | | | | | | | | | | | | | Author: Lang Hames <lhames@gmail.com> Date: Mon Mar 9 23:51:09 2015 +0000 [Orc][MCJIT][RuntimeDyld] Add header that was accidentally left out of r231724. Author: Lang Hames <lhames@gmail.com> Date: Mon Mar 9 23:44:13 2015 +0000 [Orc][MCJIT][RuntimeDyld] Add symbol flags to symbols in RuntimeDyld. Thread the new types through MCJIT and Orc. In particular, add a 'weak' flag. When plumbed through RTDyldMemoryManager, this will allow us to distinguish between weak and strong definitions and find the right ones during symbol resolution. llvm-svn: 231731
* Remove an unused variable.Eric Christopher2015-03-101-1/+0
| | | | llvm-svn: 231730
* Don't treat .foo as two path components in path::iteratorsBen Langmuir2015-03-101-7/+0
| | | | | | | We were treating '/.foo' as ['/', '.', 'foo'] instead of ['/', '.foo'], which lead to insanity. Same for '..'. llvm-svn: 231727
* [Orc][MCJIT][RuntimeDyld] Add symbol flags to symbols in RuntimeDyld. Thread theLang Hames2015-03-095-57/+46
| | | | | | | | | | new types through MCJIT and Orc. In particular, add a 'weak' flag. When plumbed through RTDyldMemoryManager, this will allow us to distinguish between weak and strong definitions and find the right ones during symbol resolution. llvm-svn: 231724
* [Hexagon] Removing unused patterns.Colin LeMahieu2015-03-091-61/+0
| | | | llvm-svn: 231723
* LLParser: gep: Simplify parsing error handlingDavid Blaikie2015-03-091-10/+4
| | | | llvm-svn: 231722
* [CodeGen] Replace the reused stores' chain for extractelt expansion.Ahmed Bougacha2015-03-091-6/+20
| | | | | | | | | | | | | | | | | | This fixes a subtle issue that was introduced in r205153. When reusing a store for the extractelement expansion (to load directly from it, inserting of going through the stack), later stores to the same location might have overwritten the data we were expecting to extract from. To fix that, we need to explicitly replace the chain going out of the reused store, so that later stores also have an explicit dependency on the generated element-extracting loads, and can't clobber them. rdar://20066785 Differential Revision: http://reviews.llvm.org/D8180 llvm-svn: 231721
* Reland r229944: EH: Prune unreachable resume instructions during Dwarf EH ↵Reid Kleckner2015-03-093-22/+124
| | | | | | | | | | | | preparation Fix the double-deletion of AnalysisResolver when delegating through to Dwarf EH preparation by creating one from scratch. Hopefully the new pass manager simplifies this. This reverts commit r229952. llvm-svn: 231719
* Use a MapVector instead of an extra sort.Rafael Espindola2015-03-091-23/+8
| | | | | | This also has the advantage of not depending on the brittle getLabelBeginName. llvm-svn: 231714
* [Hexagon] Use single tailcall pseudoinst and fix checking for label jumping ↵Colin LeMahieu2015-03-094-15/+42
| | | | | | versus tail calling. llvm-svn: 231713
* [Hexagon] Reapply r231699. Remove assumption that second operand is an ↵Colin LeMahieu2015-03-094-144/+20
| | | | | | immediate when checking if A2_tfrsi is combinable. llvm-svn: 231710
* [SCEV] Unify getUnsignedRange and getSignedRangeSanjoy Das2015-03-091-209/+126
| | | | | | | | | | | | | | | | | | | | | | Summary: This removes some duplicated code, and also helps optimization: e.g. in the test case added, `%idx ULT 128` in `@x` is not currently optimized to `true` by `-indvars` but will be, after this change. The only functional change in ths commit is that for add recurrences, ScalarEvolution::getRange will be more aggressive -- computing the unsigned (resp. signed) range for a SCEVAddRecExpr will now look at the NSW (resp. NUW) bits and check for signed (resp. unsigned) overflow. This can be a strict improvement in some cases (such as the attached test case), and should be no worse in other cases. Reviewers: atrick, nlewycky Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8142 llvm-svn: 231709
* [SCEV] Add a `scalar-evolution-print-constant-ranges' optionSanjoy Das2015-03-091-0/+12
| | | | | | | | | | | | | | Summary: Unused in this commit, but will be used in a subsequent change (D8142) by a FileCheck test. Reviewers: atrick Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8143 llvm-svn: 231708
* [Hexagon] Reverting r231699Colin LeMahieu2015-03-092-5/+138
| | | | llvm-svn: 231703
* DwarfAccelTable: fix obvious typo.Frederic Riss2015-03-091-1/+1
| | | | | | | | | | | | I have a test for that issue, but I didn't include it in the commit as it's a 200KB file for a pretty minor issue. (The reason the file is so big is that it needs > 1024 variables/functions to trigger and that with debug information. The issue/fix on the other side is totally trivial. If poeple want the test commited, I can do that. It just didn't seem worth it to me. llvm-svn: 231701
* [Hexagon] Updating constant set to simpler versions.Colin LeMahieu2015-03-092-138/+5
| | | | llvm-svn: 231699
* TableGen: Use 'enum : uint64_t' for feature flags to fix -WmicrosoftReid Kleckner2015-03-094-0/+7
| | | | | | | | | | | | | clang-cl would warn that this value is not representable in 'int': enum { FeatureX = 1ULL << 31 }; All MS enums are 'ints' unless otherwise specified, so we have to use an explicit type. The AMDGPU target just hit 32 features, triggering this warning. Now that we have C++11 strong enum types, we can also eliminate the 'const uint64_t' codepath from tablegen and just use 'enum : uint64_t'. llvm-svn: 231697
* Remove the remaining uses of abs64 and nuke it.Benjamin Kramer2015-03-096-12/+12
| | | | | | std::abs works just fine and we're already using it in many places. NFC intended. llvm-svn: 231696
* [Hexagon] Removing old halfword codegen instructions and updating const32/64 ↵Colin LeMahieu2015-03-093-67/+62
| | | | | | splitting. llvm-svn: 231695
* Don't prime the section map.Rafael Espindola2015-03-091-3/+0
| | | | | | | This was just creating unused labels for .text when the module had no functions. llvm-svn: 231694
* [Hexagon] Eliminating immediate condition set.Colin LeMahieu2015-03-095-189/+4
| | | | llvm-svn: 231693
* [Hexagon] Removing TFR_condset_ir/TFR_condset_ri modeling.Colin LeMahieu2015-03-094-64/+0
| | | | llvm-svn: 231689
* [Hexagon] Changing AddrFI back to ADDRri to address test issue.Colin LeMahieu2015-03-091-2/+2
| | | | llvm-svn: 231687
* InstrProf: Allow hexadecimal function hashes in proftext formatJustin Bogner2015-03-091-1/+1
| | | | llvm-svn: 231685
* R600/SI: Move gds operand to the end of operand listTom Stellard2015-03-095-34/+44
| | | | | | Also print it in the assembly string. llvm-svn: 231684
* R600/SI: Refactor DS instruction defsTom Stellard2015-03-093-188/+130
| | | | llvm-svn: 231683
* Delete dead code. NFC.Rafael Espindola2015-03-091-1/+0
| | | | llvm-svn: 231682
* Add support for Nuxi CloudABI.Ed Schouten2015-03-092-0/+3
| | | | | | | | | | | | | | CloudABI is a POSIX-like runtime environment built around the concept of capability-based security. More details: https://github.com/NuxiNL/cloudlibc CloudABI uses its own ELFOSABI number. This number has been allocated by the maintainers of ELF a couple of days ago. Reviewed by: echristo llvm-svn: 231681
* Drop the hacks used for partial C99 math libraries.Benjamin Kramer2015-03-095-99/+0
| | | | | | All supported platforms have half-way decent C99 support. llvm-svn: 231679
* [Hexagon] Adding PackHL nodes and some missing modeling instructions and ↵Colin LeMahieu2015-03-092-8/+54
| | | | | | patterns llvm-svn: 231678
* Print jump tables before exception tables.Rafael Espindola2015-03-095-32/+49
| | | | | | | | | | | In the case where just tables are part of the function section, this produces more readable assembly by avoiding switching to the eh section and back to .text. This would also break with non unique section names, as trying to switch to a unique section actually creates a new one. llvm-svn: 231677
* Don't repeat name in comment. NFC.Rafael Espindola2015-03-091-18/+12
| | | | llvm-svn: 231676
* Remove dummy method implementations.Rafael Espindola2015-03-092-26/+0
| | | | | | | These are pure virtual in the base class, so the compiler checks that they are implemented. llvm-svn: 231673
* Add logical ops to Mips fast-iselReed Kotler2015-03-091-1/+89
| | | | | | | | | | | | | | | | | | | | | | Summary: Code is mostly copied from AArch64 port and modified where needed for Mips. This handles the "non" legal cases of logical ops. Legal cases are handled by tablegen patterns. Test Plan: Make check test logopm.ll All of test-suite passes at O0/O2 and mips32 r1/r2 with this new change. Reviewers: dsanders Reviewed By: dsanders Subscribers: echristo, llvm-commits, aemerson, rfuhler Differential Revision: http://reviews.llvm.org/D6599 llvm-svn: 231665
* Make helper functions static.Benjamin Kramer2015-03-093-11/+11
| | | | | | Found by -Wmissing-prototypes. NFC. llvm-svn: 231664
OpenPOWER on IntegriCloud