aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Optimized load + SIGN_EXTEND patterns in the X86 backend.Elena Demikhovsky2012-12-196-7/+202
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170506 91177308-0d34-0410-b5e6-96231b3b80d8
* After reducing the size of an operation in the DAG we zero-extend the reducedNadav Rotem2012-12-192-2/+26
| | | | | | | | | | bitwidth op back to the original size. If we reduce ANDs then this can cause an endless loop. This patch changes the ZEXT to ANY_EXTEND if the demanded bits are equal or smaller than the size of the reduced operation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170505 91177308-0d34-0410-b5e6-96231b3b80d8
* docs: fix typos.Nadav Rotem2012-12-191-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170504 91177308-0d34-0410-b5e6-96231b3b80d8
* DOC: Add a webpage that describes the loop and bb vectorizers.Nadav Rotem2012-12-192-0/+224
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170503 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-1980-693/+693
| | | | | | single attribute in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170502 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove more of 'else's after 'returns'. No functional change.Craig Topper2012-12-191-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170497 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a bunch of 'else's after 'returns'Craig Topper2012-12-191-18/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170496 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach SimplifySetCC that comparing AssertZext i1 against a constant 1 can be ↵Craig Topper2012-12-192-3/+24
| | | | | | rewritten as a compare against a constant 0 with the opposite condition. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170495 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some missing Defs and Uses.Reed Kotler2012-12-191-1/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170493 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure the buffer, which containas an instance of APFloat, has proper ↵Shuxin Yang2012-12-191-7/+5
| | | | | | alignment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170486 91177308-0d34-0410-b5e6-96231b3b80d8
* Add to the disassembler C API an option to print the disassembledKevin Enderby2012-12-183-0/+22
| | | | | | | | | | | | | | | | | instructions in the assembly code variant if one exists. The intended use for this is so tools like lldb and darwin's otool(1) can be switched to print Intel-flavored disassembly. I discussed extensively this API with Jim Grosbach and we feel while it may not be fully general, in reality there is only one syntax for each assembly with the exception of X86 which has exactly two for historical reasons. rdar://10989182 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170477 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove MachineInstr::setIsInsideBundle().Jakob Stoklund Olesen2012-12-181-9/+0
| | | | | | | | | | | The bundle flags are now maintained by the slightly higher-level functions bundleWithPred() / bundleWithSucc() which enforce consistent bundle flags between neighboring instructions. See also MIBundleBuilder for an even higher-level approach to building bundles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170475 91177308-0d34-0410-b5e6-96231b3b80d8
* Use bidirectional bundle flags to simplify important functions.Jakob Stoklund Olesen2012-12-183-17/+9
| | | | | | | | | | | The bundle_iterator::operator++ function now doesn't need to dig out the basic block and check against end(). It can use the isBundledWithSucc() flag to find the last bundled instruction safely. Similarly, MachineInstr::isBundled() no longer needs to look at iterators etc. It only has to look at flags. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170473 91177308-0d34-0410-b5e6-96231b3b80d8
* rdar://12801297 Shuxin Yang2012-12-182-0/+817
| | | | | | | InstCombine for unsafe floating-point add/sub. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170471 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable the loop vectorizer in clang and not in the pass manager, so that we ↵Nadav Rotem2012-12-181-1/+1
| | | | | | can disable it in clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170470 91177308-0d34-0410-b5e6-96231b3b80d8
* Verify bundle flag consistency when setting them.Jakob Stoklund Olesen2012-12-181-0/+4
| | | | | | | Now that the bundle flag aware APIs are all in place, it is possible to continuously verify the flag consistency. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170465 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverse order of checking SSE level when calculating compare cost, so we checkJakub Staszak2012-12-182-20/+34
| | | | | | | AVX2 before AVX. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170464 91177308-0d34-0410-b5e6-96231b3b80d8
* Verify bundle flags for consistency in MachineVerifier.Jakob Stoklund Olesen2012-12-181-0/+17
| | | | | | | The new bidirectional bundle flags are redundant, so inadvertent bundle tearing can be detected in the machine code verifier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170463 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable ARM partial flag dependency optimization at -OzQuentin Colombet2012-12-182-2/+44
| | | | | | | | | To not over constrain the scheduler for ARM in thumb mode, some optimizations for code size reduction, specific to ARM thumb, are blocked when they add a dependency (like write after read dependency). Disables this check when code size is the priority, i.e., code is compiled with -Oz. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170462 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't allow the automatically updated MI flags to be set directly.Jakob Stoklund Olesen2012-12-182-3/+5
| | | | | | | | | | | The bundle-related MI flags need to be kept in sync with the neighboring instructions. Don't allow the bulk flag-setting setFlags() function to change them. Also don't copy MI flags when cloning an instruction. The clone's bundle flags will be set when it is explicitly inserted into a bundle. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170459 91177308-0d34-0410-b5e6-96231b3b80d8
* Tighten up the splice() API for bundled instructions.Jakob Stoklund Olesen2012-12-182-28/+16
| | | | | | | | | | | Remove the instr_iterator versions of the splice() functions. It doesn't seem useful to be able to splice sequences of instructions that don't consist of full bundles. The normal splice functions that take MBB::iterator arguments are not changed, and they can move whole bundles around without any problems. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170456 91177308-0d34-0410-b5e6-96231b3b80d8
* MISched: add dependence to ExitSU to model live-out latency.Andrew Trick2012-12-182-1/+64
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170454 91177308-0d34-0410-b5e6-96231b3b80d8
* MISched: Cleanup, redundant statement.Andrew Trick2012-12-181-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170453 91177308-0d34-0410-b5e6-96231b3b80d8
* MISched: Heuristics, compare latency more precisely. It matters more for ↵Andrew Trick2012-12-181-43/+38
| | | | | | some targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170452 91177308-0d34-0410-b5e6-96231b3b80d8
* MISched: Remove SchedRemainder::IsResourceLimited. I don't know how to ↵Andrew Trick2012-12-181-3/+0
| | | | | | compute it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170451 91177308-0d34-0410-b5e6-96231b3b80d8
* MISched: cleanup, use the proper iterator type.Andrew Trick2012-12-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170450 91177308-0d34-0410-b5e6-96231b3b80d8
* MISched: minor improvement, initialize remaining resources before the first ↵Andrew Trick2012-12-181-0/+10
| | | | | | scheduling decision. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170449 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an assertion for a likely ilist::splice() contract violation.Jakob Stoklund Olesen2012-12-182-0/+25
| | | | | | | | | | | | | | | | | | | | | | | The single-element ilist::splice() function supports a noop move: List.splice(I, List, I); The corresponding std::list function doesn't allow that, so add a unit test to document that behavior. This also means that List.splice(I, List, F); is somewhat surprisingly not equivalent to List.splice(I, List, F, next(F)); This patch adds an assertion to catch the illegal case I == F above. Alternatively, we could make I == F a legal noop, but that would make ilist differ even more from std::list. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170443 91177308-0d34-0410-b5e6-96231b3b80d8
* LoopVectorize: Emit reductions as log2(vectorsize) shuffles + vector ops ↵Benjamin Kramer2012-12-182-12/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of scalar operations. For example on x86 with SSE4.2 a <8 x i8> add reduction becomes movdqa %xmm0, %xmm1 movhlps %xmm1, %xmm1 ## xmm1 = xmm1[1,1] paddw %xmm0, %xmm1 pshufd $1, %xmm1, %xmm0 ## xmm0 = xmm1[1,0,0,0] paddw %xmm1, %xmm0 phaddw %xmm0, %xmm0 pextrb $0, %xmm0, %edx instead of pextrb $2, %xmm0, %esi pextrb $0, %xmm0, %edx addb %sil, %dl pextrb $4, %xmm0, %esi addb %dl, %sil pextrb $6, %xmm0, %edx addb %sil, %dl pextrb $8, %xmm0, %esi addb %dl, %sil pextrb $10, %xmm0, %edi pextrb $14, %xmm0, %edx addb %sil, %dil pextrb $12, %xmm0, %esi addb %dil, %sil addb %sil, %dl git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170439 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of the pesky -Woverloaded-virtual warning. No change in functionality.Eli Bendersky2012-12-182-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170438 91177308-0d34-0410-b5e6-96231b3b80d8
* Tighten the insert() API for bundled instructions.Jakob Stoklund Olesen2012-12-182-14/+32
| | | | | | | | | | | | | | | | | The normal insert() function takes an MBB::iterator position, and inserts a stand-alone MachineInstr as before. The insert() function that takes an MBB::instr_iterator position can insert instructions inside a bundle, and will now update the bundle flags correctly when that happens. When the insert position is between two bundles, it is unclear whether the instruction should be appended to the previous bundle, prepended to the next bundle, or stand on its own. The MBB::insert() function doesn't bundle the instruction in that case, use the MIBundleBuilder class for that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170437 91177308-0d34-0410-b5e6-96231b3b80d8
* Check multiple register classes for inline asm tied registersHal Finkel2012-12-182-3/+38
| | | | | | | | | | | | | | | | | | A register can be associated with several distinct register classes. For example, on PPC, the floating point registers are each associated with both F4RC (which holds f32) and F8RC (which holds f64). As a result, this code would fail when provided with a floating point register and an f64 operand because it would happen to find the register in the F4RC class first and return that. From the F4RC class, SDAG would extract f32 as the register type and then assert because of the invalid implied conversion between the f64 value and the f32 register. Instead, search all register classes. If a register class containing the the requested register has the requested type, then return that register class. Otherwise, as before, return the first register class found that contains the requested register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170436 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable the loop vectorizer.Nadav Rotem2012-12-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170416 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename the test so that we can add additional vectors-of-pointers testsNadav Rotem2012-12-181-0/+0
| | | | | | | into the same file in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170414 91177308-0d34-0410-b5e6-96231b3b80d8
* SROA: Replace calls to getScalarSizeInBits to DataLayout's API becauseNadav Rotem2012-12-182-6/+31
| | | | | | | | getScalarSizeInBits could not handle vectors of pointers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170412 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm/test/MC/ELF/comp-dir.s: Appease MSYS Bash.NAKAMURA Takumi2012-12-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170410 91177308-0d34-0410-b5e6-96231b3b80d8
* Initialize NoRedZone and remove unused default values.Rafael Espindola2012-12-181-3/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170404 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup comment and formattingEli Bendersky2012-12-181-5/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170398 91177308-0d34-0410-b5e6-96231b3b80d8
* Repair bundles that were broken by removing and reinserting the firstJakob Stoklund Olesen2012-12-181-1/+8
| | | | | | | | | | instruction. This isn't strictly necessary at the moment because Thumb2SizeReduction also copies all MI flags from the old instruction to the new. However, a future patch will make that kind of direct flag tampering illegal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170395 91177308-0d34-0410-b5e6-96231b3b80d8
* Formatting.Eric Christopher2012-12-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170394 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for passing -main-file-name all the way through toEric Christopher2012-12-187-2/+47
| | | | | | | | the assembler. Part of PR14624 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170390 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup formatting and whitespace.Eric Christopher2012-12-181-9/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170389 91177308-0d34-0410-b5e6-96231b3b80d8
* Extract a method, no functional change intended.Jakob Stoklund Olesen2012-12-181-31/+35
| | | | | | Sadly, this costs us a perfectly good opportunity to use 'goto'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170385 91177308-0d34-0410-b5e6-96231b3b80d8
* Tighten up the erase/remove API for bundled instructions.Jakob Stoklund Olesen2012-12-174-74/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most code is oblivious to bundles and uses the MBB::iterator which only visits whole bundles. MBB::erase() operates on whole bundles at a time as before. MBB::remove() now refuses to remove bundled instructions. It is not safe to remove all instructions in a bundle without deleting them since there is no way of returning pointers to all the removed instructions. MBB::remove_instr() and MBB::erase_instr() will now update bundle flags correctly, lifting individual instructions out of bundles while leaving the remaining bundle intact. The MachineInstr convenience functions are updated so eraseFromParent() erases a whole bundle as before eraseFromBundle() erases a single instruction, leaving the rest of its bundle. removeFromParent() refuses to operate on bundled instructions, and removeFromBundle() lifts a single instruction out of its bundle. These functions will no longer accidentally split or coalesce bundles - bundle flags are updated to preserve the existing bundling, and explicit bundleWith* / unbundleFrom* functions should be used to change the instruction bundling. This API update is still a work in progress. I am going to update APIs first so they maintain bundle flags automatically when possible. Then I'll add stricter verification of the bundle flags. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170384 91177308-0d34-0410-b5e6-96231b3b80d8
* EmitDebugLabel should by default be the same as EmitLabel everywhere.Reed Kotler2012-12-171-0/+5
| | | | | | | | | It must be explicity set in MCPureStreamer because otherwise it will inherit incorrectly from the parent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170383 91177308-0d34-0410-b5e6-96231b3b80d8
* fix indentationEli Bendersky2012-12-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170381 91177308-0d34-0410-b5e6-96231b3b80d8
* [arm fast-isel] Minor cleanup. No functional change intended.Chad Rosier2012-12-171-10/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170379 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some integer constant warnings by using a suffixNick Kledzik2012-12-171-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170376 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a triple to this test -- it has to be an ELF platform...Chandler Carruth2012-12-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170374 91177308-0d34-0410-b5e6-96231b3b80d8
* Prepare LLVM to fix PR14625, exposing a hook in MCContext to manage theChandler Carruth2012-12-175-4/+30
| | | | | | | | | | compilation directory. This defaults to the current working directory, just as it always has, but now an assembler can choose to override it with a custom directory. I've taught llvm-mc about this option and added a test case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170371 91177308-0d34-0410-b5e6-96231b3b80d8