Commit Graph

16628 Commits

Author SHA1 Message Date
Jeff Cohen 5c3261e5f2 Add llvm-ar project to Visual Studio.
llvm-svn: 19230
2005-01-01 22:00:28 +00:00
Jeff Cohen 16034813e6 Add -v option to bison.
llvm-svn: 19229
2005-01-01 21:35:39 +00:00
Jeff Cohen 49123973f8 Add missing file SystemUtils.cpp to Support project.
llvm-svn: 19228
2005-01-01 21:34:18 +00:00
Jeff Cohen 1d2912470a Add llvm-as project to Visual Studio
llvm-svn: 19227
2005-01-01 20:51:41 +00:00
Jeff Cohen 980d6098b6 Add llvm-dis project to Visual Studio
llvm-svn: 19226
2005-01-01 20:18:03 +00:00
Jeff Cohen 08f30c0c33 Put executables into a single directory
llvm-svn: 19225
2005-01-01 19:37:14 +00:00
Jeff Cohen 4560c21dd2 Fix bountiful sources of VC++ 'possible loss of data' warnings
llvm-svn: 19224
2005-01-01 18:58:23 +00:00
Jeff Cohen 031c3d891c Improve TableGen dependencies
Move TableGen generated files out of the src tree
Add descriptions to the custom build steps

llvm-svn: 19223
2005-01-01 18:17:40 +00:00
Reid Spencer 3b8faf995d Add HAVE_SBRK
llvm-svn: 19222
2005-01-01 18:16:16 +00:00
Reid Spencer 9f0ce1772c Ignore some files
llvm-svn: 19221
2005-01-01 18:14:18 +00:00
Chris Lattner 86102b8ad5 This is a bulk commit that implements the following primary improvements:
* We can now fold cast instructions into select instructions that
    have at least one constant operand.
  * We now optimize expressions more aggressively based on bits that are
    known to be zero.  These optimizations occur a lot in code that uses
    bitfields even in simple ways.
  * We now turn more cast-cast sequences into AND instructions.  Before we
    would only do this if it if all types were unsigned.  Now only the
    middle type needs to be unsigned (guaranteeing a zero extend).
  * We transform sign extensions into zero extensions in several cases.

This corresponds to these test/Regression/Transforms/InstCombine testcases:
  2004-11-22-Missed-and-fold.ll
  and.ll: test28-29
  cast.ll: test21-24
  and-or-and.ll
  cast-cast-to-and.ll
  zeroext-and-reduce.ll

llvm-svn: 19220
2005-01-01 16:22:27 +00:00
Chris Lattner da15d4ba49 New testcases that we should combine.
llvm-svn: 19219
2005-01-01 16:14:46 +00:00
Chris Lattner 584e38313b New testcase for common bitfield manipulation instruction sequences.
llvm-svn: 19218
2005-01-01 16:14:18 +00:00
Chris Lattner 421477885f Add a bunch of tests for cases that should be eliminated.
llvm-svn: 19217
2005-01-01 16:13:43 +00:00
Chris Lattner 329d0255ae Add a bunch of tests for ANDs that should be eliminated.
llvm-svn: 19216
2005-01-01 16:13:19 +00:00
Chris Lattner ea4c66a083 This now works.
llvm-svn: 19215
2005-01-01 16:12:52 +00:00
Chris Lattner 83df5d25b7 Fix a FIXME: Select instructions on longs were miscompiled.
While we're at it, improve codegen of select instructions.  For this
testcase:

int %test(bool %C, int %A, int %B) {
  %D = select bool %C, int %A, int %B
  ret int %D
}

We used to generate this code:

_test:
        cmpwi cr0, r3, 0
        bne .LBB_test_2 ;
.LBB_test_1:    ;
        b .LBB_test_3   ;
.LBB_test_2:    ;
        or r5, r4, r4
.LBB_test_3:    ;
        or r3, r5, r5
        blr

Now we emit:

_test:
        cmpwi cr0, r3, 0
        bne .LBB_test_2 ;
.LBB_test_1:    ;
        or r4, r5, r5
.LBB_test_2:    ;
        or r3, r4, r4
        blr

-Chris

llvm-svn: 19214
2005-01-01 16:10:12 +00:00
Chris Lattner 78394258ae Substantially improve the code generated by non-folded setcc instructions.
In particular, instead of compiling this:

bool %test(int %A, int %B) {
  %C = setlt int %A, %B
  ret bool %C
}

to this:

test:
        save %sp, -96, %sp
        subcc %i0, %i1, %g0
        bl .LBBtest_1   !
        nop
        ba .LBBtest_2   !
        nop
.LBBtest_1:     !
        or %g0, 1, %i0
        ba .LBBtest_3   !
        nop
.LBBtest_2:     !
        or %g0, 0, %i0
        ba .LBBtest_3   !
        nop
.LBBtest_3:     !
        restore %g0, %g0, %g0
        retl
        nop

We now compile it to this:

test:
        save %sp, -96, %sp
        subcc %i0, %i1, %g0
        or %g0, 1, %i0
        bl .LBBtest_2   !
        nop
.LBBtest_1:     !
        or %g0, %g0, %i0
.LBBtest_2:     !
        restore %g0, %g0, %g0
        retl
        nop

llvm-svn: 19213
2005-01-01 16:06:57 +00:00
Chris Lattner 3215bb6049 Implement SimplifyCFG/DeadSetCC.ll
SimplifyCFG is one of those passes that we use for final cleanup: it should
not rely on other passes to clean up its garbage.  This fixes the "why are
trivially dead setcc's in the output of gccas" problem.

llvm-svn: 19212
2005-01-01 16:02:12 +00:00
Chris Lattner 21adf7d36e Add new test to make sure simplifycfg doesn't leave around trivially
dead instructions.

llvm-svn: 19211
2005-01-01 16:00:56 +00:00
Chris Lattner 1ece6f83ba Allow getZeroExtend and getSignExtend to work with boolean inputs.
llvm-svn: 19210
2005-01-01 15:59:57 +00:00
Chris Lattner 3196de7663 Add a useful accessor
llvm-svn: 19209
2005-01-01 15:58:55 +00:00
Chris Lattner 094e8b660b Add two helper functions.
llvm-svn: 19208
2005-01-01 15:58:41 +00:00
Reid Spencer 97d6cf262f Update to autoconf 2.59 standards.
llvm-svn: 19207
2005-01-01 09:26:55 +00:00
Reid Spencer 948499e820 Correct the conditional test for non-portable tools so that it will
correctly omit them for non-Unix operating systems.

llvm-svn: 19206
2004-12-31 22:56:14 +00:00
Reid Spencer d7287e05e3 For PR351:
Make LLVM_ON_UNIX and LLVM_ON_WIN32 available in the makefiles

llvm-svn: 19205
2004-12-31 22:54:28 +00:00
Reid Spencer cdf4d46551 Describe both objdir==srcdir and objdir!=srcdir methods of building LLVM
libraries and tools. Thanks to Henrik Bach for this suggestion.

llvm-svn: 19204
2004-12-31 19:48:59 +00:00
Jeff Cohen b6ecaa2d1c Where do these tabs keep coming from???
llvm-svn: 19203
2004-12-31 19:03:31 +00:00
Jeff Cohen 25dcdcc973 Mostly cleanup, but also some bug fixes, for win32/Path.cpp
llvm-svn: 19202
2004-12-31 19:01:08 +00:00
Reid Spencer 0f371a1637 Fix a compilation error for the case where mallinfo() is not available.
llvm-svn: 19201
2004-12-31 05:53:27 +00:00
Reid Spencer 0fcca1262b For PR351:
* lib/System depends on sbrk(3), make sure we check for it.

llvm-svn: 19200
2004-12-31 05:49:15 +00:00
Jeff Cohen 63f13c4cbc Get rid of those nasty tabs...
llvm-svn: 19199
2004-12-31 05:07:26 +00:00
Jeff Cohen 98aff88c9b Bring win32/Path.cpp up to date with respect to Unix/Path.cpp
llvm-svn: 19198
2004-12-31 04:39:07 +00:00
Reid Spencer 234dc34c77 * Add missing libraries: Linker, Archive, SparcV8
* Make library descriptions consistently lower case.

llvm-svn: 19197
2004-12-31 00:13:14 +00:00
Reid Spencer 266325e6d8 * Don't include weak definitions as a definition
* Make subordinate libraries presented with a vertical list instead of all
  listed on a single line.

llvm-svn: 19196
2004-12-30 23:13:12 +00:00
Reid Spencer 72767f611c Add a section on library dependencies now that GenLibDeps.html is written.
llvm-svn: 19195
2004-12-30 23:12:04 +00:00
Reid Spencer 271ed74132 A Perl script to generate an HTML definition list containing the LLVM
library dependencies, for documentation purposes.

llvm-svn: 19194
2004-12-30 23:07:56 +00:00
Reid Spencer e97198a38e Fix the help documentation to not imply multiple archive files can be
processed.

llvm-svn: 19193
2004-12-30 17:51:57 +00:00
Reid Spencer 996ec72d48 For PR351:
* Place a try/catch block around the entire tool to Make sure std::string
  exceptions are caught and printed before exiting the tool.
* Make sure we catch unhandled exceptions at the top level so that we don't
  abort with a useless message but indicate than an unhandled exception was
  generated.

llvm-svn: 19192
2004-12-30 05:36:08 +00:00
Jeff Cohen a6d9c1415c Fix MINGW compilation errors
llvm-svn: 19190
2004-12-30 03:02:31 +00:00
Reid Spencer 3d745d4378 * Fix a bug in an m4 macro that used an incorrect test operator
* Add CAN_DLOPEN_SELF so we can determine if dlopen(0) will open the
  program or not.
* Correct a warning messages to be a little more specific on what it checks

llvm-svn: 19184
2004-12-29 07:07:57 +00:00
Reid Spencer 42eaef40d8 Fix a Bourne Shell syntax error in a test
llvm-svn: 19183
2004-12-29 06:59:36 +00:00
Reid Spencer 5309e843d3 Fix one of the names to not have a . in front of it.
llvm-svn: 19182
2004-12-29 05:47:04 +00:00
Chris Lattner b5c253a58b Bug fixed
llvm-svn: 19181
2004-12-29 04:39:50 +00:00
Chris Lattner 13516fe2e7 Fix PR491 and testcase Transforms/DeadStoreElimination/2004-12-28-PartialStore.ll
llvm-svn: 19180
2004-12-29 04:36:02 +00:00
Chris Lattner f2a5963737 Add a comment, add a new testcase
llvm-svn: 19179
2004-12-29 04:35:30 +00:00
Chris Lattner 44b225d4d4 New testcase for PR491
llvm-svn: 19178
2004-12-29 04:27:26 +00:00
Chris Lattner c6141111a5 Bug fixed
llvm-svn: 19177
2004-12-29 04:03:23 +00:00
Chris Lattner 93feeb18f1 Fix PR490
Fix testcase CodeGen/CBackend/2004-12-28-LogicalConstantExprs.ll

llvm-svn: 19176
2004-12-29 04:00:09 +00:00
Chris Lattner 5c87df3b7b new testcase for PR490
llvm-svn: 19175
2004-12-29 03:57:25 +00:00