Chris Lattner
ad63a0d6a4
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
ccd0d44133
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
5fff877f74
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
fcc2ae9a85
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
043ec8bb61
Allow getZeroExtend and getSignExtend to work with boolean inputs.
...
llvm-svn: 19210
2005-01-01 15:59:57 +00:00
Chris Lattner
70d0a6155b
Add a useful accessor
...
llvm-svn: 19209
2005-01-01 15:58:55 +00:00
Chris Lattner
7f004e59d8
Add two helper functions.
...
llvm-svn: 19208
2005-01-01 15:58:41 +00:00
Reid Spencer
3ab011eb95
Update to autoconf 2.59 standards.
...
llvm-svn: 19207
2005-01-01 09:26:55 +00:00
Reid Spencer
41ac6a5ebb
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
734b581c5b
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
c820ef21d2
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
a46121ed32
Where do these tabs keep coming from???
...
llvm-svn: 19203
2004-12-31 19:03:31 +00:00
Jeff Cohen
9b439381c3
Mostly cleanup, but also some bug fixes, for win32/Path.cpp
...
llvm-svn: 19202
2004-12-31 19:01:08 +00:00
Reid Spencer
7b4b2407c1
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
e5034a35e0
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
01422b3799
Get rid of those nasty tabs...
...
llvm-svn: 19199
2004-12-31 05:07:26 +00:00
Jeff Cohen
82a2c68071
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
e4d3b8be5f
* 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
f44b349462
* 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
d8594c8a71
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
5de7573398
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
30def4aeda
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
298f85282c
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
89e7c7553c
Fix MINGW compilation errors
...
llvm-svn: 19190
2004-12-30 03:02:31 +00:00
Reid Spencer
53cfb14270
* 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
597e16ea02
Fix a Bourne Shell syntax error in a test
...
llvm-svn: 19183
2004-12-29 06:59:36 +00:00
Reid Spencer
e81bc94b62
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
16ec3b91f1
Bug fixed
...
llvm-svn: 19181
2004-12-29 04:39:50 +00:00
Chris Lattner
b49dd5c526
Fix PR491 and testcase Transforms/DeadStoreElimination/2004-12-28-PartialStore.ll
...
llvm-svn: 19180
2004-12-29 04:36:02 +00:00
Chris Lattner
903f83505d
Add a comment, add a new testcase
...
llvm-svn: 19179
2004-12-29 04:35:30 +00:00
Chris Lattner
814ff906be
New testcase for PR491
...
llvm-svn: 19178
2004-12-29 04:27:26 +00:00
Chris Lattner
992916974e
Bug fixed
...
llvm-svn: 19177
2004-12-29 04:03:23 +00:00
Chris Lattner
37b9eef884
Fix PR490
...
Fix testcase CodeGen/CBackend/2004-12-28-LogicalConstantExprs.ll
llvm-svn: 19176
2004-12-29 04:00:09 +00:00
Chris Lattner
5855827688
new testcase for PR490
...
llvm-svn: 19175
2004-12-29 03:57:25 +00:00
Reid Spencer
ae71156e64
XFAIL this test everywhere.
...
llvm-svn: 19174
2004-12-29 03:17:30 +00:00
Reid Spencer
9dd73a8ff6
XFAIL this everywhere, the CFE doesn't support bitfield initialization.
...
llvm-svn: 19173
2004-12-29 03:16:40 +00:00
Reid Spencer
03a53912a7
Remove potential platform portability issue with size of "int".
...
llvm-svn: 19172
2004-12-29 01:20:24 +00:00
Reid Spencer
091690d283
Correct the name of the variable for the LLVM examples directory so that
...
parallel builds don't attempt to create it twice.
llvm-svn: 19171
2004-12-28 07:59:22 +00:00
Reid Spencer
2201286c2d
Make the x86_64 target names match between def and use. Thanks Misha.
...
llvm-svn: 19170
2004-12-28 07:56:14 +00:00
Reid Spencer
76de36d644
Make the 64-bit x86 target named "x86_64" instead of "AMD64".
...
llvm-svn: 19169
2004-12-28 06:34:11 +00:00
Misha Brukman
e33f31a5bc
Add a note about registering the backend so it's available in LLC and LLI
...
llvm-svn: 19168
2004-12-27 19:05:16 +00:00
Jeff Cohen
1a95a53fc3
Bring VS projects up to date with respect to recent changes
...
llvm-svn: 19167
2004-12-27 16:49:34 +00:00
Reid Spencer
727a291b4e
Don't create symbolic links for lib/System any more. It doesn't need them.
...
llvm-svn: 19166
2004-12-27 09:33:46 +00:00
Reid Spencer
7b07e70f86
Clean up some autoconf cruft
...
* Make the source detection use a file unique to Stacker
* Configure Makefile.common.in with AC_CONFIG_FILES not AC_CONFIG_MAKEFILE
* Use new autoconf format for invoking AC_OUTPUT
llvm-svn: 19165
2004-12-27 08:51:55 +00:00
Reid Spencer
23650b8843
Make it possible to reconfigure a project as well as just LLVM main dir.
...
llvm-svn: 19164
2004-12-27 08:50:27 +00:00
Reid Spencer
298690bde2
Fix a bug that made the nightly tester *really* slow. During changes for
...
portability, the --track-space option was inadvertently ignored. This patch
fixes that so that sys::Process::GetMallocUsage() is only invoked if the
--track-spaces option is given. Apparently the mallinfo() call that
GetMallocUsage() uses is *very* slow, especially when processing very large
modules like projects/llvm-test/MultiSource/Applications/kimwitu++.
llvm-svn: 19163
2004-12-27 08:03:04 +00:00
Reid Spencer
db6309fd55
For PR351:
...
* sys::PreventCoreFiles -> sys::Process::PreventCoreFiles
llvm-svn: 19162
2004-12-27 06:18:02 +00:00
Reid Spencer
1c90f8199e
For PR351:
...
* Ensure #includes are wrapped with appropriate HAVE_ guards
* Account for variations in time.h and sys/time.h inclusion.
* Add macros for getting wait(2) exit status correctly (per autoconf sugg.)
* Implement ThrowErrno in terms of strerror_r, strerror or none based on
what is available on the platform.
llvm-svn: 19161
2004-12-27 06:17:50 +00:00
Reid Spencer
73adbe7c2d
For PR351:
...
* Remove redundant #includes that are now in Unix.h
llvm-svn: 19160
2004-12-27 06:17:39 +00:00
Reid Spencer
b454405d4a
For PR351:
...
* Move implementation of sys::PreventCoreFiles function to this file from
the now defunct SysConfig abstraction.
llvm-svn: 19159
2004-12-27 06:17:27 +00:00