summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* add note.Chris Lattner2010-02-051-0/+2
| | | | llvm-svn: 95445
* print encodings like this:Chris Lattner2010-02-051-1/+1
| | | | | | | | | | | pslld 69, %mm3 ## encoding: [0x0f,0xf2,0x1c,0x25,0x45,0x00,0x00,0x00] instead of like this: pslld 69, %mm3 ## encoding: [0x0f,0xf2,0x1c,0x25,0x45,0000,0000,0000] this only affects 0. llvm-svn: 95441
* port X86InstrInfo::determineREX over to the new encoder.Chris Lattner2010-02-053-10/+109
| | | | llvm-svn: 95440
* Teach SimplifyCFG about magic pointer constants.Jakob Stoklund Olesen2010-02-052-40/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Weird code sometimes uses pointer constants other than null. This patch teaches SimplifyCFG to build switch instructions in those cases. Code like this: void f(const char *x) { if (!x) puts("null"); else if ((uintptr_t)x == 1) puts("one"); else if (x == (char*)2 || x == (char*)3) puts("two"); else if ((intptr_t)x == 4) puts("four"); else puts(x); } Now becomes a switch: define void @f(i8* %x) nounwind ssp { entry: %magicptr23 = ptrtoint i8* %x to i64 ; <i64> [#uses=1] switch i64 %magicptr23, label %if.else16 [ i64 0, label %if.then i64 1, label %if.then2 i64 2, label %if.then9 i64 3, label %if.then9 i64 4, label %if.then14 ] Note that LLVM's own DenseMap uses magic pointers. llvm-svn: 95439
* wire up 64-bit MCCodeEmitter.Chris Lattner2010-02-053-9/+17
| | | | llvm-svn: 95438
* really kill off the last MRMInitReg inst, remove logic from encoder.Chris Lattner2010-02-054-17/+9
| | | | llvm-svn: 95437
* lower the last of the MRMInitReg instructions in MCInstLower.Chris Lattner2010-02-053-9/+16
| | | | llvm-svn: 95435
* teach X86MCInstLower to lower the MOV32r0 and MOV8r0 Chris Lattner2010-02-052-6/+14
| | | | | | pseudo instructions. llvm-svn: 95433
* genericize helpers, use them for MOV16r0/MOV64r0Chris Lattner2010-02-051-27/+21
| | | | llvm-svn: 95432
* factor code better in X86MCInstLower::Lower, teach it toChris Lattner2010-02-053-53/+40
| | | | | | lower the SETB* instructions. llvm-svn: 95431
* fix logical-select to invoke filecheck right, and fix hte instcombineChris Lattner2010-02-051-1/+6
| | | | | | | | | xform it is checking to actually pass. There is no need to match m_SelectCst<0, -1> since instcombine canonicalizes that into not(sext). Add matches for sext(not(x)) in addition to not(sext(x)). llvm-svn: 95420
* implement the rest of the encoding types.Chris Lattner2010-02-051-3/+108
| | | | llvm-svn: 95414
* move functions for decoding X86II values into the X86II namespace.Chris Lattner2010-02-054-45/+48
| | | | llvm-svn: 95410
* Implement releaseMemory in CodeGenPrepare and free the BackEdgesDan Gohman2010-02-051-0/+4
| | | | | | | container data. This prevents it from holding onto dangling pointers and potentially behaving unpredictably. llvm-svn: 95409
* constant propagate a method away.Chris Lattner2010-02-052-11/+5
| | | | llvm-svn: 95408
* Use a SmallSetVector instead of a SetVector; this code showed up as aDan Gohman2010-02-051-2/+3
| | | | | | malloc caller in a profile. llvm-svn: 95407
* change getSizeOfImm and getBaseOpcodeFor to just takeChris Lattner2010-02-055-48/+46
| | | | | | TSFlags directly instead of a TargetInstrDesc. llvm-svn: 95405
* add some more encodings.Chris Lattner2010-02-051-1/+36
| | | | llvm-svn: 95403
* Remove this code for now. I have a better idea and will rewrite withEric Christopher2010-02-051-41/+0
| | | | | | that in mind. llvm-svn: 95402
* VMOVRRD and VMOVDRR both have Inst{7-6} = 0b00.Johnny Chen2010-02-051-2/+6
| | | | llvm-svn: 95397
* Move --march, --mcpu, and --mattr from JIT/TargetSelect.cpp to lli.cpp.Jeffrey Yasskin2010-02-054-31/+40
| | | | | | | | | llc.cpp also defined these flags, meaning that when I linked all of LLVM's libraries into a single shared library, llc crashed on startup with duplicate flag definitions. This patch passes them through the EngineBuilder into JIT::selectTarget(). llvm-svn: 95390
* MC: Change default comment column to 40 characters.Daniel Dunbar2010-02-051-1/+1
| | | | llvm-svn: 95378
* implement the non-relocation forms of memory operandsChris Lattner2010-02-051-65/+111
| | | | llvm-svn: 95368
* Handle tail call with byval arguments.Evan Cheng2010-02-051-24/+61
| | | | llvm-svn: 95351
* start adding MRMDestMem, which requires memory form mod/rm encodingChris Lattner2010-02-051-1/+158
| | | | | | to start limping. llvm-svn: 95350
* Add a few more encodings, we can now encode all of:Chris Lattner2010-02-052-33/+58
| | | | | | | | | | pushl %ebp movl %esp, %ebp movl $42, %eax popl %ebp ret llvm-svn: 95344
* When the scheduler unfold a load folding instruction it move some of the ↵Evan Cheng2010-02-051-2/+10
| | | | | | | | predecessors to the unfolded load. It decides what gets moved to the load by checking whether the new load is using the predecessor as an operand. The check neglects the cases whether the predecessor is a flagged scheduling unit. rdar://7604000 llvm-svn: 95339
* An empty global constant (one of size 0) may have a section immediatelyBill Wendling2010-02-051-0/+1
| | | | | | | | | | | following it. However, the EmitGlobalConstant method wasn't emitting a body for the constant. The assembler doesn't like that. Before, we were generating this: .zerofill __DATA, __common, __cmd, 1, 3 This fix puts us back to that semantic. llvm-svn: 95336
* Do not reassociate expressions with i1 type. SimplifyCFG converts someBob Wilson2010-02-041-0/+9
| | | | | | | | | | short-circuited conditions to AND/OR expressions, and those expressions are often converted back to a short-circuited form in code gen. The original source order may have been optimized to take advantage of the expected values, and if we reassociate them, we change the order and subvert that optimization. Radar 7497329. llvm-svn: 95333
* Disable external stubs for X86-32 and X86-64Evan Phoenix2010-02-041-1/+8
| | | | | | | | | Instruction selection for X86 now can choose an instruction sequence that will fit any address of any symbol, no matter the pointer width. X86-64 uses a mov+call-via-reg sequence for this. llvm-svn: 95323
* Fix typo Duncan noticed.Evan Cheng2010-02-041-1/+1
| | | | llvm-svn: 95322
* Increase inliner thresholds by 25.Jakob Stoklund Olesen2010-02-041-3/+3
| | | | | | | | This makes the inliner about as agressive as it was before my changes to the inliner cost calculations. These levels give the same performance and slightly smaller code than before. llvm-svn: 95320
* Fix small bug in handling instructions with more than one implicitly defined ↵Jakob Stoklund Olesen2010-02-041-1/+1
| | | | | | | | | operand. ProcessImplicitDefs would only mark one operand per instruction with <undef>. This fixed PR6086. llvm-svn: 95319
* move the PR6214 microoptzn to this file.Chris Lattner2010-02-041-0/+18
| | | | llvm-svn: 95299
* Re-enable x86 tail call optimization.Evan Cheng2010-02-041-3/+0
| | | | llvm-svn: 95295
* Temporarily revert this since it appears to have caused a buildEric Christopher2010-02-041-49/+23
| | | | | | failure. llvm-svn: 95294
* add support for the sparcv9-*-* target triple to turn onChris Lattner2010-02-048-29/+74
| | | | | | 64-bit sparc codegen. Patch by Nathan Keynes! llvm-svn: 95293
* From PR6228:Chris Lattner2010-02-041-1/+2
| | | | | | | | | | | | "Attached patch removes the extra NUL bytes from the output and changes test/Archive/MacOSX.toc from a binary to a text file (removes svn:mime-type=application/octet-stream and adds svn:eol-style=native). I can't figure out how to get SVN to include the new contents of the file in the patch so I'm attaching it separately." Patch by James Abbatiello! llvm-svn: 95292
* Rework constant expr and array handling for objectsize instcombining.Eric Christopher2010-02-041-23/+49
| | | | | | | | | | Fix bugs where we would compute out of bounds as in bounds, and where we couldn't know that the linker could override the size of an array. Add a few new testcases, change existing testcase to use a private global array instead of extern. llvm-svn: 95283
* It's too risky to eliminate sext / zext of call results for tail call ↵Evan Cheng2010-02-041-6/+4
| | | | | | optimization even if the caller / callee attributes completely match. The callee may have been bitcast'ed (or otherwise lied about what it's doing). llvm-svn: 95282
* Change the argument to getIntegerSCEV to be an int64_t, ratherDan Gohman2010-02-041-1/+1
| | | | | | | than int. This will make it more convenient for LSR, which does a lot of things with int64_t offsets. llvm-svn: 95281
* Indirect tail call has to go through a call preserved register since it's ↵Evan Cheng2010-02-041-15/+14
| | | | | | | | after callee register pops. X86 isel lowering is using EAX / R11 and it was somehow adding that to function live out. That prevented the real function return register from being added to the function live out list and bad things happen. This fixes 483.xalancbmk (with tail call opt). llvm-svn: 95280
* Use a tab instead of space after .type, for consistency.Dan Gohman2010-02-041-1/+1
| | | | llvm-svn: 95272
* Rewrite FP constant handling in DEBUG_VALUE yetDale Johannesen2010-02-041-5/+17
| | | | | | | again, so it more or less handles long double. Restore \n removed in latest MC frenzy. llvm-svn: 95271
* Fix (and test) function-local metadata that occurs before the instruction ↵Victor Hernandez2010-02-041-4/+8
| | | | | | that it refers to; fix is to not enumerate operands of function-local metadata until after all instructions have been enumerated llvm-svn: 95269
* If we're dealing with a zero-length array, don't lower to anyEric Christopher2010-02-031-4/+9
| | | | | | particular size, we just don't know what the length is yet. llvm-svn: 95266
* enhance new encoder to support prefixes + RawFrm Chris Lattner2010-02-033-7/+133
| | | | | | | | instructions with no operands. It can now handle define void @test2() nounwind { ret void } llvm-svn: 95261
* set up some infrastructure, some minor cleanups.Chris Lattner2010-02-031-5/+39
| | | | llvm-svn: 95260
* Speculatively disable x86 automatic tail call optimization while we track ↵Evan Cheng2010-02-031-0/+3
| | | | | | down a self-hosting issue. llvm-svn: 95259
* stub out a new X86 encoder, which can be tried withChris Lattner2010-02-035-1/+56
| | | | | | -enable-new-x86-encoder until its stable. llvm-svn: 95256
OpenPOWER on IntegriCloud