oota-llvm.git
21 years agoAdded the 'r' and 'i' annotations to instructions as their opcode names have
Misha Brukman [Tue, 27 May 2003 22:44:44 +0000 (22:44 +0000)]
Added the 'r' and 'i' annotations to instructions as their opcode names have
changed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6380 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded a debugging code emitter that prints code to a file, debug to std::cerr,
Misha Brukman [Tue, 27 May 2003 22:43:19 +0000 (22:43 +0000)]
Added a debugging code emitter that prints code to a file, debug to std::cerr,
and passes the real code to a memory-outputting code emitter. This may be
removed at a later point in development.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6379 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoKeep track of the current BasicBlock being processed so that a referencing
Misha Brukman [Tue, 27 May 2003 22:41:44 +0000 (22:41 +0000)]
Keep track of the current BasicBlock being processed so that a referencing
MachineInstr can later be patched up correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6378 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded 'r' and 'i' annotations to instructions as SparcInstr.def has changed.
Misha Brukman [Tue, 27 May 2003 22:40:34 +0000 (22:40 +0000)]
Added 'r' and 'i' annotations to instructions as SparcInstr.def has changed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6377 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded 'r' or 'i' annotations to instructions, as SparcInstr.def has changed.
Misha Brukman [Tue, 27 May 2003 22:39:01 +0000 (22:39 +0000)]
Added 'r' or 'i' annotations to instructions, as SparcInstr.def has changed.

Non-obvious change: since I have changed ST and STD to be STF and STDF to
(a) closer resemble their name (NOT assembly text) in the Sparc manual, and
(b) clearly specify that they they are floating-point opcodes,
I made the same changes in this file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6376 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded 'r' or 'i' annotations to instructions, as SparcInstr.def has changed.
Misha Brukman [Tue, 27 May 2003 22:37:00 +0000 (22:37 +0000)]
Added 'r' or 'i' annotations to instructions, as SparcInstr.def has changed.
Here I had to make one non-trivial change: add a function to get a version of
the opcode that takes an immediate, given an opcode that takes all registers.

This is required because sometimes it is not known at construction time which
opcode is used because opcodes are passed around between functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6375 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded 'r' or 'i' annotations to instructions, as SparcInstr.def has changed.
Misha Brukman [Tue, 27 May 2003 22:35:43 +0000 (22:35 +0000)]
Added 'r' or 'i' annotations to instructions, as SparcInstr.def has changed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6373 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded entries for each of the instructions with annotations ('r' or 'i').
Misha Brukman [Tue, 27 May 2003 22:33:39 +0000 (22:33 +0000)]
Added entries for each of the instructions with annotations ('r' or 'i').

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6372 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoOne of the first major changes to make the work of JITting easier: adding
Misha Brukman [Tue, 27 May 2003 22:32:38 +0000 (22:32 +0000)]
One of the first major changes to make the work of JITting easier: adding
annotations on instructions to specify which format they are (i.e., do they take
2 registers and 1 immediate or just 3 registers) as that changes their binary
representation and hence, code emission.

This makes instructions more like how X86 defines them to be. Now, writers of
instruction selection must choose the correct opcode based on what instruction
type they are building, which they already know. Thus, the JIT doesn't have to
do the same work by `discovering' which operands an instruction really has.

As this involves lots of small changes to a lot of files in lib/target/Sparc,
I'll commit them individually because otherwise the diffs will be unreadable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6371 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoCannot output `static' in generated cpp code: results in error. It's already
Misha Brukman [Tue, 27 May 2003 22:29:02 +0000 (22:29 +0000)]
Cannot output `static' in generated cpp code: results in error. It's already
specified as a static member in class definition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6370 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago* Allow passing in an unsigned configuration to allocateSparcTargetMachine()
Misha Brukman [Tue, 27 May 2003 22:24:48 +0000 (22:24 +0000)]
* Allow passing in an unsigned configuration to allocateSparcTargetMachine()
  a default value is set in the header file.
* Fixed some code layout to make it more consistent with the rest of codebase
* Added addPassesToJITCompile() with relevant passes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6369 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago* Now outputting a static function getBinaryCodeForInstr() (JIT-accessible)
Misha Brukman [Tue, 27 May 2003 22:19:58 +0000 (22:19 +0000)]
* Now outputting a static function getBinaryCodeForInstr() (JIT-accessible)
* For debugging purposes:
  + output the predefined bit pattern of the instruction
* Fixed inefficiency: only load an operand from MachineInstr once
* Bug fix: did not advance bit index when seeing named bit-fields "annul", "cc"
  and "predict"
* Added a catch-all for non-supported instructions at the end of switch stmt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6368 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoMoved generation of the SparcV9CodeEmitter.inc file higher in the Makefile so
Misha Brukman [Tue, 27 May 2003 22:04:38 +0000 (22:04 +0000)]
Moved generation of the SparcV9CodeEmitter.inc file higher in the Makefile so
that Makefile.common would see it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6367 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdd prototypes to add passes to JIT compilation and code emission.
Misha Brukman [Tue, 27 May 2003 22:01:10 +0000 (22:01 +0000)]
Add prototypes to add passes to JIT compilation and code emission.
Also, added annotations to how instructions are modified (reg/imm operands).
Added prototype for adding register numbers to values pass for interfacing with
the target-independent register allocators in the JIT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6366 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoDefines a pass-through debugging emitter -- it writes to a file for inspection
Misha Brukman [Tue, 27 May 2003 21:46:56 +0000 (21:46 +0000)]
Defines a pass-through debugging emitter -- it writes to a file for inspection
and to memory to test execution (using a passed-in code emitter).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6365 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAllow allocation of a Sparc TargetMachine.
Misha Brukman [Tue, 27 May 2003 21:46:07 +0000 (21:46 +0000)]
Allow allocation of a Sparc TargetMachine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6364 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoBroke out class definition from SparcV9CodeEmitter, and added ability to take a
Misha Brukman [Tue, 27 May 2003 21:45:05 +0000 (21:45 +0000)]
Broke out class definition from SparcV9CodeEmitter, and added ability to take a
MachineCodeEmitter to make a pass-through debugger -- output to memory and to
std::cerr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6363 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoUpdate to match the reality that is now.
Chris Lattner [Tue, 27 May 2003 21:43:14 +0000 (21:43 +0000)]
Update to match the reality that is now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6362 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoLink in Sparc libs for the JIT, even on X86 to be able to support debugging
Misha Brukman [Tue, 27 May 2003 21:42:05 +0000 (21:42 +0000)]
Link in Sparc libs for the JIT, even on X86 to be able to support debugging
of Sparc JIT (printing out instrs) on X86. Con: this increases linking time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6361 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAllow for specification of which JIT to run on the commandline.
Misha Brukman [Tue, 27 May 2003 21:40:39 +0000 (21:40 +0000)]
Allow for specification of which JIT to run on the commandline.
`lli -march=x86' or `lli -march=sparc' will forcefully select the JIT even on a
different platform. Running lli without the -march option will select the JIT
for the platform that it's currently running on.

Pro: can test Sparc JIT (debug printing mode) on X86 -- faster to compile/link
LLVM source base to test changes.
Con: Linking lli on x86 now pulls in all the Sparc libs -> longer link time
(but X86 can bear it, right?)

In the future, perhaps this should be a ./configure option to enable/disable
target JITting...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6360 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoRemove ugly hack (that I put in originally) for building in trace stuff
Chris Lattner [Tue, 27 May 2003 21:23:02 +0000 (21:23 +0000)]
Remove ugly hack (that I put in originally) for building in trace stuff
automatically in LLC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6358 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoSparcV9CodeEmitter.cpp is a part of the Sparc code emitter. The main function
Misha Brukman [Tue, 27 May 2003 20:07:58 +0000 (20:07 +0000)]
SparcV9CodeEmitter.cpp is a part of the Sparc code emitter. The main function
that assembles instructions is generated via TableGen (and hence must be built
before building this directory, but that's already the case in the top-level
Makefile).

Also added is .cvsignore to ignore the generated file `SparcV9CodeEmitter.inc',
which is included by SparcV9CodeEmitter.cpp .

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6357 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded definitions for a bunch of floating-point instructions.
Misha Brukman [Tue, 27 May 2003 20:03:29 +0000 (20:03 +0000)]
Added definitions for a bunch of floating-point instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6356 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFix constant folding to ALWAYS work.
Chris Lattner [Tue, 27 May 2003 19:16:07 +0000 (19:16 +0000)]
Fix constant folding to ALWAYS work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6355 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdd compatibility option
Chris Lattner [Tue, 27 May 2003 19:15:11 +0000 (19:15 +0000)]
Add compatibility option

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6354 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNew testcase
Chris Lattner [Tue, 27 May 2003 16:45:09 +0000 (16:45 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6353 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFix bug: Instcombine/2003-05-27-ConstExprCrash.ll
Chris Lattner [Tue, 27 May 2003 16:40:51 +0000 (16:40 +0000)]
Fix bug: Instcombine/2003-05-27-ConstExprCrash.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6352 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoMake _sure_ we don't go into an infinite loop if a signal happens!
Chris Lattner [Tue, 27 May 2003 16:25:04 +0000 (16:25 +0000)]
Make _sure_ we don't go into an infinite loop if a signal happens!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6351 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoStart testing SRoA
Chris Lattner [Tue, 27 May 2003 16:10:03 +0000 (16:10 +0000)]
Start testing SRoA

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6350 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago* Actually USE the statistic that we made
Chris Lattner [Tue, 27 May 2003 16:09:27 +0000 (16:09 +0000)]
* Actually USE the statistic that we made
* Implement SRoA for arrays

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6349 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoExpose proto for SRoA pass.
Chris Lattner [Tue, 27 May 2003 15:52:45 +0000 (15:52 +0000)]
Expose proto for SRoA pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6348 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoInitial testcases for scalar replacement of aggregates pass
Chris Lattner [Tue, 27 May 2003 15:51:17 +0000 (15:51 +0000)]
Initial testcases for scalar replacement of aggregates pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6347 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoImplementation of the simple "scalar replacement of aggregates" transformation
Chris Lattner [Tue, 27 May 2003 15:45:27 +0000 (15:45 +0000)]
Implementation of the simple "scalar replacement of aggregates" transformation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6346 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago(1) Added special register class containing (for now) %fsr.
Vikram S. Adve [Tue, 27 May 2003 00:07:13 +0000 (00:07 +0000)]
(1) Added special register class containing (for now) %fsr.
    Fixed spilling of %fcc[0-3] which are part of %fsr.

(2) Moved some machine-independent reg-class code to class TargetRegInfo
    from SparcReg{Class,}Info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6343 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoRenamed MachienOperand::opIsDef to MachineOperand::opIsDefOnly()
Vikram S. Adve [Tue, 27 May 2003 00:06:48 +0000 (00:06 +0000)]
Renamed MachienOperand::opIsDef to MachineOperand::opIsDefOnly()
and related functions and flags.  Fixed several bugs where only
"isDef" was being checked, not "isDefAndUse".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6342 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago(1) Added special register class containing (for now) %fsr.
Vikram S. Adve [Tue, 27 May 2003 00:05:23 +0000 (00:05 +0000)]
(1) Added special register class containing (for now) %fsr.
    Fixed spilling of %fcc[0-3] which are part of %fsr.

(2) Moved some machine-independent reg-class code to class TargetRegInfo
    from SparcReg{Class,}Info.

(3) Renamed MachienOperand::opIsDef to MachineOperand::opIsDefOnly()
    and related functions and flags.  Fixed several bugs where only
    "isDef" was being checked, not "isDefAndUse".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6341 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoRenamed opIsDef to opIsDefOnly.
Vikram S. Adve [Tue, 27 May 2003 00:03:17 +0000 (00:03 +0000)]
Renamed opIsDef to opIsDefOnly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6340 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded special register class containing (for now) %fsr.
Vikram S. Adve [Tue, 27 May 2003 00:02:22 +0000 (00:02 +0000)]
Added special register class containing (for now) %fsr.
Fixed spilling of %fcc[0-3] which are part of %fsr.
Moved some machine-independent reg-class code to class TargetRegInfo
from SparcReg{Class,}Info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6339 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFix bug: InstCombine/2003-05-26-CastMiscompile.ll
Chris Lattner [Mon, 26 May 2003 23:41:32 +0000 (23:41 +0000)]
Fix bug: InstCombine/2003-05-26-CastMiscompile.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6338 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNew testcase
Chris Lattner [Mon, 26 May 2003 23:41:13 +0000 (23:41 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6337 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoChanged http://tank... => http://llvm, and removed an extraneous mailto:.
Misha Brukman [Mon, 26 May 2003 00:17:49 +0000 (00:17 +0000)]
Changed tank... => http://llvm, and removed an extraneous mailto:.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6335 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoBug fix: right shift for int divide-by-power-of-2 was incorrect for
Vikram S. Adve [Sun, 25 May 2003 21:59:47 +0000 (21:59 +0000)]
Bug fix: right shift for int divide-by-power-of-2 was incorrect for
negative values.  Need to add one to a negative value before right shift!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6334 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoBug fix: padding bytes within a structure should go after each field!
Vikram S. Adve [Sun, 25 May 2003 21:59:09 +0000 (21:59 +0000)]
Bug fix: padding bytes within a structure should go after each field!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6333 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoBug fix: sign-extension was not happening for C = -MININT since C == -C!
Vikram S. Adve [Sun, 25 May 2003 21:58:11 +0000 (21:58 +0000)]
Bug fix: sign-extension was not happening for C = -MININT since C == -C!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6332 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoPredicate things better
Chris Lattner [Sun, 25 May 2003 16:52:41 +0000 (16:52 +0000)]
Predicate things better

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6331 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoDo not show errors when moving file. The error is shown the first time anyone
Misha Brukman [Sun, 25 May 2003 16:38:24 +0000 (16:38 +0000)]
Do not show errors when moving file. The error is shown the first time anyone
runs `utils/cvsupdate' since there is no `cvs.out' file for mv to move, and it
is reported as such.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6330 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFix problem with last checkin.
Chris Lattner [Sun, 25 May 2003 16:15:32 +0000 (16:15 +0000)]
Fix problem with last checkin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6328 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoMake case of GetNumOfInt/FloatArgRegs functions to be use lower case
Vikram S. Adve [Sun, 25 May 2003 16:02:05 +0000 (16:02 +0000)]
Make case of GetNumOfInt/FloatArgRegs functions to be use lower case
like all the other functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6326 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdd support for compiling varargs functions.
Vikram S. Adve [Sun, 25 May 2003 15:59:47 +0000 (15:59 +0000)]
Add support for compiling varargs functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6325 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoReword to remove reference to how things worked in the past.
Misha Brukman [Sat, 24 May 2003 01:08:43 +0000 (01:08 +0000)]
Reword to remove reference to how things worked in the past.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6323 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdd ability to utilize the code emitter generator (CodeEmitterGen).
Misha Brukman [Sat, 24 May 2003 00:17:12 +0000 (00:17 +0000)]
Add ability to utilize the code emitter generator (CodeEmitterGen).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6322 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFirst cut at the Code Generator using the TableGen methodology.
Misha Brukman [Sat, 24 May 2003 00:15:53 +0000 (00:15 +0000)]
First cut at the Code Generator using the TableGen methodology.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6321 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoImplement the TargetInstrInfo's createNOPinstr() and isNOPinstr() interface.
Misha Brukman [Sat, 24 May 2003 00:09:50 +0000 (00:09 +0000)]
Implement the TargetInstrInfo's createNOPinstr() and isNOPinstr() interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6320 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNOP instructions are pseudo-instructions. We should not have them explicitly in
Misha Brukman [Sat, 24 May 2003 00:08:39 +0000 (00:08 +0000)]
NOP instructions are pseudo-instructions. We should not have them explicitly in
our representation, since they are usually special cases of already-existing
instructions.

This abstracts away methods that let a pass create and verify a NOP instruction,
without relying on a `NOP' enum to be in existence in the target's instruction
info descriptor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6319 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoSuggest -save-temps instead of -S, -E.
Brian Gaeke [Fri, 23 May 2003 21:03:50 +0000 (21:03 +0000)]
Suggest -save-temps instead of -S, -E.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6318 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoRemove ".bc" from the end of InputFile if it is there, in
Brian Gaeke [Fri, 23 May 2003 20:28:07 +0000 (20:28 +0000)]
Remove ".bc" from the end of InputFile if it is there, in
tools/lli/lli.cpp:main().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6317 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agogccld.cpp:
Brian Gaeke [Fri, 23 May 2003 20:27:07 +0000 (20:27 +0000)]
gccld.cpp:
 Fix typo in header.
 Add IsArchive static method.
 Roll LoadLibraryFromDirectory() into LoadLibrary(), and factor
  LoadLibraryExactName() out of the result. Instead of treating the current
  directory specially, just insert it into LibPaths in the beginning of
  main().
 Make LoadLibrary() take a "search" flag that says whether to search for the
  correct library, or just trust that LibName is right.
 Make LinkLibrary() take a "search" flag, and pass it to LoadLibrary().
 Change the for-loop over InputFilenames to detect ar archives and link them
  in as libraries without searching.
 Change the for-loop over Libraries to explicitly turn on the "search" flag
  to LinkLibrary() that makes LoadLibrary() search for the correct library
  (i.e., when processing -lNAME options.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6316 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFix Bug: Linker/2003-04-26-NullPtrLinkProblem.ll
Chris Lattner [Fri, 23 May 2003 20:03:32 +0000 (20:03 +0000)]
Fix Bug: Linker/2003-04-26-NullPtrLinkProblem.ll

This was a problem with constants having their types resolved to some new type,
but there was already a constant of the new type created.  Before, these types
were never merged together, now they are.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6314 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoRemove some cruft, add some methods to allow implementation of bugfix for
Chris Lattner [Fri, 23 May 2003 20:02:05 +0000 (20:02 +0000)]
Remove some cruft, add some methods to allow implementation of bugfix for
Bug: Linker/2003-04-26-NullPtrLinkProblem.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6313 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoCleaned up code layout; no functional changes.
Misha Brukman [Fri, 23 May 2003 19:20:57 +0000 (19:20 +0000)]
Cleaned up code layout; no functional changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6312 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoMinor rewording/cleanups
Chris Lattner [Fri, 23 May 2003 17:13:15 +0000 (17:13 +0000)]
Minor rewording/cleanups

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6311 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNew testcase identified by Brian Gaeke. Gotta love GCC extensions. :(
Chris Lattner [Fri, 23 May 2003 15:07:31 +0000 (15:07 +0000)]
New testcase identified by Brian Gaeke.  Gotta love GCC extensions. :(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6310 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFix a problem brian identified.
Chris Lattner [Fri, 23 May 2003 14:49:32 +0000 (14:49 +0000)]
Fix a problem brian identified.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6309 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoClarify BugDriver.cpp:BugDriver::ParseInputFile()'s return values in its
Brian Gaeke [Fri, 23 May 2003 05:34:32 +0000 (05:34 +0000)]
Clarify BugDriver.cpp:BugDriver::ParseInputFile()'s return values in its
explanatory comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6308 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoRemove long dead code
Chris Lattner [Thu, 22 May 2003 22:00:54 +0000 (22:00 +0000)]
Remove long dead code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6307 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoRemove using declarations
Chris Lattner [Thu, 22 May 2003 22:00:07 +0000 (22:00 +0000)]
Remove using declarations

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6306 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdd using declarations
Chris Lattner [Thu, 22 May 2003 21:59:35 +0000 (21:59 +0000)]
Add using declarations

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6305 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoCleaned up code layout. No functional changes.
Misha Brukman [Thu, 22 May 2003 21:49:18 +0000 (21:49 +0000)]
Cleaned up code layout. No functional changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6304 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoRemove using declarations and extraneous #includes
Chris Lattner [Thu, 22 May 2003 21:47:17 +0000 (21:47 +0000)]
Remove using declarations and extraneous #includes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6303 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFix static constructor ordering problem
Chris Lattner [Thu, 22 May 2003 21:31:52 +0000 (21:31 +0000)]
Fix static constructor ordering problem

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6302 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoKill `using' directives.
Misha Brukman [Thu, 22 May 2003 21:24:35 +0000 (21:24 +0000)]
Kill `using' directives.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6301 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoRemove using declarations
Chris Lattner [Thu, 22 May 2003 21:21:43 +0000 (21:21 +0000)]
Remove using declarations

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6300 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFix testcase
Chris Lattner [Thu, 22 May 2003 20:43:21 +0000 (20:43 +0000)]
Fix testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6299 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNew testcase
Chris Lattner [Thu, 22 May 2003 20:43:06 +0000 (20:43 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6298 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdd documentation for the new cl::CommaSeparated modifier
Chris Lattner [Thu, 22 May 2003 20:36:06 +0000 (20:36 +0000)]
Add documentation for the new cl::CommaSeparated modifier

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6297 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoadd support for an explicit EXPORTED_SYMBOL_LIST
Chris Lattner [Thu, 22 May 2003 20:27:30 +0000 (20:27 +0000)]
add support for an explicit EXPORTED_SYMBOL_LIST

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6296 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoMake the list accept comma separated names
Chris Lattner [Thu, 22 May 2003 20:27:13 +0000 (20:27 +0000)]
Make the list accept comma separated names

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6295 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdd new CommaSeparated option modifier
Chris Lattner [Thu, 22 May 2003 20:26:17 +0000 (20:26 +0000)]
Add new CommaSeparated option modifier

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6294 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdd support for a new "CommaSeparated" modifier
Chris Lattner [Thu, 22 May 2003 20:25:57 +0000 (20:25 +0000)]
Add support for a new "CommaSeparated" modifier

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6293 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoKill using declarations
Chris Lattner [Thu, 22 May 2003 20:13:16 +0000 (20:13 +0000)]
Kill using declarations

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6292 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoDestroy using declarations
Chris Lattner [Thu, 22 May 2003 20:06:43 +0000 (20:06 +0000)]
Destroy using declarations

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6291 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoSpecify a list of symbols that should be exported by the library
Chris Lattner [Thu, 22 May 2003 19:50:30 +0000 (19:50 +0000)]
Specify a list of symbols that should be exported by the library

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6290 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago* Revert to old behavior of ignoring a module if it doesn't contain a main
Chris Lattner [Thu, 22 May 2003 19:48:00 +0000 (19:48 +0000)]
* Revert to old behavior of ignoring a module if it doesn't contain a main
  function and no symbols were explicitly marked to be externalized.
* Add new -internalize-public-api-list option that can be used if the symbol
  list is small, and making a new file is annoying.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6289 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdd option to internalize to allow it to read a file to determine which symbols
Chris Lattner [Thu, 22 May 2003 19:34:49 +0000 (19:34 +0000)]
Add option to internalize to allow it to read a file to determine which symbols
should not be internalized

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6288 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoUpdate to match typename produced by the C frontend
Chris Lattner [Thu, 22 May 2003 19:30:11 +0000 (19:30 +0000)]
Update to match typename produced by the C frontend

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6287 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoMinor cleanups.
Chris Lattner [Thu, 22 May 2003 19:07:21 +0000 (19:07 +0000)]
Minor cleanups.
This hunk:
-    } else if (Src->getNumOperands() == 2 && Src->use_size() == 1) {
+    } else if (Src->getNumOperands() == 2) {

Allows GEP folding to be more aggressive, which reduces the number of instructions
and can dramatically speed up BasicAA in some cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6286 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFix bug: Assembler/2003-05-03-BytecodeReaderProblem.llx
Chris Lattner [Thu, 22 May 2003 18:35:38 +0000 (18:35 +0000)]
Fix bug: Assembler/2003-05-03-BytecodeReaderProblem.llx
by emitting the type planes before any constants (which could be constant
expressions involving undefined types!)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6285 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoDo not assert fail or crash when a bytecode parse fails!
Chris Lattner [Thu, 22 May 2003 18:26:48 +0000 (18:26 +0000)]
Do not assert fail or crash when a bytecode parse fails!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6284 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoEliminate the uchar typedef, use unsigned char explicitly
Chris Lattner [Thu, 22 May 2003 18:08:30 +0000 (18:08 +0000)]
Eliminate the uchar typedef, use unsigned char explicitly

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6283 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoMake the testcase even more insane
Chris Lattner [Thu, 22 May 2003 15:49:58 +0000 (15:49 +0000)]
Make the testcase even more insane

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6280 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNew testcase
Chris Lattner [Thu, 22 May 2003 15:33:33 +0000 (15:33 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6279 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNew testcase
Chris Lattner [Wed, 21 May 2003 23:01:50 +0000 (23:01 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6278 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNew testcase that was killing the CFE
Chris Lattner [Wed, 21 May 2003 23:01:35 +0000 (23:01 +0000)]
New testcase that was killing the CFE

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6277 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNew document
Chris Lattner [Wed, 21 May 2003 22:21:07 +0000 (22:21 +0000)]
New document

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6275 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNew graphic for web page
Chris Lattner [Wed, 21 May 2003 21:05:46 +0000 (21:05 +0000)]
New graphic for web page

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6274 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFix bug: FunctionResolve/2003-05-21-MissingArguments.ll
Chris Lattner [Wed, 21 May 2003 20:51:52 +0000 (20:51 +0000)]
Fix bug: FunctionResolve/2003-05-21-MissingArguments.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6273 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNew testcase that crashes the funcresolve pass.
Chris Lattner [Wed, 21 May 2003 20:44:16 +0000 (20:44 +0000)]
New testcase that crashes the funcresolve pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6272 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAllow disabling final cleanups
Chris Lattner [Wed, 21 May 2003 20:38:59 +0000 (20:38 +0000)]
Allow disabling final cleanups

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6271 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFix Bug: BasicAA/2003-05-21-GEP-Problem.ll
Chris Lattner [Wed, 21 May 2003 20:23:26 +0000 (20:23 +0000)]
Fix Bug: BasicAA/2003-05-21-GEP-Problem.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6270 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoTrim testcase a bit
Chris Lattner [Wed, 21 May 2003 19:55:10 +0000 (19:55 +0000)]
Trim testcase a bit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6269 91177308-0d34-0410-b5e6-96231b3b80d8