summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-01-08R600: Enable subreg livenessperf-Jan-08-2015Tom Stellard1-0/+4
2015-01-08R600/SI: Define a schedule model and enable the generic machine schedulerTom Stellard27-83/+302
The schedule model is not complete yet, and could be improved.
2015-01-08R600/SI: Add test case that crashes the coalescer with subreg liveness enabledTom Stellard1-0/+44
2015-01-08R600/SI: Add kill flag when copying scratch offset to a registerTom Stellard1-1/+1
This allows us to re-use the same register for the scratch offset when accessing large private arrays.
2015-01-07XXX: Clear some kill flags.vgpr-spilling-Jan07-2014Tom Stellard2-2/+2
2015-01-07R600/SI: Enable VGPR spilling for all shader typesTom Stellard6-11/+16
2015-01-07R600/SI: Fix a few bugs in VGPR spillingTom Stellard1-1/+5
2015-01-07R600/SI: Use external symbols for scratch bufferTom Stellard9-82/+90
We were passing the scratch buffer address to the shaders via user sgprs, but now we use external symbols and have the driver patch the shader using reloc information.
2015-01-07R600/SI: Use IMPLICIT_DEF and KILL when failing to spill VGPRsTom Stellard1-3/+2
This helps us avoid 'invalid register class for operand' verifier errors.
2015-01-07R600/SI: Spill VGPRs to scratch space for compute shadersTom Stellard11-96/+353
2015-01-07Improvements to emacs packages for llvm and tablegen mode.Rafael Espindola2-50/+64
* Both files have valid package headers and footers (you can verify with M-x checkdoc). * Fixed style warnings generated by checkdoc. * Fixed a byte-compiler warning in llvm-mode.el. * Ensure that the modes are autoloaded, so users do not need to (require 'llvm-mode) to use them. Patch by Wilfred Hughes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225356 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07Reverting r225319; since there is a folder named Examples, attempting to add ↵Aaron Ballman1-6/+0
a target of the same name causes problems for IDEs like Visual Studio. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225355 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07Manually specify the folder that Kaleidescope should reside in for ↵Aaron Ballman1-0/+1
CMake-produced solutions that care about such things (like MSVC). This takes the Kaleidescope target out of the root solution folder and places it into the Examples folder where it belongs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225354 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07Manually specify the folder that llvm-ranlib should reside in for ↵Aaron Ballman1-0/+2
CMake-produced solutions that care about such things (like MSVC). This takes llvm-ranlib out of the root solution folder and places it into the Tools folder where it belongs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225353 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07New method SDep::isNormalMemoryOrBarrier() in ScheduleDAGInstrs.cpp.Jonas Paulsson2-5/+12
Used to iterate over previously added memory dependencies in adjustChainDeps() and iterateChainSucc(). SDep::isCtrl() was previously used in these places, that also gave anti and output edges. The code may be worse if these are followed, because MisNeedChainEdge() will conservatively return true since a non-memory instruction has no memory operands, and a false chain dep will be added. It is also unnecessary since all memory accesses of interest will be reached by memory dependencies, and there is a budget limit for the number of edges traversed. This problem was found on an out-of-tree target with enabled alias analysis. No test case for an in-tree target has been found. Reviewed by Hal Finkel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225351 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07Fix typos in comment and option help texts.Jonas Paulsson1-3/+3
For -enable-aa-sched-mi and -use-tbaa-in-sched-mi. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225350 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07[ARM] Add missing Tag_DIV_use tests.Charlie Turner1-0/+8
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225348 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07Fix regression in r225266.Asiri Rathnayake1-1/+1
The change in r225266 was reviewed under D6722. But the commit r225266 has a typo, causing some MCHammer failures. This patch fixes it. Change-Id: I573efcff25003af7478ac02548ebbe929fc7f5fd git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225347 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07[PM] Give slightly less horrible names to the utility pass templates forChandler Carruth3-33/+33
requiring and invalidating specific analyses. Also make their printed names match their class names. Writing these out as prose really doesn't make sense to me any more. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225346 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07[X86] Merge a switch statement inside a default case of another switch ↵Craig Topper1-160/+155
statement on the same variable. There was no additional code in the default so this should be no functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225345 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07[X86] Don't mark the shift by 1 instructions as isConvertibleToThreeAddress. ↵Craig Topper1-1/+1
There is no handling for them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225344 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07[X86] Remove some unused TYPE enums from the disassembler.Craig Topper4-19/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225343 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07Revert r225165 and r225169Karthik Bhat2-209/+0
Even thouh gcc produces simialr instructions as Owen pointed out the two patterns aren’t equivalent in the case where the original subtraction could have caused an overflow. Reverting the same. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225341 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07[ADT][SmallVector] Flip an assert comparison to avoid overflows yielding ↵Ahmed Bougacha1-2/+2
false-negatives. NFC. r221973 changed SmallVector::operator[] to use size_t instead of unsigned. Before that, on 64bit platforms, when a large index (say -1) was passed, truncating it to unsigned avoided an overflow when computing 'begin() + idx', and failed the range checking assertion, as expected. With r221973, idx isn't truncated, so the addition wraps to '(char*)begin() - 1', and doesn't fire anymore when it should have done so. This commit changes the comparison to instead compute 'end() - begin()' (i.e., 'size()'), which avoids potentially overflowing additions, and correctly triggers the assertion when values such as -1 are passed. Note that the problem already existed before that revision, on platforms where sizeof(size_t) == sizeof(unsigned). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225338 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07IR: Remove MDNode::getWhenValsUnresolved()Duncan P. N. Exon Smith1-5/+0
Remove dead code. Use `MDNode::get()` instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225335 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07Remove invalid TODODuncan P. N. Exon Smith1-1/+0
We can't drop support for RAUW entirely in `MDNode`s, since it's required for graph construction. This comment was from before I'd done the math on that (out-of-tree), and never should have been committed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225334 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07[PM] Fix a pretty nasty bug where the new pass manager would invalidateChandler Carruth5-42/+159
passes too many time. I think this is actually the issue that someone raised with me at the developer's meeting and in an email, but that we never really got to the bottom of. Having all the testing utilities made it much easier to dig down and uncover the core issue. When a pass manager is running many passes over a single function, we need it to invalidate the analyses between each run so that they can be re-computed as needed. We also need to track the intersection of preserved higher-level analyses across all the passes that we run (for example, if there is one module analysis which all the function analyses preserve, we want to track that and propagate it). Unfortunately, this interacted poorly with any enclosing pass adaptor between two IR units. It would see the intersection of preserved analyses, and need to invalidate any other analyses, but some of the un-preserved analyses might have already been invalidated *and recomputed*! We would fail to propagate the fact that the analysis had already been invalidated. The solution to this struck me as really strange at first, but the more I thought about it, the more natural it seemed. After a nice discussion with Duncan about it on IRC, it seemed even nicer. The idea is that invalidating an analysis *causes* it to be preserved! Preserving the lack of result is trivial. If it is recomputed, great. Until something *else* invalidates it again, we're good. The consequence of this is that the invalidate methods on the analysis manager which operate over many passes now consume their PreservedAnalyses object, update it to "preserve" every analysis pass to which it delivers an invalidation (regardless of whether the pass chooses to be removed, or handles the invalidation itself by updating itself). Then we return this augmented set from the invalidate routine, letting the pass manager take the result and use the intersection of *that* across each pass run to compute the final preserved set. This accounts for all the places where the early invalidation of an analysis has already "preserved" it for a future run. I've beefed up the testing and adjusted the assertions to show that we no longer repeatedly invalidate or compute the analyses across nested pass managers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225333 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07R600/SI: Add check for amdgcn triple forgotten in r225276.Tom Stellard1-2/+3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225331 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07Analysis: Reformulate WillNotOverflowUnsignedAdd for reusabilityDavid Majnemer5-45/+46
WillNotOverflowUnsignedAdd's smarts will live in ValueTracking as computeOverflowForUnsignedAdd. It now returns a tri-state result: never overflows, always overflows and sometimes overflows. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225329 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07InstCombine: Just a small tidy-upDavid Majnemer1-3/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225328 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07[PowerPC] Transform a README.txt entry into a FIXMEHal Finkel2-14/+9
Remove the README.txt entry regarding register allocation of CR logical ops, and replace it with a FIXME in PPCInstrInfo.td. The text in the README.txt was not really accurate, and thanks goes to Pat Haugen (and Bill Schmidt) from IBM for clarifying what was intended and highlighting the relevant text in the ISA specification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225325 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06cmake: Fix 'examples' target after r225319Duncan P. N. Exon Smith1-1/+1
Add the missing `DEPENDS` keyword. r225319 did almost the right thing (I didn't notice the problem with it because `Kaleidoscope-Ch8` wasn't building at all). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225321 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06Kaleidoscope: Value => MetadataDuncan P. N. Exon Smith1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225320 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06cmake: Add 'examples' targetDuncan P. N. Exon Smith1-0/+6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225319 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06cmake: Add Kaleidoscope targetDuncan P. N. Exon Smith8-7/+14
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225318 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06Add a subdirectory in CMake for Chapter 8.Eric Christopher1-0/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225315 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06Revert r224935 "Refactor duplicated code. No intended functionality change."Lang Hames15-74/+104
This is affecting the behavior of some ObjC++ / AArch64 test cases on Darwin. Reverting to get the bots green while I track down the source of the changed behavior. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225311 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06R600/SI: Add combine for isinfinite patternMatt Arsenault3-0/+142
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225310 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06Add isNegative helper to ConstantFPSDNodeMatt Arsenault1-0/+3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225309 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06Add isInfinity helper to ConstantFPSDNodeMatt Arsenault1-0/+3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225308 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06R600/SI: Pattern match isinf to v_cmp_class instructionsMatt Arsenault3-0/+79
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225307 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06R600/SI: Add basic DAG combines for fp_classMatt Arsenault3-1/+212
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225306 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06R600/SI: Add class intrinsicMatt Arsenault9-5/+420
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225305 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06Fix using wrong intrinsic in testMatt Arsenault1-9/+9
This is a leftover from renaming the intrinsic. It's surprising the unknown llvm. intrinsic wasn't rejected. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225304 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06Change the .ll syntax for comdats and add a syntactic sugar.Rafael Espindola40-114/+152
In order to make comdats always explicit in the IR, we decided to make the syntax a bit more compact for the case of a GlobalObject in a comdat with the same name. Just dropping the $name causes problems for @foo = globabl i32 0, comdat $bar = comdat ... and declare void @foo() comdat $bar = comdat ... So the syntax is changed to @g1 = globabl i32 0, comdat($c1) @g2 = globabl i32 0, comdat and declare void @foo() comdat($c1) declare void @foo() comdat git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225302 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06[PowerPC] Reuse a load operand in int->fp conversionsHal Finkel4-41/+238
int->fp conversions on PPC must be done through memory loads and stores. On a modern core, this process begins by storing the int value to memory, then loading it using a (sometimes special) FP load instruction. Unfortunately, we would do this even when the value to be converted was itself a load, and we can just use that same memory location instead of copying it to another first. There is a slight complication when handling int_to_fp(fp_to_int(x)) pairs, because the fp_to_int operand has not been lowered when the int_to_fp is being lowered. We handle this specially by invoking fp_to_int's lowering logic (partially) and getting the necessary memory location (some trivial refactoring was done to make this possible). This is all somewhat ugly, and it would be nice if some later CodeGen stage could just clean this stuff up, but because doing so would involve modifying target-specific nodes (or instructions), it is not immediately clear how that would work. Also, remove a related entry from the README.txt for which we now generate reasonable code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225301 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06Use a Factory Method for MachineFunctionInfo CreationMehdi Amini1-1/+10
The goal is to allows MachineFunctionInfo to override this create function to customize the creation. No change intended in existing backend in this patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225292 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06[Hexagon] Adding compound jump encodings.Colin LeMahieu3-0/+414
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225291 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06R600/SI: Insert s_waitcnt before s_barrier instructions.Tom Stellard3-1/+10
This ensures that all memory operations are complete when all threads reach the barrier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225290 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06R600/SI: Fix dependency calculation for DS writes instructions in SIInsertWaitsTom Stellard1-0/+23
In DS write instructions, the address operand comes before the value operand(s) which is reversed from every other instruction type. The SIInsertWait assumed that the first use for each instruction was the value, so for DS write it was protecting the address operand with s_waitcnt instructions when it should have been protecting the value operand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225289 91177308-0d34-0410-b5e6-96231b3b80d8