Commit Graph

9120 Commits

Author SHA1 Message Date
Chris Lattner
ee749d7488 Handle static alloca arguments to PHI nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19409 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 01:16:24 +00:00
Chris Lattner
1482458b23 Implement varargs and returnaddress/frameaddress intrinsics. With this
patch, all of SingleSource/UnitTests passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19408 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 00:01:27 +00:00
Chris Lattner
39ae362279 Use new interfaces to correctly lower varargs and return/frame address intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19407 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 00:00:49 +00:00
Chris Lattner
64e14b1679 Add support for llvm.setjmp and longjmp. Only 3 SingleSource/UnitTests fail now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19404 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 22:48:57 +00:00
Jeff Cohen
534927d82d Add even more missing createXxxPass functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19402 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 22:01:16 +00:00
Chris Lattner
b0802651bf Okay 15th time is the charm. Looking at the vector size is useless as it
gets clobbered by a previous statement.  This fixes all calls finally.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19399 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:51:36 +00:00
Chris Lattner
6cc70ef0f9 Okay, my off by one was actually off by two. This fixes Generic/2003-07-07-BadLongConst.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19398 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:39:31 +00:00
Chris Lattner
e3304a3d24 Tighten up assertions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19397 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:35:13 +00:00
Chris Lattner
ce45d65d9a Fix off by one error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19396 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:31:34 +00:00
Chris Lattner
7d7a0ed4ec Allow arrays to have more than 4G elements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19395 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:19:51 +00:00
Jeff Cohen
e269a1ac1c Use size_t instead of long to represent memory usage. long is 32 bits
on 64-bit Windows.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19393 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:15:57 +00:00
Chris Lattner
9dacd128b4 Silence warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19392 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:13:44 +00:00
Chris Lattner
813c815282 Silence VS warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19391 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:13:19 +00:00
Chris Lattner
a8101c163d Silence VS warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19390 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:07:03 +00:00
Chris Lattner
d564496b46 Silence VS warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19389 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:05:34 +00:00
Chris Lattner
dea18b6c0d Silence VS warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19388 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:59:10 +00:00
Chris Lattner
28696bee02 Silence warnings from VS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19386 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:55:00 +00:00
Chris Lattner
5e5fb942e6 Silence VS warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19385 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:53:50 +00:00
Chris Lattner
f26bc8ef48 Silence VS warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19384 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:52:31 +00:00
Chris Lattner
22bc934720 Fix VS warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19383 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:48:40 +00:00
Chris Lattner
4d0801b243 Fix VS warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19382 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:45:31 +00:00
Chris Lattner
652f3cf76f Fix uint64_t -> unsigned VS warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19381 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:42:22 +00:00
Chris Lattner
d4bc564531 Silence VS warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19380 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:37:20 +00:00
Chris Lattner
2cc34627bb Silence warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19379 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:34:41 +00:00
Chris Lattner
25dc891a3d Do not throw away bits for no reason
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19378 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:32:59 +00:00
Chris Lattner
7cf9ad3698 Silence a VS warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19377 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:31:31 +00:00
Chris Lattner
5188ad735c Adjust to changes in LowerCallTo interface
Minor bugfixes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19376 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:28:19 +00:00
Chris Lattner
4e6c746899 Implement handling of most long operators through libcalls.
Fix a bug legalizing "ret (Val,Val)"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19375 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:27:05 +00:00
Chris Lattner
cf5734dddd Adjust to changes in LowerCAllTo interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19374 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 19:26:18 +00:00
Jeff Cohen
bf65268def Add more missing createXxxPass functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19370 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 17:21:40 +00:00
Chris Lattner
ae0aacb833 Add support for FP->INT conversions and back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19369 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 08:08:56 +00:00
Chris Lattner
8c92628d1c Wrap long line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19367 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 06:59:50 +00:00
Chris Lattner
5d2c6c784b Implement the 'store FPIMM, Ptr' -> 'store INTIMM, Ptr' optimization for
all targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19366 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 06:25:56 +00:00
Chris Lattner
623f70dd4c 1ULL << 64 is undefined, don't do it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19365 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 06:24:30 +00:00
Chris Lattner
7ab65934a0 The X86 instruction selector already handles codegen of:
store float 123.45, float* %P

as an integer store.  This adds handling of float immediate stores as integers
for arguments passed function calls.

This is now tested by CodeGen/X86/store-fp-constant.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19364 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 05:45:24 +00:00
Chris Lattner
7c68ec6b70 Fix a pointer invalidation problem. This fixes Generic/badarg6.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19361 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 23:32:00 +00:00
Chris Lattner
5351e9b172 Fold conditional branches on constants away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19360 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 22:49:57 +00:00
Chris Lattner
4287d5e355 Fix a thinko in the reassociation code, fixing Generic/badlive.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19359 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 22:44:09 +00:00
Chris Lattner
b00a6425de Add support for truncating integer casts from long.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19358 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 22:37:48 +00:00
Chris Lattner
8afc48e44a Fix a bug in load expansion legalization and ret legalization. This fixes
CodeGen/Generic/select.ll:castconst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19357 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 22:28:47 +00:00
Chris Lattner
c7af17923e Legalize unconditional branches too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19356 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 22:12:08 +00:00
Chris Lattner
7cc4777a26 Implement support for long GEP indices on 32-bit archs and support for
int GEP indices on 64-bit archs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19354 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 21:56:57 +00:00
Chris Lattner
fd8c39b773 Simplify: truncate ({zero|sign}_extend (X))
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19353 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 21:56:24 +00:00
Chris Lattner
03c0cf822e implement legalization of a bunch more operators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19352 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 21:45:56 +00:00
Chris Lattner
fad71ebe1e Fix another bug legalizing calls!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19350 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 21:35:32 +00:00
Chris Lattner
f44fd88e9c Fix handling of dead PHI nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19349 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 21:34:19 +00:00
Chris Lattner
ebda942efc Fix a bug legalizing calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19348 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 21:34:13 +00:00
Chris Lattner
62fd269c14 After legalizing a DAG, delete dead nodes to save space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19346 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 21:09:37 +00:00
Chris Lattner
0e12e6e041 Implement RemoveDeadNodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19345 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 21:09:16 +00:00
Chris Lattner
c18ae4cb6a Teach legalize how to handle condbranches
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19339 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 08:19:42 +00:00
Chris Lattner
18ad19488d Allow the selection-dag based selector to be diabled with -disable-pattern-isel.
For now, this is the default, as the current selector is missing some big pieces.
To enable the new selector, pass -disable-pattern-isel=false to llc or lli.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19335 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:50:50 +00:00
Chris Lattner
8acb1ba04d Reimplementation of the X86 pattern isel. This is still missing many large
pieces, but can already do amazing things in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19334 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:49:41 +00:00
Chris Lattner
d844d0128a This file is now dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19333 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:49:05 +00:00
Chris Lattner
95cdb36714 Add a new prototype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19332 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:48:33 +00:00
Chris Lattner
1c08c714bb Initial implementation of the SelectionDAGISel class. This contains most
of the code for lowering from LLVM code to a SelectionDAG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19331 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:47:53 +00:00
Chris Lattner
b75c12de67 This file is obsolete
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19330 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:47:23 +00:00
Chris Lattner
3e928bbd61 Initial implementation of the DAG legalization. This still has a long way
to go, but it does work for some non-trivial cases now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19329 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:47:09 +00:00
Chris Lattner
c3aae25116 Complete rewrite of the SelectionDAG class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19327 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:46:32 +00:00
Chris Lattner
310968cbbb First draft of new Target interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19324 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:44:53 +00:00
Chris Lattner
fe59d36c45 Add convenience method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19321 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:40:32 +00:00
Misha Brukman
60766f7d41 Convert tabs to spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19320 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:05:34 +00:00
Jeff Cohen
d9ed8c8880 Add missing createXxxPass functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19319 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 06:57:28 +00:00
Jeff Cohen
30becbda10 Add missing include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19315 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 05:42:13 +00:00
Chris Lattner
6ac95f9679 Codegen -1 and -0.0 more efficiently. This implements CodeGen/X86/negatize_zero.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19313 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-06 21:19:16 +00:00
Chris Lattner
488742a28e No need to pessimize current code for future possibilities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19311 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-06 16:26:38 +00:00
Jeff Cohen
f5e58f8f43 Put createLoopUnswitchPass() into proper namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19306 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-06 05:47:18 +00:00
Jeff Cohen
8ca7191599 Add missing include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19305 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-06 05:46:44 +00:00
Jeff Cohen
d01f65aea1 Fix CBE code so that it compiles with VC++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19303 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-06 04:21:49 +00:00
Chris Lattner
5384b38ccc 1. If a double FP constant must be put into a constant pool, but it can be
precisely represented as a float, put it into the constant pool as a
   float.
2. Use the cbw/cwd/cdq instructions instead of an explicit SAR for signed
   division.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19291 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-05 16:30:14 +00:00
Chris Lattner
0539313fe5 Minor optimization to allocate R8 registers in a better order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19289 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-05 16:09:16 +00:00
Chris Lattner
71d94d16b6 To not break TBAA rules, use a union.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19280 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-04 01:56:57 +00:00
Jeff Cohen
1c32f79a82 Revert elimination of global variable hack... still needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19273 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-03 16:34:19 +00:00
Chris Lattner
10197ff5cd ADC and IMUL are also commutable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19264 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-03 01:27:59 +00:00
Chris Lattner
35e5c7c186 This hunk:
-  unsigned TrueValue = getReg(TrueVal, BB, BB->begin());
+  unsigned TrueValue = getReg(TrueVal);

Fixes the PPC regressions from last night.

The other hunk is just a clarity improvement.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19263 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 23:07:31 +00:00
Reid Spencer
d6b1f5fee6 Correct the case of a #include directory name, just in case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19254 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 09:45:04 +00:00
Jeff Cohen
40296bdf27 Eliminate the use of the global variable hack in the X86 target that was used
to get Visual Studio to link in X86.lib to the executables that need it.  There
is another way of doing it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19252 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 04:23:12 +00:00
Chris Lattner
5aee0b97aa Disable 2->3 address promotion of add and inc instructions to LEA's. In
addition to being three address, LEA's don't set the flags.

This fixes 186.crafty.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19251 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 04:18:17 +00:00
Chris Lattner
5dd350defd Add a new method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19249 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 02:38:18 +00:00
Chris Lattner
eb96ec52ff Add support for SETNPr to lower to memory form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19248 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 02:37:46 +00:00
Chris Lattner
bcea4d6f28 Implement the convertToThreeAddress method, add support for inverting JP/JNP
branches.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19247 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 02:37:07 +00:00
Chris Lattner
cc65beeb39 Two changes here:
1. Add new instructions for checking parity flags: JP, JNP, SETP, SETNP.
2. Set the isCommutable and isPromotableTo3Address bits on several
   instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19246 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 02:35:46 +00:00
Chris Lattner
cfa0f2edd3 Make the 2-address instruction lowering pass smarter in two ways:
1. If we are two-addressing a commutable instruction and the LHS is not the
   last use of the variable, see if the instruction is the last use of the
   RHS.  If so, commute the instruction, allowing us to avoid a
   register-register copy in many cases for common instructions like ADD, OR,
   AND, etc on X86.
2. If #1 doesn't hold, and if this is an instruction that also existing in
   3-address form, promote the instruction to a 3-address instruction to
   avoid the register-register copy.  We can do this for several common
   instructions in X86, including ADDrr, INC, DEC, etc.

This patch implements test/Regression/CodeGen/X86/commute-two-addr.ll,
overlap-add.ll, and overlap-shift.ll when I check in the X86 support for it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19245 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 02:34:12 +00:00
Chris Lattner
273f2280f2 Add some bits that can be set for instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19241 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 02:27:48 +00:00
Reid Spencer
52b50a64ec Make printing a warning message optional in CheckBytecodeOutputToConsole.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19240 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 00:10:03 +00:00
Reid Spencer
436f23ebf5 Implement a function to print a warning if bytecode output is to be sent to
a terminal/console.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19237 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-01 23:56:20 +00:00
Jeff Cohen
c6dffe0a5b Add functions for determining if the stdin/out/err is connected to a
console or not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19236 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-01 22:54:05 +00:00
Reid Spencer
a01aade75d Add functions for determining if the stdin/out/err is connected to a
console or not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19233 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-01 22:29:26 +00:00
Chris Lattner
6e7ba45460 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19220 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-01 16:22:27 +00:00
Chris Lattner
6dec0b09d5 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19214 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-01 16:10:12 +00:00
Chris Lattner
e7f96c515e 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19213 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-01 16:06:57 +00:00
Chris Lattner
13b2f764c0 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19212 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-01 16:02:12 +00:00
Chris Lattner
f5ac6c27ac Allow getZeroExtend and getSignExtend to work with boolean inputs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19210 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-01 15:59:57 +00:00
Jeff Cohen
45e88d68b3 Where do these tabs keep coming from???
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19203 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-31 19:03:31 +00:00
Jeff Cohen
51b8d211f6 Mostly cleanup, but also some bug fixes, for win32/Path.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19202 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-31 19:01:08 +00:00
Reid Spencer
92ced2f16a Fix a compilation error for the case where mallinfo() is not available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19201 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-31 05:53:27 +00:00
Jeff Cohen
d40a7de229 Get rid of those nasty tabs...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19199 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-31 05:07:26 +00:00
Jeff Cohen
ebcb9b3807 Bring win32/Path.cpp up to date with respect to Unix/Path.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19198 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-31 04:39:07 +00:00
Jeff Cohen
c18671cdcd Fix MINGW compilation errors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19190 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-30 03:02:31 +00:00
Chris Lattner
da16d8c00b Fix PR491 and testcase Transforms/DeadStoreElimination/2004-12-28-PartialStore.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19180 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-29 04:36:02 +00:00
Chris Lattner
f376e5e5f6 Fix PR490
Fix testcase CodeGen/CBackend/2004-12-28-LogicalConstantExprs.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19176 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-29 04:00:09 +00:00
Reid Spencer
56127624e7 Remove potential platform portability issue with size of "int".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19172 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-29 01:20:24 +00:00
Reid Spencer
aeb47b8db9 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++.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19163 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 08:03:04 +00:00
Reid Spencer
7c1e2f96cd 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19161 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 06:17:50 +00:00
Reid Spencer
51b9f62462 For PR351:
* Remove redundant #includes that are now in Unix.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19160 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 06:17:39 +00:00
Reid Spencer
68fdcc123b For PR351:
* Move implementation of sys::PreventCoreFiles function to this file from
  the now defunct SysConfig abstraction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19159 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 06:17:27 +00:00
Reid Spencer
af2f208e7c For PR351:
* Ensure #includes are wrapped with appropriate HAVE_ guards
* Ensure variations in "dirent" structure are accounted for.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19158 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 06:17:15 +00:00
Reid Spencer
07c00d3e9f For PR351:
* Ensure #includes are wrapped with appropriate HAVE_ guards
* Consolidate implementation from operating system specific directory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19157 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 06:17:03 +00:00
Reid Spencer
cdf54d04c7 For PR351:
* Ensure #includes are wrapped with appropriate HAVE_ guards


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19156 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 06:16:52 +00:00
Reid Spencer
c33e4930d4 For PR351:
* Consolidate implementation for Unix systems into Unix/TimeValue.cpp
* Avoid use of symbolic link to #include platform-specific implementation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19155 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 06:16:38 +00:00
Reid Spencer
424ac897ca For PR351:
* Consolidate implementation for Unix systems into Unix/Program.cpp
* Avoid use of symbolic link to #include platform-specific implementation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19154 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 06:16:25 +00:00
Reid Spencer
c87d7cc788 For PR351:
* Consolidate implementation for Unix systems into Unix/Signals.cpp
* Avoid use of symbolic link to #include platform-specific implementation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19153 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 06:16:11 +00:00
Reid Spencer
ce7999598a For PR351:
* Consolidate implementation for Unix systems into Unix/Memory.cpp
* Avoid use of symbolic link to #include platform-specific implementation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19152 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 06:15:57 +00:00
Reid Spencer
b9ed2c17da For PR351:
* Consolidate implementation for Unix systems into Unix/MappedFile.cpp
* Avoid use of symbolic link to #include platform-specific implementation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19151 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 06:15:43 +00:00
Reid Spencer
0098e64da7 For PR351:
* Consolidate implementation for Unix systems into Unix/Process.cpp
* Avoid use of symbolic link to #include platform-specific implementation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19150 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 06:15:29 +00:00
Reid Spencer
d0ae93f022 For PR351:
SysConf abstraction was pointless because it had a single function in it that
pertained only to the current process. So merge it into the Process abstraction
and remove the files completely.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19149 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 06:15:14 +00:00
Jeff Cohen
c2b9162e5d mingw doesn't support the official debug API.
Old versions of the C runtime somehow get loaded into the process.  Make
sure they aren't searched for symbols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19141 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-25 04:50:17 +00:00
Jeff Cohen
a4c9751265 Get VC++ building again
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19140 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-24 16:26:47 +00:00
Jeff Cohen
1a4663516b Eliminate use of ltdl.c when doing a VC++ build. Because libtool isn't used,
ltdl's LGPL license would infect all of LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-24 07:57:09 +00:00
Reid Spencer
69a1616106 For PR351:
Merge implementations of isValid and GetTemporaryDirectory into this file. There
is not any point having the operating system specific files for such little
variation between the Unix family of systems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19134 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-24 06:29:42 +00:00
Reid Spencer
f77bdc4892 For PR351:
This implementation is no longer needed, its been merged to Unix/Path.cpp since
there is such little variation between the platforms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19133 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-24 06:29:28 +00:00
Reid Spencer
dafe55f64b For PR351:
Use the LLVM_ON_UNIX and LLVM_ON_WIN32 #defines to include the implementation
instead of relying upon the "platform" link


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19132 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-24 06:29:17 +00:00
Reid Spencer
ebf8d0ecdf Resurrect this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19130 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-24 06:03:31 +00:00
Reid Spencer
48a1f4237d Remove these files as they are not being included any more. DynamicLibrary
is now implemented via ltdl.cpp which has its own way of dealing with
the different platforms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19129 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-24 03:59:46 +00:00
Jeff Cohen
cb652550b6 Fix VC++ compilation error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19124 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-24 02:38:34 +00:00
Reid Spencer
a36c9a4dd3 Put CopyFile in the sys namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19122 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-23 22:14:32 +00:00
Misha Brukman
4d099f7d6c Wrap at 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19121 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-23 21:17:41 +00:00
Reid Spencer
4618957d0d Correct the comments and file header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19120 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-23 21:16:46 +00:00
Reid Spencer
1e296bf046 Try to speed up gccld hot spot in BasicVN::getEqualNumberNodes by making
a function call at the core of the loop inline and removing unused
stack variables from an often called function. This doesn't improve things
much, the real saving will be by reducing the number of calls to this
function (100K+ when linking kimwitu++).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19119 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-23 21:13:26 +00:00
Jeff Cohen
2e5f445da0 Patch to fix mingw compilation problem contributed by Henrik.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19112 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-23 03:44:40 +00:00
Reid Spencer
302d81e819 For PR351:
Include local FDHandle.h file now that FDHandle is local to this library
and not in lib/System/FileUtilities.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19108 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-22 10:25:06 +00:00
Reid Spencer
55cf0a6dc9 For PR351:
FDHandle class (non-portable) moved here from lib/Support/FileUtilities


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19107 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-22 10:24:55 +00:00
Reid Spencer
772192cf36 For PR351:
Move non-portable FDHandle class to its only user: lib/Debugger


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19106 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-22 10:24:43 +00:00
Reid Spencer
0a834720db For PR351:
Remove unix specific code (use of errno and read) from the reader.
Thanks to Jeff Cohen for pointing this out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19081 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-21 07:51:33 +00:00
Reid Spencer
78076f6140 Put the CopyFile function explicitly in the sys namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19079 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-21 03:27:08 +00:00
Reid Spencer
c24e94e6b5 Include <cassert> for Cygwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19077 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-21 00:22:51 +00:00
Reid Spencer
a025270b50 Cygwin doesn't like .. through a link, so drop the ..
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19076 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 22:21:41 +00:00
Reid Spencer
7d05563324 Fix a bug where system time always equals user time
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19075 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 21:44:27 +00:00
Reid Spencer
8b6628997f Implement GetTimeUsage correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19074 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 21:43:33 +00:00
Reid Spencer
ed5e7bf422 Provide a getrusage based implementation of GetTotalMemoryUsage and use
the ru_maxrss field as an approximation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19072 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 16:33:37 +00:00
Reid Spencer
bc1ee84001 Consistently use the same #if style. Also, fix a bug testing for sbrk(3)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19071 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 16:06:44 +00:00
Reid Spencer
cdb28bed6b Remove unnecessary #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19070 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 06:38:12 +00:00
Reid Spencer
099557b629 Be double sure about including sys/stat.h by wrapping the inclusion in
an "#if defined(HAVE_SYS_STAT_H)".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19069 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 06:34:02 +00:00
Reid Spencer
7904c4ffe4 Remove the #include of llvm/Config/unistd.h as it is no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19067 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 04:52:04 +00:00
Reid Spencer
4ca8e71068 Remove un-needed #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19061 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 04:15:44 +00:00
Reid Spencer
0255abb41a Put some header files back that Win32 needs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19058 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 03:59:23 +00:00
Jeff Cohen
a1b3d3d24c Keep up with lib/System changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19057 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 03:24:56 +00:00
Jeff Cohen
e133721047 Fix problems uncovered by VC++ (first time compiled by VC++)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19056 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 03:23:46 +00:00
Reid Spencer
721d9aa060 For PR351:
* Implement GetMallocUsage to get usage of malloc heap
* Implement GetMemoryUsage to get total memory usage of process
* Implement GetTimeUsage to get elapsed/user/system time


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19055 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 00:59:28 +00:00
Reid Spencer
a4775838e2 For PR351:
No need for Unix/SUS/Process.cpp any more, just ifdef it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19054 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 00:59:16 +00:00
Reid Spencer
df52c9aaf2 For PR351:
* Move system dependent implementation out of this file.
* Make implementation use sys::Process::GetMallocUsage where necessary.
* Make implementation use sys::Process::GetTimeUsage where necessary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19053 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 00:59:04 +00:00
Misha Brukman
210b32b16f * Use "" for LLVM include files, not <>
* llvm/Config/alloca.h already #includes config.h
* Minor readability/stylistic changes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19048 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 00:16:38 +00:00
Misha Brukman
6782835604 Use <> for system #include files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19046 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-19 19:27:11 +00:00
Brian Gaeke
5d112c452a Make references to 'struct sigaction' compile under Solaris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19045 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-19 18:58:11 +00:00
Reid Spencer
2a7d9e98ba For PR351:
Move the functionality of RunProgramWithTimeout into the ExecuteAndWait
function: support a timeout and I/O redirects


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19043 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-19 18:00:44 +00:00
Reid Spencer
41394ec672 For PR351:
Add a needed include.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19042 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-19 18:00:32 +00:00
Reid Spencer
b31baa88a5 For PR351:
* Pass sys::Path instead of std::string for paths
* Correct the types of arguments passed to RunProgramWithTimeout due to its
  interface using sys::Path instead of std::string
* Replace "/dev/null" (not portable) with empty string which
  sys::Program::ExecuteAndWait recognizes as "redirect to bit bucket"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19041 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-19 18:00:21 +00:00
Reid Spencer
a434805014 For PR351:
* Remove unneeded header files.
* Move RedirectFD static function to lib/System/Unix/Program.cpp
* Delete RunProgramWithTimeout, now implemented by
  sys::Program::ExecuteAndWait. RunProgramWithTimeout is now a convenience func.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19040 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-19 18:00:09 +00:00
Jeff Cohen
f8cdb85d05 Fix win32 breakage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19028 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-18 06:42:15 +00:00
Chris Lattner
6b4f501470 Remove unused enum value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19024 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-17 22:41:46 +00:00
Reid Spencer
6b4bd6b35c Move the #include of sys/stat.h inside the linux "hack" for the stat
family of functions so it gets noticed if we ever remove this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19022 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-17 19:09:16 +00:00
Chris Lattner
84c556e92a Remove unused #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19021 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-17 19:07:04 +00:00
Reid Spencer
382343d78f Only #include sys/stat.h if we're on linux where we have the PR274 problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19020 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-17 18:56:29 +00:00
Chris Lattner
41925f87d3 Actually overload the virtual method. This fixes
Regression/Analysis/GlobalsModRef/purecse.ll.  Isn't this what the
-Woverload-whatever flag would warn about :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19018 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-17 17:12:24 +00:00
Chris Lattner
8cdbc35216 Change the sentinal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19007 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-17 00:46:51 +00:00
Chris Lattner
11cf7aa775 Create a stack slot for the return address lazily instead of eagerly. This
save small amounts of time for functions that don't call llvm.returnaddress
or llvm.frameaddress (which is almost all functions).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19006 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-17 00:07:46 +00:00
Tanya Lattner
acd6782470 Chris is a pain ;) Removing reassociate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19005 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 23:16:16 +00:00
Tanya Lattner
78943f7edf Removing commented out lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19004 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 23:13:16 +00:00
Tanya Lattner
9fde12b747 Removed LICM and GCSE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19003 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 23:07:36 +00:00
Reid Spencer
9ac141823d For PR351:
* Make the OutputC and OutputAsm functions work with sys::Path for the output
  file name instead of using std::string.
* Get rid of extraneous "toString" calls.
* Change "removeFile" to sys::Path::destroyFile()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19000 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 23:01:34 +00:00
Reid Spencer
a2f7ed7035 For PR351:
* Remove the "removeFile" function, now implemented by the
  sys::Path::destroyFile method.
* Make the FileRemove work with a sys::Path instead of a std::string


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18999 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 23:00:05 +00:00
Chris Lattner
7f2b41e316 Remove dead #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18994 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 19:32:38 +00:00
Reid Spencer
a834f5d793 Fix a compile error. config.h is now needed because DataTypes.h doesn't
include it any more.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18993 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 19:19:24 +00:00
Chris Lattner
84b85c8262 Adjust to changes in asmwriter filenames
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18987 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 17:33:24 +00:00
Chris Lattner
47f9dd14b2 Specify all of the targets built.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18985 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 17:26:44 +00:00
Chris Lattner
42c7a16955 Use the rules in Makefile.rules to build SparcV9GenCodeEmitter.inc instead
of custom rules.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18984 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 16:47:56 +00:00
Chris Lattner
24d5d5d90b Fix header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18983 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 16:47:03 +00:00
Chris Lattner
be686a8897 Factor out common .td file chunks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18982 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 16:31:57 +00:00
Jeff Cohen
b8b836d019 Expository comment submitted by Henrik Bach
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18976 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 04:06:56 +00:00
Chris Lattner
3e3b6f7a46 Fix PR485, instead of emitting zero sized arrays, emit arrays of size 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18974 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 23:13:15 +00:00
Reid Spencer
00e8930206 Change the signatures of the destroyFile and destroyDirectory methods to
const because they affect the file system, not the Path object.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18973 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 23:02:10 +00:00
Reid Spencer
24ac21f937 Remove the CFE's lib directory from the bytecode path because LLVM should
be agnostic to the needs of any specific FE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18969 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 22:22:51 +00:00
Reid Spencer
835b6941fd Remove automatic insertion of CFE's lib directory into the bytecode path
because LLVM should be agnostic to the needs of specific front ends.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18968 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 22:21:42 +00:00
Chris Lattner
56998b26ae Add a verifier assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18965 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 20:23:49 +00:00
Chris Lattner
fd4b3c4774 Eliminate a virtual method call
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18964 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 18:14:04 +00:00
Chris Lattner
5226f6a901 Fix a bug in -no-aa that caused two DSGraph tests to XPASS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18962 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 17:13:24 +00:00
Reid Spencer
07f9f4e2a4 Fix a file overwrite bug in llvm-ar introduced by changes to
createTemporaryFile semantics where it doesn't create a fully unique name
if the basename doesn't exist. This functionality is now optionally
provided by the boolean reuse_current parameter to createTemporaryFile and
makeUnique. The default values differ because of the way these functions
are used in LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18961 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 08:32:45 +00:00
Chris Lattner
68a9d3eb38 Adjust to new interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18958 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 07:22:25 +00:00
Chris Lattner
0af024c5d0 Adjust to new alias analysis interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18957 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 07:22:13 +00:00
Chris Lattner
5b2103405b Move virtual method call out of loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18955 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 07:04:32 +00:00
Jeff Cohen
003485a0b3 Make Win32 TimeValue::toString() re-entrant and work with mingw
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18954 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 04:28:44 +00:00
Jeff Cohen
ab68df02bc Fix VC++ compilation errors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18953 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 04:08:15 +00:00
Reid Spencer
cda985e191 For PR351:
* Remove #inclusion of FileUtilities.h, not needed any more.
* Convert getUniqueFilename -> sys::Pat::makeUnique()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18948 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 01:51:56 +00:00
Reid Spencer
c29befb554 For PR351:
* Fix implementation and documentation about LLVMGCCDIR/bytecode-libs
* Add the makeUnique method, replacement for getUniqueFilename in Support.
* Add the sys::CopyFile function, replacement for CopyFile in Support.
* Move GetLLVMConfigDir() into generic code area since its generic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18947 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 01:50:13 +00:00
Reid Spencer
67f6d3ad30 For PR351:
Remove getUniqueFilename and CopyFile. These are now implemented by
sys::Path::makeUnique and sys::CopyFile, respectively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18946 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 01:46:54 +00:00
Chris Lattner
0ce8580fcd Constant exprs are not efficiently negatable in practice. This disables
turning X - (constantexpr) into X + (-constantexpr) among other things.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18935 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 20:08:06 +00:00
Reid Spencer
3b0cc78c60 Add the getMagicNumber method.
Patch contributed by Henrik Bach. Thanks Henrik!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18933 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 18:42:13 +00:00
Brian Gaeke
5761805d27 The mystery of Olden/tsp solved, and more opportunities for speedup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18932 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 09:10:10 +00:00
Brian Gaeke
6b260e2638 Get rid of shifts by zero in most cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18931 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 08:21:02 +00:00
Jeff Cohen
626e38e481 Implement Win32 Path::getStatusInfo(), TimeValue::toString()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18930 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 05:26:43 +00:00
Reid Spencer
e2e2411f40 For PR351:
Implement the new environment pointer for ExecuteAndWait


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18928 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 04:18:51 +00:00
Reid Spencer
44f6966ef0 For PR351:
* Remove the ExecWait function. This is now in sys::Program::ExecuteAndWait


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18927 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 04:18:15 +00:00
Reid Spencer
f6e5a25f3a Revert the last patch as it causes a static destruction ordering problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18925 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 03:55:21 +00:00
Reid Spencer
51ab8ec66e For PR351:
Adjust to changes in the interface of FindExecutable, getting ToolRunner
ready for bigger things to come.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18919 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 23:43:44 +00:00
Reid Spencer
9665e8a697 For PR351:
* Remove isExecutable as its now implemented by sys::Path::executable
* Make FindExecutable a thin veneer over sys::Program::FindProgramByName.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18918 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 23:41:37 +00:00
Chris Lattner
395fd5949b When generating code for X86 targets, make sure the fp control word is set
to 64-bit precision, not 80 bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18915 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 21:52:52 +00:00
Brian Gaeke
9d97547680 Fix link error in PPC optimized build of 'opt'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18913 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 21:28:39 +00:00
Reid Spencer
9b9e22a32e For PR351:
Remove AllocateRWXMemory as it is not used any more in LLVM. The function
has been replaced with sys::Memory::AllocateRWX several months ago.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18912 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 20:14:30 +00:00
Chris Lattner
e171d5c812 Add some notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18911 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 20:13:10 +00:00
Reid Spencer
2356f8612e For PR351:
Remove the MakeFileReadable and MakeFileExecutable functions which are no
longer present in LLVM. They have been replaced with the sys::Path methods
makeReadable and makeExecutable, respectively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18910 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 20:08:14 +00:00
Chris Lattner
de97b5788c Get rid of getSizeOf, using ConstantExpr::getSizeOf instead.
do not insert a prototype for malloc of: void* malloc(uint): on 64-bit u
targets this is not correct.  Instead of prototype it as void *malloc(...),
and pass the correct intptr_t through the "...".

Finally, fix Regression/CodeGen/SparcV9/2004-12-13-MallocCrash.ll, by not
forming constantexpr casts from pointer to uint.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18908 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 20:00:02 +00:00
Reid Spencer
77cc91deaa For PR351:
Implement three new functions to allow setting access/permission bits on
the file referenced by a path. The makeReadable and makeExecutable methods
replace the FileUtilities MakeFileReadable and MakeFileExecutable
functions. The makeWritable function is new and provided for consistency
since Path has a writable() method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18907 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 19:59:50 +00:00
Chris Lattner
fcdd82e4a9 Change this method to return ulong, not uint, for 64-bit targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18906 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 19:48:51 +00:00
Reid Spencer
79fc924957 Genericize implementation of GetDLLSuffix now that we have LTDL_SHLIB_EXT
available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18904 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 18:41:28 +00:00
Reid Spencer
2923f34533 For PR351:
The ReadFileIntoAddressSpace and UnmapFileFromAddressSpace functions are no
longer used by LLVM. Remove them. Replacement functionality for both
functions is now encapsulated in the sys::MappedFile class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18903 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 18:28:59 +00:00
Reid Spencer
9153f8f476 For PR351:
Use sys::MappedFile instead of ReadFileIntoAddressSpace and
UnmapFileFromAddressSpace. sys::MappedFile has the nice property that it
cleans up after itself so exception handling can be removed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18902 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 18:25:27 +00:00
Chris Lattner
c0354c904b Set the rounding mode for the X86 FPU to 64-bits instead of 80-bits. We
don't support long double anyway, and this gives us FP results closer to
other targets.

This also speeds up 179.art from 41.4s to 18.32s, by eliminating a problem
with extra precision that causes an FP == comparison to fail (leading to
extra loop iterations).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18895 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 17:23:11 +00:00
Reid Spencer
9d88d1aaab For PR351: \
The getFileTimestamp and getFileSize functions have been removed from  \
FileUtilities.{h,cpp}. They are replaced by Path::getTimestamp and  \
Path::getSize,respectively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18892 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 17:01:53 +00:00
Reid Spencer
4af3da6e6b Get rid of some leaks found by VC leak detector.
Patch contributed by Morten Ofsted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18889 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 16:04:04 +00:00
Reid Spencer
b0e1887014 Fix a bug where "." or any single character file name doesn't get the
terminating / when setDirectory is called.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18886 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 07:51:52 +00:00
Reid Spencer
3d595cba33 Remove an always false clause from an if statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18885 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 07:51:07 +00:00
Alkis Evlogimenos
07941b493d Fix a bug where directory names of length one or less where not set
properly (examples: "", ".", "a").


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18883 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 07:41:35 +00:00
Reid Spencer
732f92d56e * Add a std::ostream inserter for sys::Path
* Correct the std::string constructor to take a const reference.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18877 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 06:57:15 +00:00
Jeff Cohen
3265369ff5 Fix recent breakage of win32 build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18876 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 06:26:35 +00:00
Reid Spencer
903f21dd39 * Fix header block.
* Fix loop style per standards
* Don't create a new Module when the Linker's module is released.
* Add/fix function comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18871 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:50:50 +00:00
Reid Spencer
ff5f3ab9fe Add missing space in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18870 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:23:13 +00:00
Reid Spencer
518ec2ea1f Make sure the Archive gets deleted if there's an error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18869 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:22:31 +00:00
Reid Spencer
04f5412496 Fix header and function comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18867 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:13:18 +00:00
Reid Spencer
6c4b7bded1 Implement new functions per new interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18866 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:03:42 +00:00
Reid Spencer
1b6b99bffc For PR351: \
* Remove IsLibrary and GetLibraryPath, replaced by FindLibrary in ../Path.cpp \
* Implement GetSystemLibraryPaths and GetBytecodeLibraryPaths, instead of the \
  GetSystemLibraryPath1 and GetSystemLibraryPath2 methods


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18862 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:00:51 +00:00
Reid Spencer
ccb23a13e9 For PR351: \
* Move generic isArchive method here from Unix/Path.cpp \
* Implement isDynamicLibrary \
* Implement FindLibrary for Linker


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18861 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:00:39 +00:00
Reid Spencer
de4cedca14 This file contains basic Linker facilities needed by all tools
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18860 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:00:28 +00:00
Reid Spencer
0ba9e211be Make LinkModules a static member function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18859 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:00:16 +00:00
Reid Spencer
7a87ce043b This file contains only the Linker's library linking support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18858 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:00:04 +00:00
Reid Spencer
e84de29663 For PR351: \
* Remove redundant static function LinkOneLibrary. \
* Remove unneded #includes \
* Convert FileSupport usage to sys::Path instead


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18857 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 02:59:52 +00:00
Reid Spencer
3ece6397cb This file contains only the Linker's file linking support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18856 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 02:59:41 +00:00
Reid Spencer
7dde0e3b05 For PR351: \
* Convert functions to Linker:: methods. \
* Remove unneeded #includes \
* Utilize sys::Path utilities not FileSupport utilities \
* Move File & Library linking functions to other source files


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18855 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 02:59:29 +00:00
Reid Spencer
663601cca6 For PR351: \
* Get file information from a MappedFile instance \
* Convert file type tests to sys::Path form


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18854 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 02:59:15 +00:00
Reid Spencer
5af46883f2 Implement error handling in OpenAndLoad* functions so the Linker can handle it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18853 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 02:59:03 +00:00
Reid Spencer
56c3ed854f Make the size() method const
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18852 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 02:58:51 +00:00
Reid Spencer
d99eaa3c1f For PR351:Remove the file type checking methods (now in sys::Path)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18846 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 02:57:41 +00:00
Brian Gaeke
a04d959f0c Add V8 SPEC status.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18844 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 00:27:35 +00:00
Chris Lattner
6b8efcd697 Change indentation of a whole bunch of code, no real changes here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18843 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 23:49:37 +00:00
Chris Lattner
387bc13575 More substantial simplifications and speedups. This makes ADCE about 20% faster
in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18842 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 23:40:17 +00:00
Chris Lattner
46356794ab More minor microoptimizations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18841 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 22:44:30 +00:00
Chris Lattner
4e51ccdd38 Remove some more set operations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18840 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 22:22:18 +00:00
Chris Lattner
188839a219 Reduce number of set operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18839 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 22:16:13 +00:00
Chris Lattner
857e8cdd65 Optimize div/rem + select combinations more.
In particular, implement div.ll:test10 and rem.ll:test4.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18838 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 21:48:58 +00:00
Chris Lattner
869f45937b Fix Regression/CodeGen/PowerPC/2004-12-12-ZeroSizeCommon.ll, and all programs
when compiled with debug information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18835 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 20:36:19 +00:00
Chris Lattner
8363ad6bfc CSE calls to getTypeSize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18833 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 20:31:00 +00:00
Chris Lattner
38c2556d0c Properly implement copying of a global, fixing the 255.vortex & povray
failures from last night.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18832 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 19:34:41 +00:00