summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Teach SimplifyCFG about address spacesMatt Arsenault2013-10-211-5/+9
| | | | llvm-svn: 193104
* Fix creating bitcasts between address spaces in SCEV.Matt Arsenault2013-10-211-5/+10
| | | | | | | | The test before wasn't successfully testing this since it was missing the datalayout piece to change the size of the second address space. llvm-svn: 193102
* Remove unused SCEV functionsMatt Arsenault2013-10-211-20/+1
| | | | llvm-svn: 193097
* X86 vector element shift-by-immediate instructions take i8 immediates. MakeLang Hames2013-10-213-60/+73
| | | | | | | | | | | | | | the instruction defenitions and ISEL reflect this. Prior to this patch these instructions took an i32i8imm, and the high bits were dropped during encoding. This led to incorrect behavior for shifts by immediates higher than 255. This patch fixes that issue by detecting large immediate shifts and returning constant zero (for logical shifts) or capping the shift amount at an encodable value (for arithmetic shifts). Fixes <rdar://problem/14968098> llvm-svn: 193096
* Fix up some old review feedback.Eric Christopher2013-10-211-2/+3
| | | | llvm-svn: 193095
* Improving MCJIT/RuntimeDyld thread safetyAndrew Kaylor2013-10-214-12/+40
| | | | llvm-svn: 193094
* DebugInfo: Put each kind of constant (form, attribute, tag, etc) into its ↵David Blaikie2013-10-215-185/+208
| | | | | | | | | | | own enum for ease of use. This allows various variables to be more self-documenting and easier to debug by being of specific types without overlapping enum values. Precommit review by Eric Christopher. llvm-svn: 193091
* Optimize more linkonce_odr values during LTO.Rafael Espindola2013-10-214-210/+200
| | | | | | | | | | | When a linkonce_odr value that is on the dso list is not unnamed_addr we can still look to see if anything is actually using its address. If not, it is safe to hide it. This patch implements that by moving GlobalStatus to Transforms/Utils and using it in Internalize. llvm-svn: 193090
* DebugInfo: Hash DW_FORM_GNU_str_index as a string.David Blaikie2013-10-211-1/+3
| | | | | | | | | | Found while adding type safety to the various DWARF enumerations (form, attribute, tag, etc) that caused Clang to warn on an incompletely covered switch. Converting the comment to a default/unreachable uncovered this case of an unsupported form encoding. Seems we were skipping fission strings entirely. llvm-svn: 193089
* AVX-512: MUL operation lowering for v8i64Elena Demikhovsky2013-10-211-3/+4
| | | | llvm-svn: 193083
* [mips][msa] Direct Object Emission support for LD/ST instructions.Matheus Almeida2013-10-213-24/+56
| | | | llvm-svn: 193082
* [mips][msa] Direct Object Emission support for LDI instructions.Matheus Almeida2013-10-212-8/+13
| | | | llvm-svn: 193081
* [mips][msa] Direct Object Emission support for MOVE.v.Matheus Almeida2013-10-212-2/+7
| | | | llvm-svn: 193080
* [mips][msa] Direct Object Emission support for CTCMSA and CFCMSA. Matheus Almeida2013-10-215-14/+137
| | | | | | | | These instructions are logically related as they allow read/write of MSA control registers. Currently MSA control registers are emitted by number but hopefully that will change as soon as GAS starts accepting them by name as that would make the assembly easier to read. llvm-svn: 193078
* [mips][msa] Direct Object Emission of SPLAT instruction.Matheus Almeida2013-10-211-12/+16
| | | | llvm-svn: 193077
* [mips][msa] Fix definition of SLD instruction.Matheus Almeida2013-10-212-8/+36
| | | | | | | The second parameter of the SLD intrinsic is the number of columns (GPR) to slide left the source array. llvm-svn: 193076
* Fix the predecessor removal logic in r193045.Michael Gottesman2013-10-211-11/+9
| | | | | | Additionally some small comment/stylistic fixes are included as well. llvm-svn: 193068
* Don't eliminate a partially redundant load if it's in a landing pad.Bill Wendling2013-10-212-15/+7
| | | | | | | | | | | | A landing pad can be jumped to only by the unwind edge of an invoke instruction. If we eliminate a partially redundant load in a landing pad, it will create a basic block that violates this constraint. It then leads to other problems down the line if it tries to merge that basic block with the landing pad. Avoid this by not eliminating the load in a landing pad. PR17621 llvm-svn: 193064
* Teach simplify-cfg how to correctly create covered lookup tables for ↵Michael Gottesman2013-10-201-6/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | switches on iN with N >= 3. One optimization simplify-cfg performs is the converting of switches to lookup tables if the switch has > 4 cases. This is done by: 1. Finding the max/min case value and calculating the switch case range. 2. Create a lookup table basic block. 3. Perform a check in the switch's BB to see if the input value is in the switch's case range. If the input value satisfies said predicate branch to the lookup table BB, otherwise branch to the switch's default destination BB using the default value as the result. The conditional check consists of subtracting the min case value of the table from any input iN value and then ensuring that said value is unsigned less than the size of the lookup table represented as an iN value. If the lookup table is a covered lookup table, the size of the table will be N which is 0 as an iN value. Thus the comparison will be an `icmp ult` of an iN value against 0 which is always false yielding the incorrect result. This patch fixes this problem by recognizing if we have a covered lookup table and if we do, unconditionally jumps to the lookup table BB since the covering property of the lookup table implies no input values could not be handled by said BB. rdar://15268442 llvm-svn: 193045
* Emit prefix data after debug and EH directives.Peter Collingbourne2013-10-201-4/+4
| | | | | | | | | This ensures that the prefix data is treated as part of the function for the purpose of debug info. This provides a better debugging experience, among other things by allowing a debug info client to correctly look up a function in debug info given a function pointer. llvm-svn: 193042
* Emit DWARF line entries for all data in the instruction stream.Peter Collingbourne2013-10-201-0/+1
| | | | | | | r182712 attempted to do this, but it failed to handle data emitted via EmitBytes. llvm-svn: 193041
* Remove unused variable.Benjamin Kramer2013-10-191-2/+1
| | | | llvm-svn: 193038
* Perform an intelligent splice of the predecessor with the single successor.Bill Wendling2013-10-191-1/+14
| | | | | | | | If the predecessor's being spliced into a landing pad, then we need the PHIs to come first and the rest of the predecessor's code to come *after* the landing pad instruction. llvm-svn: 193035
* Avoid duplicate search by reusing the iterator.Yaron Keren2013-10-192-5/+7
| | | | llvm-svn: 193034
* Added comments from Andrew Kaylor.Yaron Keren2013-10-191-0/+21
| | | | llvm-svn: 193033
* Reformat.Eric Christopher2013-10-191-80/+73
| | | | llvm-svn: 193024
* Fix up a few minor performance problems spotted in code review.Eric Christopher2013-10-191-7/+6
| | | | llvm-svn: 193023
* SCEV should use NSW to get trip count for positive nonunit stride loops.Andrew Trick2013-10-181-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SCEV currently fails to compute loop counts for nonunit stride loops. This comes up frequently. It prevents loop optimization and forces vectorization to insert extra loop checks. For example: void foo(int n, int *x) { for (int i = 0; i < n; i += 3) { x[i] = i; x[i+1] = i+1; x[i+2] = i+2; } } We need to properly handle the case in which limit > INT_MAX-stride. In the above case: n > INT_MAX-3. In this case the loop counter will step beyond the limit and overflow at the same time. However, knowing that signed integer overlow in undefined, we can assume the loop test behavior is arbitrary after overflow. This obeys both C undefined behavior rules, and the more strict LLVM poison value rules. I'm finally fixing this in response to Hal Finkel's persistence. The most probable reason that we never optimized this before is that we were being careful to handle case where the developer expected a side-effect free infinite loop relying on overflow: for (int i = 0; i < n; i += s) { ++j; } return j; If INT_MAX+1 is a multiple of s and n > INT_MAX-s, then we might expect an infinite loop. However there are plenty of ways to achieve this effect without relying on undefined behavior of signed overflow. llvm-svn: 193015
* Mark some command line flags as hiddenNadav Rotem2013-10-186-14/+14
| | | | llvm-svn: 193013
* Can we move to C++11 already?Michael J. Spencer2013-10-181-3/+3
| | | | llvm-svn: 193007
* [Support][YAML] Add support for accessing tags and tag handle substitution.Michael J. Spencer2013-10-181-11/+91
| | | | llvm-svn: 193004
* Debug Info: add a newly-created DIE to a parent in the same function.Manman Ren2013-10-182-24/+29
| | | | | | | | | | With this commit, all DIEs created in CompileUnit will be added to parents inside the same function. Also make getOrCreateTemplateType|Value functions private. No functionality change. llvm-svn: 193002
* Debug Info: simplify code a bit.Manman Ren2013-10-181-1/+1
| | | | llvm-svn: 193001
* MC asm parser: allow ?'s in symbol names, and handle @'s in names in MS asmHans Wennborg2013-10-184-13/+23
| | | | | | | | | | | | | | | | | | | | This is another (final?) stab at making us able to parse our own asm output on Windows. Symbols on Windows often contain @'s and ?'s in their names. Our asm parser didn't like this. ?'s were not allowed, and @'s were intepreted as trying to reference PLT/GOT/etc. We can't just add quotes around the bad names, since e.g. for MinGW, we use gas to assemble, and it doesn't like quotes in some places (notably in .def directives). This commit makes us allow ?'s in symbol names, and @'s in symbol names for MS assembly. Differential Revision: http://llvm-reviews.chandlerc.com/D1978 llvm-svn: 193000
* Revert the rest of r192749 to bring back the buildbot. These twoEric Christopher2013-10-181-2/+4
| | | | | | error messages should not be able to occur at the same time. llvm-svn: 192985
* Pure refactoring change.Richard Barton2013-10-181-73/+86
| | | | | | Patch by Artyom Skrobov. llvm-svn: 192977
* [PATCH] Fix PR17168 (DAG scheduler inserts DBG_VALUE before PHI with fast-isel)Bill Schmidt2013-10-181-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | PR17168 describes a test case that fails when compiling for debug with fast-isel. Investigation showed that the test was failing because a DBG_VALUE machine instruction was placed prior to a PHI. For this problem to occur requires the following: * Compile for debug * Compile with fast-isel * In a block B, fast-isel must partially succeed before punting to DAG-isel * B must start with a PHI * The first unhandled node in the DAG must not generate a machine instruction * A debug value with an order less than that of that first node exists When all of these circumstances apply, the existing test that an instruction was not inserted won't fire. Currently it tests whether the block is empty, or whether the last instruction generated is a phi. When fast-isel has partially succeeded, the last instruction generated will not be a phi. Instead, we need to check whether the current insert position is immediately following a phi. This patch adds that check, and adds the test case from the PR as a regression test. llvm-svn: 192976
* R600: Remove \ at EOL from ascii art comments.Benjamin Kramer2013-10-181-4/+4
| | | | | | | Completely harmless, but GCC likes to warn about it even when the next line is a comment. llvm-svn: 192974
* Add hint disassembly syntax for 16-bit Thumb hint instructions.Richard Barton2013-10-184-25/+23
| | | | | | Patch by Artyom Skrobov llvm-svn: 192972
* [AArch64] Add support for NEON scalar extract narrow instructions.Chad Rosier2013-10-181-0/+48
| | | | llvm-svn: 192970
* Correct log message typo: ended ad -> ended atEd Maste2013-10-181-1/+1
| | | | | | (From LLDB r192897) llvm-svn: 192968
* Add hardware division as a default feature on Cortex-A15. Also add test ↵Silviu Baranga2013-10-182-2/+3
| | | | | | cases to check this, and change diagnostics for the hwdiv-arm feature to something useful. llvm-svn: 192963
* CodeGen: Emit a libcall if the target doesn't support 16-byte wide atomicsDavid Majnemer2013-10-183-0/+24
| | | | | | | | | | There are targets that support i128 sized scalars but cannot emit instructions that modify them directly. The proper thing to do is to emit a libcall. This fixes PR17481. llvm-svn: 192957
* Fix a conversion warning in the mingw32 buildAlp Toker2013-10-181-2/+2
| | | | | | | | | | | gcc diagnoses this: warning: converting to non-pointer type 'unsigned int' from NULL Also remove an empty statement. No change in functionality. llvm-svn: 192955
* [DebugInfo] Remove unneeded struct member and hide struct definition. No ↵Alexey Samsonov2013-10-181-3/+2
| | | | | | functionality change. llvm-svn: 192954
* Fix initialization order warning in mingw32 buildAlp Toker2013-10-181-1/+1
| | | | | | No change in functionality. llvm-svn: 192953
* [DebugInfo] Remove dead code.Alexey Samsonov2013-10-181-31/+0
| | | | llvm-svn: 192952
* Revert "Re-commit r192758 - MC: quote tricky symbol names in asm output"Hans Wennborg2013-10-185-40/+20
| | | | | | | | | | | | | | | | | This caused the clang-native-mingw32-win7 buildbot to break. The assembler was complaining about the following lines that were showing up in the asm for CrashRecoveryContext.cpp: movl $"__ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4", 4(%eax) calll "_AddVectoredExceptionHandler@8" .def "__ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4"; "__ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4": calll "_RemoveVectoredExceptionHandler@4" Reverting for now. llvm-svn: 192940
* Temporarily revert r192749 as it is causing problems for LTO andEric Christopher2013-10-181-2/+8
| | | | | | requires a more in depth change to the IR structure. llvm-svn: 192938
* DIEHash: Add more things (and remove one character) from the COLLECT_ATTR macroDavid Blaikie2013-10-171-149/+53
| | | | | | | Makes the uses more terse and requires that they use a semicolon at the end that helps editors indent proceeding lines correctly. llvm-svn: 192925
OpenPOWER on IntegriCloud