Misha Brukman
3581f8542d
Moved removeFile() and getUniqueFilename() into FileUtilities.
...
llvm-svn: 7691
2003-08-07 21:28:50 +00:00
Misha Brukman
1fe74d144b
Implement LLVM intrinsics `llvm.setjmp' and `llvm.longjmp' as follows:
...
* setjmp() simply returns 0
* longjmp() simply calls abort()
llvm-svn: 7676
2003-08-07 15:43:46 +00:00
Vikram S. Adve
da92f366c7
Fix assertion in MachineInstr::substituteValue().
...
llvm-svn: 7675
2003-08-07 15:01:48 +00:00
Vikram S. Adve
6e4a358f72
Fix sanity-checking in 'maskUnsigned' code to be more precise:
...
use or def-and-use operands can be substituted after one def-only
operand has been substituted.
llvm-svn: 7674
2003-08-07 15:01:26 +00:00
John Criswell
449670a8f7
Fixed a segfault in gccld.
...
The original code does not work because the value from WorkList.end() is
invalidated once WorkList.erase() is called. To ensure proper functionality,
we must ensure that WorkList.erase() is always called before WorkList.end().
llvm-svn: 7673
2003-08-07 14:43:13 +00:00
Chris Lattner
eaa5b964bb
Update tablegen interfaces
...
llvm-svn: 7672
2003-08-07 13:52:22 +00:00
Sumant Kowshik
0b83080595
Added code for pool allocating only the pool-allocatable data structures in the presence of collapsed nodes + a couple of bug fixes
...
llvm-svn: 7662
2003-08-07 05:29:28 +00:00
Chris Lattner
8706805dae
This register is never used, disable it.
...
llvm-svn: 7661
2003-08-07 04:49:16 +00:00
Misha Brukman
b611692487
Changing command-line option formats to be more consistent with LLVM style.
...
llvm-svn: 7658
2003-08-06 23:25:25 +00:00
Misha Brukman
8f18938d1c
* Renamed option from `nopreselect' to `nopreopt' since it disables more than
...
just PreSelection
* Wrapped code at 80 columns
* Added the DecomposeMultiDimRefs Pass to the JIT compilation path
llvm-svn: 7657
2003-08-06 23:06:21 +00:00
Misha Brukman
79226d066e
Use the registers g1 and g5 as temporaries for making far jumps and far calls,
...
because saving i1 and i2 to their ``designated'' stack slots corrupts unknown
memory in other functions, standard libraries, and worse.
In addition, this has the benefit of improving JIT performance because we
eliminate writing out 4 instructions in CompilationCallback() and 2 loads and 2
stores.
llvm-svn: 7653
2003-08-06 22:19:18 +00:00
Chris Lattner
4159fdaef2
Add a bunch of new Alpha Intrinsics for Rahul Joshi
...
llvm-svn: 7646
2003-08-06 20:08:25 +00:00
Vikram S. Adve
792b48f4d1
1. Bug fix: was using SLL instead of SLLX for ULongTy. Chump.
...
2. Handle fp-to-uint conversions directly here instead of relying on
a pre-transformation to replace them with the 2-step conversion.
3. Use size rather than explicitly checking types when deciding what
opcodes to use, wherever possible. This is less error prone (the
bug fix above was not the first time!).
4. Float-to-pointer casts shd now work though this hasn't been tested.
llvm-svn: 7645
2003-08-06 18:48:40 +00:00
Vikram S. Adve
26125cbeb5
Remove conversion of fp-to-uint cast into a multi-step cast:
...
this is not an optional transformation on SPARC and is now handled
directly by instruction selection.
llvm-svn: 7644
2003-08-06 18:42:49 +00:00
Chris Lattner
584058220a
The HAVE_JUMP code is dead, these intrinsics should _never_ be expanded
...
llvm-svn: 7642
2003-08-06 18:04:40 +00:00
Chris Lattner
c592c9f8a3
Remove unnecessary use of NonCopyable
...
llvm-svn: 7641
2003-08-06 17:16:24 +00:00
Misha Brukman
4510698acb
SparcV9CodeEmitter.cpp:
...
* Doxygen-ified comments
* Added capability to make far calls (i.e., beyond 30 bits in CALL instr)
which implies that we need to delete function references that were added by
the call to addFunctionReference() because the actual call instruction is 10
instructions away (thanks to 64-bit address construction)
* Cleaned up code that generates far jumps by using an array+loop
SparcV9CodeEmitter.h:
* Explained more of the side-effects of emitFarCall()
llvm-svn: 7639
2003-08-06 16:20:22 +00:00
Chris Lattner
fb2054c40b
Completely eliminate the isVoid TSFlag, shifting over all other fields
...
llvm-svn: 7636
2003-08-06 15:32:20 +00:00
Chris Lattner
19d25b3c41
add a pattern for RET, immediates no longer need to be explicitly typed
...
llvm-svn: 7635
2003-08-06 15:31:35 +00:00
Chris Lattner
0c4dd1ea09
Start adding usefulness to the DAG node definitions, add a new Expander
...
class
llvm-svn: 7634
2003-08-06 15:31:02 +00:00
Chris Lattner
30e987470f
Use a new local data structure instead of the MachineInstr::regsUsed set
...
llvm-svn: 7621
2003-08-05 22:11:13 +00:00
Chris Lattner
92f5fb598c
Add a map
...
llvm-svn: 7620
2003-08-05 22:09:31 +00:00
Chris Lattner
e62a2a76e5
Minor cleanups
...
llvm-svn: 7619
2003-08-05 22:03:27 +00:00
Chris Lattner
b05d3508d6
Physical registers no longer live in the regsUsed set for each machine instr
...
llvm-svn: 7618
2003-08-05 21:55:58 +00:00
Chris Lattner
020b544cbc
Do not insert physical regsiters into the regsUsed set
...
llvm-svn: 7617
2003-08-05 21:55:20 +00:00
Tanya Lattner
dc3c9a8545
Fixed minor bug in SafeToHoist and made some changes suggested by Chris.
...
llvm-svn: 7614
2003-08-05 20:39:02 +00:00
Tanya Lattner
57c03df032
Fixed LICM bug that hoists trapping instructions that are not guaranteed to execute.
...
llvm-svn: 7612
2003-08-05 18:45:46 +00:00
Chris Lattner
adc5a89a3b
Minor changes:
...
* Expand most tabs into spaces
* Move #define DEBUG_TYPE to top of file to avoid warning
llvm-svn: 7611
2003-08-05 18:44:12 +00:00
Chris Lattner
61182a2021
Add more verbose comment
...
llvm-svn: 7610
2003-08-05 18:38:37 +00:00
Sumant Kowshik
1d869b78f5
Added function mergeInGlobalsGraph which merges in the entire globals graph with the graph of a function
...
llvm-svn: 7606
2003-08-05 17:04:41 +00:00
Sumant Kowshik
0383a65103
Major bug fixes including a memory leak and tracking some exceptional conditions. Also added support for including global and indirect call information in the DS graphs used by the pool allocation
...
llvm-svn: 7605
2003-08-05 17:01:54 +00:00
Chris Lattner
ee937c80ed
Specify DEBUG_TYPE's for the JIT debug messages
...
llvm-svn: 7604
2003-08-05 17:00:32 +00:00
Chris Lattner
21343336d6
This method has now been changed to preserve flags for us!
...
llvm-svn: 7603
2003-08-05 16:59:24 +00:00
Chris Lattner
cd4f4320b0
All callers of these methods actually wanted them to preserve the flags,
...
so get rid of the def/use parameters that were getting passed in.
**** This now changes the semantics of these methods to preserve the flags,
not clobber them!
llvm-svn: 7602
2003-08-05 16:58:46 +00:00
Chris Lattner
1d6ba3e359
Factor shared code
...
llvm-svn: 7600
2003-08-05 16:34:44 +00:00
Chris Lattner
edc8c54e16
Fix bug: SimplifyCFG/2003-08-05-InvokeCrash.ll
...
Fix bug: SimplifyCFG/2003-08-05-MishandleInvoke.ll
llvm-svn: 7599
2003-08-05 16:27:44 +00:00
Misha Brukman
1e88cfb42e
* Removed `using' declaration, now use full namespace qualifier std::string
...
* Simplified code by using an inline function instead of copy-pasted code
llvm-svn: 7597
2003-08-05 16:01:50 +00:00
Chris Lattner
463d6a5e7c
Implement TODO: print out short form of Invoke if possible
...
llvm-svn: 7595
2003-08-05 15:34:45 +00:00
Misha Brukman
5c68269dfd
* Set annul bit to be 0, because the Sparc backend currently does not use it.
...
* Use the name of the predict field instead of just the const 1 in the
Instruction.
llvm-svn: 7592
2003-08-05 14:34:38 +00:00
Chris Lattner
92a199dca7
Fix bugs handling ESP in alloca references
...
llvm-svn: 7591
2003-08-05 04:13:58 +00:00
Chris Lattner
506fa6843e
Revert previous change, and be really anal about what physical registers can do.
...
llvm-svn: 7588
2003-08-05 00:49:09 +00:00
Chris Lattner
7c257321c7
This is the real fix for the previous register allocator problem.
...
Physical registers should not float around.
llvm-svn: 7587
2003-08-05 00:48:47 +00:00
Misha Brukman
f7586ceeb2
Reformatted code to match the prevalent LLVM style; fit code into 80 columns.
...
llvm-svn: 7586
2003-08-05 00:02:06 +00:00
Misha Brukman
8f7304a32d
ElectricFence found this bug where we were reading past the vector boundary.
...
llvm-svn: 7585
2003-08-04 23:48:40 +00:00
Chris Lattner
4b637cc666
Don't bother calculating info unless its needed. May reduce number of stack slots created.
...
llvm-svn: 7584
2003-08-04 23:42:37 +00:00
Chris Lattner
815b85e3ba
* Fix spelling of 'necessary'
...
* Add a lot more DEBUG output, which is better structured than before
* Fix bug: Jello/2003-08-04-PhysRegLiveFailure.llx
llvm-svn: 7583
2003-08-04 23:36:39 +00:00
Chris Lattner
148747e162
Add patterns for (mov R, R) (mov R, I) and subtracts. The moves are to enable
...
testing, the subtracts are because I was in the neighborhood.
llvm-svn: 7581
2003-08-04 21:18:19 +00:00
Chris Lattner
44cdcf013f
Change comments into something that TableGen can read!
...
llvm-svn: 7580
2003-08-04 21:08:29 +00:00
Chris Lattner
0d74debd07
Allow instructions to have a DAG pattern associated with them.
...
Define a few preliminary node types.
llvm-svn: 7579
2003-08-04 21:07:37 +00:00
Chris Lattner
6aa90493a3
Rename register classes to be upper case to make it obvious that they are X86
...
specific in the tree patterns
llvm-svn: 7578
2003-08-04 20:58:29 +00:00
Chris Lattner
22c550e442
There is nothing special about noops anymore
...
llvm-svn: 7568
2003-08-04 05:11:37 +00:00
Chris Lattner
78fac3b8b6
There is nothing special about noops now
...
llvm-svn: 7567
2003-08-04 05:11:19 +00:00
Chris Lattner
9fb7e0a425
Transition to using 'let X = y' instead of 'set X = y'.
...
llvm-svn: 7565
2003-08-04 05:03:18 +00:00
Chris Lattner
2551080937
transition to using let instead of set
...
llvm-svn: 7564
2003-08-04 04:59:56 +00:00
Chris Lattner
cb7489c102
Transition to using let instead of set
...
llvm-svn: 7563
2003-08-04 04:58:12 +00:00
Chris Lattner
796684b8c7
Fix Bug: test/Regression/Jello/2003-08-03-CallArgLiveRanges.llx
...
llvm-svn: 7558
2003-08-04 02:12:48 +00:00
Chris Lattner
fdd6784e1d
Simplify some constant expressions
...
llvm-svn: 7556
2003-08-04 01:04:59 +00:00
Chris Lattner
876353b107
Remove illegal, unsupported escapes. This fixes program: Ptrdist-bc
...
llvm-svn: 7552
2003-08-03 23:42:17 +00:00
Chris Lattner
5dcb654662
* Sort #includes, remove dupliates
...
* Use .zero to emit padding between struct elements
* Emit .comm symbols when we can, this dramatically reduces the amount of gunk we have to print
* Print global variable identifiers next to initializer more nicely.
llvm-svn: 7551
2003-08-03 23:37:09 +00:00
Chris Lattner
0b2c347eac
Specify custom name for registers to get the ()'s in the name.
...
llvm-svn: 7547
2003-08-03 22:12:47 +00:00
Chris Lattner
9c66ed8503
Allow specifying custom names for registers
...
llvm-svn: 7546
2003-08-03 22:12:37 +00:00
Chris Lattner
bb8bdc04a7
Start using tablegen'd instruction enum list
...
llvm-svn: 7542
2003-08-03 21:57:05 +00:00
Chris Lattner
637eebbfc1
Resort tables
...
llvm-svn: 7541
2003-08-03 21:56:36 +00:00
Chris Lattner
df14300577
Lump the base opcode in with the X86 TargetSpecific flags
...
llvm-svn: 7540
2003-08-03 21:56:22 +00:00
Chris Lattner
05e2f385a7
* Start using tablegen'd instruction descriptions
...
* Fix bug in the createNOP method, which was not marking the operands of the
generated XCHG as useanddef. I don't think this method is actually used,
so it wasn't breaking anything, but it should be fixed anyway...
llvm-svn: 7539
2003-08-03 21:55:55 +00:00
Chris Lattner
553f6c1e1d
Start using tablegenerated instruction descriptions
...
llvm-svn: 7538
2003-08-03 21:54:59 +00:00
Chris Lattner
59a4a91703
Add new TableGen instruction definitions
...
llvm-svn: 7537
2003-08-03 21:54:21 +00:00
Chris Lattner
1d4d4f0d8b
Remove the old .def file, it is now obsolete
...
llvm-svn: 7536
2003-08-03 21:54:06 +00:00
Chris Lattner
6c8a40895b
Rearrange fields yet again: Don't instantiate these lists ONCE PER INSTRUCTION.
...
llvm-svn: 7535
2003-08-03 21:52:28 +00:00
Chris Lattner
41a894de77
Simplify code, eliminating the need for the X86 isVoid target instr flag
...
llvm-svn: 7534
2003-08-03 21:51:45 +00:00
Chris Lattner
74e4e9b44f
Set debug types
...
llvm-svn: 7533
2003-08-03 21:47:31 +00:00
Chris Lattner
3663901941
Set debug types
...
llvm-svn: 7532
2003-08-03 21:14:38 +00:00
Chris Lattner
1789d23990
Remove using decl
...
llvm-svn: 7531
2003-08-03 20:24:29 +00:00
Chris Lattner
a8c3cff30f
Add Target class for X86 target
...
llvm-svn: 7523
2003-08-03 18:19:37 +00:00
Chris Lattner
aad0d9c6ef
The RegisterInfo class is obsolete
...
llvm-svn: 7522
2003-08-03 18:18:48 +00:00
Chris Lattner
6a7439fb42
Remove the RegisterInfo class in favor of a general Target class. Add instrinfo stuff
...
llvm-svn: 7521
2003-08-03 18:18:31 +00:00
Chris Lattner
e1453c3afc
Tell CVS to ignore all .inc files
...
llvm-svn: 7513
2003-08-03 15:50:17 +00:00
Chris Lattner
8b31688bb1
Switch over to tablegen generated header files
...
llvm-svn: 7512
2003-08-03 15:48:55 +00:00
Chris Lattner
a4741a94ff
Switch over to TableGen generated register file description
...
llvm-svn: 7511
2003-08-03 15:48:14 +00:00
Chris Lattner
5da8e80c46
Initial checkin of X86.td file
...
llvm-svn: 7510
2003-08-03 15:47:49 +00:00
Chris Lattner
731953bc5c
Initial checkin of X86 Register File description
...
llvm-svn: 7509
2003-08-03 15:47:25 +00:00
Chris Lattner
b6bcc0689c
Fix typeos in comments
...
llvm-svn: 7505
2003-08-03 13:50:14 +00:00
Chris Lattner
58cbc61516
Make it easier to debug by exposing a temporary
...
llvm-svn: 7504
2003-08-03 13:49:25 +00:00
Chris Lattner
6cce665888
Wrap at 80 columns
...
llvm-svn: 7503
2003-08-03 13:49:03 +00:00
Chris Lattner
d20486a0d9
Rename fields
...
llvm-svn: 7498
2003-08-01 22:21:49 +00:00
Chris Lattner
1007f033d4
Move DEBUG to Debug.h
...
llvm-svn: 7497
2003-08-01 22:21:34 +00:00
Chris Lattner
fea54c2511
DEBUG got moved to Debug.h
...
llvm-svn: 7495
2003-08-01 22:19:03 +00:00
Chris Lattner
8fb754a5b9
Move debug functionality to Debug.cpp/Debug.h
...
llvm-svn: 7494
2003-08-01 22:15:41 +00:00
Chris Lattner
f1afe32353
Describe the value name
...
llvm-svn: 7493
2003-08-01 22:15:15 +00:00
Chris Lattner
8abcd56c74
DEBUG got moved to Support/Debug.h
...
llvm-svn: 7492
2003-08-01 22:15:03 +00:00
Chris Lattner
f0c6964470
DEBUG got moved to Debug.h
...
llvm-svn: 7491
2003-08-01 22:13:59 +00:00
Chris Lattner
802b0e2a6e
Check in the implementation of the FileUtilities!
...
llvm-svn: 7487
2003-08-01 21:16:14 +00:00
Chris Lattner
c0eb77c24c
Remove makefile complexity by always running tablegen with its final output
...
directory.
llvm-svn: 7485
2003-08-01 20:34:56 +00:00
Chris Lattner
238ec53e70
Use the C++, more portable, deleter
...
llvm-svn: 7483
2003-08-01 20:29:18 +00:00
Chris Lattner
958f47b9f7
Move #include from a header to here
...
llvm-svn: 7480
2003-08-01 19:16:29 +00:00
Vikram S. Adve
89f9397668
Add all arithmetic operators to ConstantExprToString().
...
Note that some generated operators (like &, | or ^) may
not be supported by the assembler -- but if they've got
this far, it's better to generate them and let the assembler decide.
llvm-svn: 7476
2003-08-01 15:55:53 +00:00
Vikram S. Adve
16c2b62d13
*Both* operands of divide need sign-extension before divide (if smaller
...
than machine register size), not just the second operand.
llvm-svn: 7475
2003-08-01 15:54:38 +00:00
Vikram S. Adve
36fcc5d8b3
Put back the separate pass to decompose multi-dimensional references
...
since it is *necessary* for correct code generation. Only optional
transformations belong in the PreOpts pass (which needs to be renamed
from PreSelection to PreOpts).
llvm-svn: 7474
2003-08-01 15:53:24 +00:00
Chris Lattner
75c817a482
encode size information into each ValueType
...
Add new RegisterInfo class
llvm-svn: 7469
2003-08-01 05:18:03 +00:00
Chris Lattner
238dadc37c
This method is long dead
...
llvm-svn: 7460
2003-08-01 03:48:42 +00:00