summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* * Remove trailing whitespaceMisha Brukman2005-04-215-135/+135
| | | | | | * Convert tabs to spaces llvm-svn: 21418
* Remove trailing whitespaceMisha Brukman2005-04-214-241/+241
| | | | llvm-svn: 21417
* Remove trailing whitespaceMisha Brukman2005-04-2141-532/+532
| | | | llvm-svn: 21416
* * Remove trailing whitespaceMisha Brukman2005-04-212-15/+15
| | | | | | * Convert tabs to spaces llvm-svn: 21415
* Match another form of eqvChris Lattner2005-04-211-1/+6
| | | | llvm-svn: 21413
* Handle stores of global address as stores of immediates. Instead of:Chris Lattner2005-04-211-0/+5
| | | | | | | | | | | | | | | test1: movl $N, %eax movl %eax, G ret emit: test1: movl $N, G ret llvm-svn: 21407
* Handle (store &GV -> mem) as a store immediate. This often occurs forChris Lattner2005-04-211-0/+14
| | | | | | | | | | | | | printf format strings and other stuff. Instead of generating this: movl $l1__2E_str_1, %eax movl %eax, (%esp) we now emit: movl $l1__2E_str_1, (%esp) llvm-svn: 21406
* Use the actual uid/gid for defaulting the fields in the archive.Reid Spencer2005-04-211-2/+3
| | | | llvm-svn: 21405
* Fix a bug where we would not promote calls to invokes if they occured inChris Lattner2005-04-211-3/+5
| | | | | | the same block as the setjmp. Thanks to Greg Pettyjohn for noticing this! llvm-svn: 21403
* Eliminate calls to system dependent function getuid by usingReid Spencer2005-04-211-2/+3
| | | | | | | the newly implemented sys::Process::GetCurrentUserId function. Replace similarly for getgid. llvm-svn: 21402
* Provide an implementation of the GetCurrentUserId and GetCurrentGroupIdReid Spencer2005-04-212-0/+20
| | | | | | methods that were recently added to the interface. llvm-svn: 21401
* add support for taking and resolving the address of free.Chris Lattner2005-04-211-2/+31
| | | | llvm-svn: 21396
* Improve doxygen, from part of Evan's patch that didn't apply.Chris Lattner2005-04-211-6/+6
| | | | llvm-svn: 21394
* Improve doxygen documentation, patch contributed by Evan Jones!Chris Lattner2005-04-212-28/+28
| | | | llvm-svn: 21393
* Improve and elimination. On PPC, for:Chris Lattner2005-04-211-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | bool %test(int %X) { %Y = and int %X, 8 %Z = setne int %Y, 0 ret bool %Z } we now generate this: rlwinm r2, r3, 0, 28, 28 srwi r3, r2, 3 instead of this: rlwinm r2, r3, 0, 28, 28 srwi r2, r2, 3 rlwinm r3, r2, 0, 31, 31 I'll leave it to Nate to get it down to one instruction. :) --------------------------------------------------------------------- llvm-svn: 21391
* Fold (x & 8) != 0 and (x & 8) == 8 into (x & 8) >> 3.Chris Lattner2005-04-211-0/+22
| | | | | | | | | | | | | | | | | | | This turns this PPC code: rlwinm r2, r3, 0, 28, 28 cmpwi cr7, r2, 8 mfcr r2 rlwinm r3, r2, 31, 31, 31 into this: rlwinm r2, r3, 0, 28, 28 srwi r2, r2, 3 rlwinm r3, r2, 0, 31, 31 Next up, nuking the extra and. llvm-svn: 21390
* Instcombine this:Chris Lattner2005-04-211-0/+3
| | | | | | | | | | | | | | | | | %shortcirc_val = select bool %tmp.1, bool true, bool %tmp.4 ; <bool> [#uses=1] %tmp.6 = cast bool %shortcirc_val to int ; <int> [#uses=1] into this: %shortcirc_val = or bool %tmp.1, %tmp.4 ; <bool> [#uses=1] %tmp.6 = cast bool %shortcirc_val to int ; <int> [#uses=1] not this: %tmp.4.cast = cast bool %tmp.4 to int ; <int> [#uses=1] %tmp.6 = select bool %tmp.1, int 1, int %tmp.4.cast ; <int> [#uses=1] llvm-svn: 21389
* Teach simplifycfg that setcc is cheap and non-trapping, so that it canChris Lattner2005-04-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | convert this: %tmp.1 = seteq int %i, 0 ; <bool> [#uses=1] br bool %tmp.1, label %shortcirc_done, label %shortcirc_next shortcirc_next: ; preds = %entry %tmp.4 = seteq int %j, 0 ; <bool> [#uses=1] br label %shortcirc_done shortcirc_done: ; preds = %shortcirc_next, %entry %shortcirc_val = phi bool [ %tmp.4, %shortcirc_next ], [ true, %entry ] ; <bool> [#uses=1] to this: %tmp.1 = seteq int %i, 0 ; <bool> [#uses=1] %tmp.4 = seteq int %j, 0 ; <bool> [#uses=1] %shortcirc_val = select bool %tmp.1, bool true, bool %tmp.4 ; <bool> [#uses=1] ... which is later simplified by instcombine into an or. llvm-svn: 21388
* For Bug 543:Reid Spencer2005-04-211-24/+24
| | | | | | | | Standardize the error messages to be in "path: what failed: why" format. Also attempt to use the correct errno to ThrowErrno in situations where the errno value is erased by subsequent system calls. llvm-svn: 21385
* For Bug 543:Reid Spencer2005-04-211-6/+8
| | | | | | | Allow the ThrowErrno function to optionally accept an error number parameter so that callers can specify the error number to be used. llvm-svn: 21384
* Remove trailing whitespace, patch by Markus Oberhumer.Misha Brukman2005-04-202-59/+59
| | | | llvm-svn: 21379
* Add FIXME by Markus Oberhumer from bug 545: not checking for "." in $PATH mayMisha Brukman2005-04-201-0/+2
| | | | | | result in returning executable files that won't be runnable. llvm-svn: 21378
* Do not mark directories as `executable', we only want program filesMisha Brukman2005-04-201-0/+4
| | | | | | Patch by Markus Oberhumer. llvm-svn: 21377
* Ignore dangling symlinks in getDirectoryContents()Misha Brukman2005-04-201-3/+8
| | | | | | Thanks to Markus Oberhumer for the patch! llvm-svn: 21370
* Initialize fields mode, uid, and gid.Misha Brukman2005-04-201-0/+6
| | | | | | Patch by Markus Oberhumer. Thanks! llvm-svn: 21369
* Align comments together for consistencyMisha Brukman2005-04-201-1/+1
| | | | llvm-svn: 21368
* Wrap some long lines.Chris Lattner2005-04-191-3/+9
| | | | | | | | Make IPSCCP strip off dead constant exprs that are using functions, making them appear as though their address is taken. This allows us to propagate some more pool descriptors, lowering the overhead of pool alloc. llvm-svn: 21363
* fix PR549Chris Lattner2005-04-191-1/+3
| | | | llvm-svn: 21360
* Eliminate a broken transformation, fixing PR548Chris Lattner2005-04-191-4/+2
| | | | llvm-svn: 21354
* Add completely untested support for mtcrf/mfcrf encodingChris Lattner2005-04-191-0/+7
| | | | llvm-svn: 21353
* switch over the rest of the formats that use RC to use isDOTChris Lattner2005-04-192-71/+73
| | | | llvm-svn: 21352
* Convert the XForm instrs and XSForm instruction over to use isDOTChris Lattner2005-04-192-52/+60
| | | | llvm-svn: 21351
* Now that the ppc64 and vmx operands of I are always 0, forward substituteChris Lattner2005-04-191-36/+30
| | | | | | them away. llvm-svn: 21350
* convert over bform and iform instructionsChris Lattner2005-04-192-17/+17
| | | | llvm-svn: 21349
* Convert over DForm and DSForm instructionsChris Lattner2005-04-192-90/+80
| | | | llvm-svn: 21348
* Convert XLForm and XForm instructions over to use PPC64 when appropriate.Chris Lattner2005-04-192-129/+112
| | | | llvm-svn: 21347
* Convert XO XS and XFX forms to use isPPC64Chris Lattner2005-04-192-53/+52
| | | | llvm-svn: 21346
* Turn PPC64 and VMX into classes that can be added to instructions instead ofChris Lattner2005-04-192-39/+40
| | | | | | | bits that must be passed up the inheritance hierarchy. Convert MForm and AForm instructions over llvm-svn: 21345
* Next round of PPC CR optimizations. For the following code:Nate Begeman2005-04-181-62/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | int %bar(float %a, float %b, float %c, float %d) { entry: %tmp.1 = setlt float %a, %d %tmp.2 = setlt float %b, %d %or = or bool %tmp.1, %tmp.2 %tmp.3 = setgt float %c, %d %tmp.4 = or bool %or, %tmp.3 %tmp.5 = and bool %tmp.4, true %retval = cast bool %tmp.5 to int ret int %retval } We now emit: _bar: .LBB_bar_0: ; entry fcmpu cr0, f1, f4 fcmpu cr1, f2, f4 cror 0, 0, 4 fcmpu cr1, f3, f4 cror 28, 0, 5 mfcr r2 rlwinm r3, r2, 29, 31, 31 blr Instead of: _bar: .LBB_bar_0: ; entry fcmpu cr7, f1, f4 mfcr r2 rlwinm r2, r2, 29, 31, 31 fcmpu cr7, f2, f4 mfcr r3 rlwinm r3, r3, 29, 31, 31 or r2, r2, r3 fcmpu cr7, f3, f4 mfcr r3 rlwinm r3, r3, 30, 31, 31 or r3, r2, r3 blr llvm-svn: 21321
* silence a bogus warningChris Lattner2005-04-181-1/+1
| | | | llvm-svn: 21320
* Fold setcc of MVT::i1 operands into logical operationsChris Lattner2005-04-181-0/+39
| | | | llvm-svn: 21319
* Another minor simplification: handle setcc (zero_extend x), c -> setcc(x, c')Chris Lattner2005-04-181-0/+45
| | | | llvm-svn: 21318
* Another simple xformChris Lattner2005-04-181-0/+8
| | | | llvm-svn: 21317
* Fold:Chris Lattner2005-04-181-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | // (X != 0) | (Y != 0) -> (X|Y != 0) // (X == 0) & (Y == 0) -> (X|Y == 0) Compiling this: int %bar(int %a, int %b) { entry: %tmp.1 = setne int %a, 0 %tmp.2 = setne int %b, 0 %tmp.3 = or bool %tmp.1, %tmp.2 %retval = cast bool %tmp.3 to int ret int %retval } to this: _bar: or r2, r3, r4 addic r3, r2, -1 subfe r3, r3, r2 blr instead of: _bar: addic r2, r3, -1 subfe r2, r2, r3 addic r3, r4, -1 subfe r3, r3, r4 or r3, r2, r3 blr llvm-svn: 21316
* Make the AND elimination operation recursive and significantly more powerful,Chris Lattner2005-04-181-26/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eliminating an and for Nate's testcase: int %bar(int %a, int %b) { entry: %tmp.1 = setne int %a, 0 %tmp.2 = setne int %b, 0 %tmp.3 = or bool %tmp.1, %tmp.2 %retval = cast bool %tmp.3 to int ret int %retval } generating: _bar: addic r2, r3, -1 subfe r2, r2, r3 addic r3, r4, -1 subfe r3, r3, r4 or r3, r2, r3 blr instead of: _bar: addic r2, r3, -1 subfe r2, r2, r3 addic r3, r4, -1 subfe r3, r3, r4 or r2, r2, r3 rlwinm r3, r2, 0, 31, 31 blr llvm-svn: 21315
* Change codegen for setcc to read the bit directly out of the conditionNate Begeman2005-04-183-45/+36
| | | | | | | | register. Added support in the .td file for the g5-specific variant of cr -> gpr moves that executes faster, but we currently don't generate it. llvm-svn: 21314
* Add support for targets that require stubs for external functions.Chris Lattner2005-04-181-2/+27
| | | | llvm-svn: 21313
* Handle ExternalSymbol operands in the PPC JITChris Lattner2005-04-181-9/+13
| | | | llvm-svn: 21312
* Make pattern isel default for ppcNate Begeman2005-04-155-19/+36
| | | | | | | | | | Add new ppc beta option related to using condition registers Make pattern isel control flag (-enable-pattern-isel) global and tristate 0 == off 1 == on 2 == target default llvm-svn: 21309
* a new simple pass, which will be extended to be more useful in the future.Chris Lattner2005-04-151-0/+213
| | | | | | | | | This pass forward branches through conditions when it can show that the conditions is either always true or false for a predecessor. This currently only handles the most simple cases of this, but is successful at threading across 2489 branches and 65 switch instructions in 176.gcc, which isn't bad. llvm-svn: 21306
OpenPOWER on IntegriCloud