Chris Lattner
863477568d
Rename DNVT_bool to DNVT_i1 to be consistent with type system
...
llvm-svn: 7768
2003-08-12 04:28:21 +00:00
Chris Lattner
2d72c035f0
Add support for basicblocks, setCC instructions, and branches
...
llvm-svn: 7767
2003-08-12 04:17:29 +00:00
Vikram S. Adve
10053969ca
Fix va_arg to generate LDDFi for floating point values, instead of LDXi.
...
All non-FP cases use LDXi as before.
llvm-svn: 7765
2003-08-12 03:04:05 +00:00
Sumant Kowshik
b3e21bb00f
Bug fix: Some nodes pointed to by globals may not be marked incomplete and need to be tracked to find pool arguments
...
llvm-svn: 7763
2003-08-12 00:45:13 +00:00
Chris Lattner
be0530bab9
Add basic support for 16 and 32 bit function arguments!
...
llvm-svn: 7755
2003-08-11 21:30:00 +00:00
Chris Lattner
a9704a0081
add frameidx support
...
Make load work
Make type inference infer from Arg1 to arg0 as well as from arg0 to arg1
llvm-svn: 7754
2003-08-11 21:29:40 +00:00
Chris Lattner
a577beaba5
Sort #includes, eliminate #include of "llvm/Type.h" which was redundant
...
llvm-svn: 7746
2003-08-11 20:06:16 +00:00
Chris Lattner
05b3cd4716
Cygwin apparently works with %'s on registers!
...
llvm-svn: 7745
2003-08-11 20:04:57 +00:00
Chris Lattner
d29a705b4b
Whoops, accidental checkin. :(
...
llvm-svn: 7743
2003-08-11 19:35:46 +00:00
Chris Lattner
84e5185cbd
Add a new -enable-cygwin-compatible-output argument, which make the output more
...
consumably by the cygwin assembler. This is really just a nasty hack until we
get real target triple support.
llvm-svn: 7742
2003-08-11 19:35:26 +00:00
Chris Lattner
f918b0a5fc
Add support to the mangler for targets which require _'s on global symbols
...
llvm-svn: 7741
2003-08-11 19:34:29 +00:00
Brian Gaeke
e599cf3856
Print % signs before register names; turn off "noprefix" mode in gas output.
...
Fixes test case test/Programs/LLVMSource/2003-08-03-ReservedWordGlobal.ll.
Also: Refactor implicit-uses printing into its own method.
Remove a couple of unused variables.
llvm-svn: 7737
2003-08-11 19:05:46 +00:00
Vikram S. Adve
aab4ebecd9
Register argument to va_start must be marked as defined!
...
llvm-svn: 7734
2003-08-11 18:42:47 +00:00
Chris Lattner
1ecd1818a0
Add (ret int) expander so that we can at least write testcases
...
llvm-svn: 7730
2003-08-11 15:48:00 +00:00
Misha Brukman
caed7aad11
Converted tabs to spaces.
...
llvm-svn: 7728
2003-08-11 15:38:50 +00:00
Misha Brukman
a0b2a82f8d
Removed `-debug' so that spurious printouts of patterns are not seen at
...
compilation time.
llvm-svn: 7727
2003-08-11 15:30:20 +00:00
Chris Lattner
4578d0770f
Remove dead code
...
llvm-svn: 7726
2003-08-11 15:24:02 +00:00
Chris Lattner
3f4b5cf09a
Add patterns for multiply, and, or, and xor
...
llvm-svn: 7725
2003-08-11 15:23:25 +00:00
Chris Lattner
854980039a
add support for more nodes
...
llvm-svn: 7724
2003-08-11 15:23:05 +00:00
Chris Lattner
4650950aee
Until the pattern matching instruction selector is finished, enable debug output from it
...
llvm-svn: 7722
2003-08-11 15:11:01 +00:00
Chris Lattner
623bd2eb83
Fix handling of 'free' if it has absolutely no prototype
...
llvm-svn: 7721
2003-08-11 15:05:08 +00:00
Chris Lattner
a0d327277d
Include the new selection library for the X86 target
...
llvm-svn: 7720
2003-08-11 14:59:53 +00:00
Chris Lattner
3dc2860679
Add support for a pattern matching instruction selector. This is still in
...
the early implementation phases, so it is disabled by default
llvm-svn: 7719
2003-08-11 14:59:22 +00:00
Chris Lattner
f40b9fb6c2
Build the SelectionDAG library
...
llvm-svn: 7718
2003-08-11 14:57:48 +00:00
Chris Lattner
45414456b3
Initial checkin of SelectionDAG implementation. This is still rough and
...
unfinished
llvm-svn: 7717
2003-08-11 14:57:33 +00:00
Chris Lattner
7d1623b861
Make imm be a leaf instead of a nonterminal
...
llvm-svn: 7708
2003-08-10 19:51:16 +00:00
Misha Brukman
772eedda42
close() requires "unistd.h" .
...
llvm-svn: 7695
2003-08-07 21:35:41 +00:00
Misha Brukman
8e86dd69ec
Doxygen-ify the comments by using '///' instead of '//'.
...
llvm-svn: 7694
2003-08-07 21:34:25 +00:00
Misha Brukman
ca83e0d56b
Remove references to `bugpoint' from the now-generic system utilities.
...
llvm-svn: 7693
2003-08-07 21:33:33 +00:00
Misha Brukman
1e83bc90b9
Moved removeFile() and getUniqueFilename() into FileUtilities.
...
llvm-svn: 7691
2003-08-07 21:28:50 +00:00
Misha Brukman
80ba72fe5c
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
bc05294ada
Fix assertion in MachineInstr::substituteValue().
...
llvm-svn: 7675
2003-08-07 15:01:48 +00:00
Vikram S. Adve
ba6f7167f0
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
e5d4f11e14
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
271dc1f51b
Update tablegen interfaces
...
llvm-svn: 7672
2003-08-07 13:52:22 +00:00
Sumant Kowshik
095e7c3052
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
a263312e82
This register is never used, disable it.
...
llvm-svn: 7661
2003-08-07 04:49:16 +00:00
Misha Brukman
8eafc8d965
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
f75a14d5af
* 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
ea0aa3f793
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
9d58af6fcf
Add a bunch of new Alpha Intrinsics for Rahul Joshi
...
llvm-svn: 7646
2003-08-06 20:08:25 +00:00
Vikram S. Adve
33b0d331f0
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
1d6e2b25c6
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
c445413be0
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
c25494f95e
Remove unnecessary use of NonCopyable
...
llvm-svn: 7641
2003-08-06 17:16:24 +00:00
Misha Brukman
2f831da9af
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
07a484e6f6
Completely eliminate the isVoid TSFlag, shifting over all other fields
...
llvm-svn: 7636
2003-08-06 15:32:20 +00:00
Chris Lattner
83831c66fc
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
2d20d75416
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
5a778ec126
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
937abf2262
Add a map
...
llvm-svn: 7620
2003-08-05 22:09:31 +00:00
Chris Lattner
a38b57808a
Minor cleanups
...
llvm-svn: 7619
2003-08-05 22:03:27 +00:00
Chris Lattner
18b0b92033
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
a826c8d485
Do not insert physical regsiters into the regsUsed set
...
llvm-svn: 7617
2003-08-05 21:55:20 +00:00
Tanya Lattner
6fbe85279f
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
48745a598c
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
629c78afe3
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
e2ee62c91c
Add more verbose comment
...
llvm-svn: 7610
2003-08-05 18:38:37 +00:00
Sumant Kowshik
1a4fce3511
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
18c49a775f
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
7e9e83e817
Specify DEBUG_TYPE's for the JIT debug messages
...
llvm-svn: 7604
2003-08-05 17:00:32 +00:00
Chris Lattner
54c2758e95
This method has now been changed to preserve flags for us!
...
llvm-svn: 7603
2003-08-05 16:59:24 +00:00
Chris Lattner
b047a0d449
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
6488844c2e
Factor shared code
...
llvm-svn: 7600
2003-08-05 16:34:44 +00:00
Chris Lattner
488b0e52a8
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
8cedc4ffa6
* 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
b44a9376d1
Implement TODO: print out short form of Invoke if possible
...
llvm-svn: 7595
2003-08-05 15:34:45 +00:00
Misha Brukman
c666ae831c
* 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
297f7d2451
Fix bugs handling ESP in alloca references
...
llvm-svn: 7591
2003-08-05 04:13:58 +00:00
Chris Lattner
6fece1bf61
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
17fc21b5fa
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
3b098f3fdd
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
1ada2fd28c
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
0e8197ad06
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
8934560bd3
* 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
cf51f31c3e
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
900d31f5ba
Change comments into something that TableGen can read!
...
llvm-svn: 7580
2003-08-04 21:08:29 +00:00
Chris Lattner
a06042d124
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
cd1aec5a9d
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
f62d020c88
There is nothing special about noops anymore
...
llvm-svn: 7568
2003-08-04 05:11:37 +00:00
Chris Lattner
25d89c23aa
There is nothing special about noops now
...
llvm-svn: 7567
2003-08-04 05:11:19 +00:00
Chris Lattner
94c11ac765
Transition to using 'let X = y' instead of 'set X = y'.
...
llvm-svn: 7565
2003-08-04 05:03:18 +00:00
Chris Lattner
0d7b042206
transition to using let instead of set
...
llvm-svn: 7564
2003-08-04 04:59:56 +00:00
Chris Lattner
7ca890525d
Transition to using let instead of set
...
llvm-svn: 7563
2003-08-04 04:58:12 +00:00
Chris Lattner
15891a50c1
Fix Bug: test/Regression/Jello/2003-08-03-CallArgLiveRanges.llx
...
llvm-svn: 7558
2003-08-04 02:12:48 +00:00
Chris Lattner
b79989c60d
Simplify some constant expressions
...
llvm-svn: 7556
2003-08-04 01:04:59 +00:00
Chris Lattner
52f4e7d96d
Remove illegal, unsupported escapes. This fixes program: Ptrdist-bc
...
llvm-svn: 7552
2003-08-03 23:42:17 +00:00
Chris Lattner
96704b97ca
* 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
e9a18e0f9f
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
cc69139686
Allow specifying custom names for registers
...
llvm-svn: 7546
2003-08-03 22:12:37 +00:00
Chris Lattner
8cca0ab42b
Start using tablegen'd instruction enum list
...
llvm-svn: 7542
2003-08-03 21:57:05 +00:00
Chris Lattner
21c04e759f
Resort tables
...
llvm-svn: 7541
2003-08-03 21:56:36 +00:00
Chris Lattner
1bc88585c3
Lump the base opcode in with the X86 TargetSpecific flags
...
llvm-svn: 7540
2003-08-03 21:56:22 +00:00
Chris Lattner
128b75130d
* 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
4e20fd5a9b
Start using tablegenerated instruction descriptions
...
llvm-svn: 7538
2003-08-03 21:54:59 +00:00
Chris Lattner
89b4a26e56
Add new TableGen instruction definitions
...
llvm-svn: 7537
2003-08-03 21:54:21 +00:00
Chris Lattner
9249afaa83
Remove the old .def file, it is now obsolete
...
llvm-svn: 7536
2003-08-03 21:54:06 +00:00
Chris Lattner
b62d30ec22
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
5dca2ea4bc
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
77691b2c54
Set debug types
...
llvm-svn: 7533
2003-08-03 21:47:31 +00:00
Chris Lattner
25e28f61ab
Set debug types
...
llvm-svn: 7532
2003-08-03 21:14:38 +00:00
Chris Lattner
eba995d624
Remove using decl
...
llvm-svn: 7531
2003-08-03 20:24:29 +00:00
Chris Lattner
7ef512fec1
Add Target class for X86 target
...
llvm-svn: 7523
2003-08-03 18:19:37 +00:00
Chris Lattner
6b3f365906
The RegisterInfo class is obsolete
...
llvm-svn: 7522
2003-08-03 18:18:48 +00:00
Chris Lattner
c485e85fa2
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
964738dd71
Tell CVS to ignore all .inc files
...
llvm-svn: 7513
2003-08-03 15:50:17 +00:00
Chris Lattner
5969ff707d
Switch over to tablegen generated header files
...
llvm-svn: 7512
2003-08-03 15:48:55 +00:00
Chris Lattner
457b33f7e4
Switch over to TableGen generated register file description
...
llvm-svn: 7511
2003-08-03 15:48:14 +00:00
Chris Lattner
0891dd9161
Initial checkin of X86.td file
...
llvm-svn: 7510
2003-08-03 15:47:49 +00:00
Chris Lattner
f4bfcad4ea
Initial checkin of X86 Register File description
...
llvm-svn: 7509
2003-08-03 15:47:25 +00:00
Chris Lattner
8aa04e1e4c
Fix typeos in comments
...
llvm-svn: 7505
2003-08-03 13:50:14 +00:00
Chris Lattner
b33c691d7d
Make it easier to debug by exposing a temporary
...
llvm-svn: 7504
2003-08-03 13:49:25 +00:00
Chris Lattner
a18bb98cf5
Wrap at 80 columns
...
llvm-svn: 7503
2003-08-03 13:49:03 +00:00
Chris Lattner
490d0d3351
Rename fields
...
llvm-svn: 7498
2003-08-01 22:21:49 +00:00
Chris Lattner
1baa706ab7
Move DEBUG to Debug.h
...
llvm-svn: 7497
2003-08-01 22:21:34 +00:00
Chris Lattner
277bb3482c
DEBUG got moved to Debug.h
...
llvm-svn: 7495
2003-08-01 22:19:03 +00:00
Chris Lattner
ef90e1b189
Move debug functionality to Debug.cpp/Debug.h
...
llvm-svn: 7494
2003-08-01 22:15:41 +00:00
Chris Lattner
89bf5d3a60
Describe the value name
...
llvm-svn: 7493
2003-08-01 22:15:15 +00:00
Chris Lattner
686e94e760
DEBUG got moved to Support/Debug.h
...
llvm-svn: 7492
2003-08-01 22:15:03 +00:00
Chris Lattner
64fade1536
DEBUG got moved to Debug.h
...
llvm-svn: 7491
2003-08-01 22:13:59 +00:00
Chris Lattner
aa22e98e56
Check in the implementation of the FileUtilities!
...
llvm-svn: 7487
2003-08-01 21:16:14 +00:00
Chris Lattner
1e006b1e92
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
cba4e65559
Use the C++, more portable, deleter
...
llvm-svn: 7483
2003-08-01 20:29:18 +00:00
Chris Lattner
346760c6cb
Move #include from a header to here
...
llvm-svn: 7480
2003-08-01 19:16:29 +00:00
Vikram S. Adve
eda4d9cb09
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
b68bd55363
*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
4576ae1530
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
d96b821c8a
encode size information into each ValueType
...
Add new RegisterInfo class
llvm-svn: 7469
2003-08-01 05:18:03 +00:00
Chris Lattner
8dce81478f
This method is long dead
...
llvm-svn: 7460
2003-08-01 03:48:42 +00:00
Chris Lattner
5d1a43bb60
Fix the JIT in the Nightly tester. This was not a fun bug to track down.
...
See the comments in the patch for details.
llvm-svn: 7457
2003-07-31 19:38:34 +00:00
Chris Lattner
12defed07e
Trivial cleanups: no need to include header twice. Global variable is local to file
...
llvm-svn: 7456
2003-07-31 19:31:21 +00:00
Chris Lattner
79a56ff370
Remove more obsolete comments
...
llvm-svn: 7455
2003-07-31 17:56:05 +00:00
Misha Brukman
f451b1f332
Changed pointer to the JIT code to its current location, under LLI.
...
llvm-svn: 7454
2003-07-31 17:50:35 +00:00
Chris Lattner
93dacfb0bd
Unbreak the CBE output
...
llvm-svn: 7453
2003-07-31 17:47:24 +00:00
Brian Gaeke
4449b3c963
I think local symbols in X86 GAS have to start with .L, not just
...
.; so I have changed the basic block markers to start with .L. I also
broke up a >80char line.
llvm-svn: 7452
2003-07-31 17:38:52 +00:00
John Criswell
9610326d63
Modified the code so that it generates (0) for setjmp() and abort() for
...
longjmp() (and does not include setjmp.h).
This is to fix some problems on Sparc while non-local jumps are still
unimplemented.
llvm-svn: 7449
2003-07-31 15:11:08 +00:00
Tanya Lattner
26f6e3b353
*** empty log message ***
...
llvm-svn: 7447
2003-07-31 05:06:09 +00:00
Tanya Lattner
8c2ac118ce
Added function to determine if an Instruction may trap.
...
llvm-svn: 7442
2003-07-31 04:05:50 +00:00
Chris Lattner
d1b7716c86
Add comments
...
Make the register classes optionally take code fragments for allocation_order_*
llvm-svn: 7441
2003-07-30 22:16:41 +00:00
Chris Lattner
51504820c7
We no longer need to preprocess SparcV9.td before sending it through tablegen
...
llvm-svn: 7437
2003-07-30 21:00:37 +00:00
Chris Lattner
6457a808f0
Fix a bug that brian reported
...
llvm-svn: 7428
2003-07-30 19:04:37 +00:00
Chris Lattner
78f944d347
Add support for "named positional arguments"
...
llvm-svn: 7421
2003-07-30 17:34:02 +00:00
Vikram S. Adve
d4520885a0
When emitting a constant, check for ConstantExpr before
...
ordinary (primitive) types since ConstantExprs may be of primitive type!
llvm-svn: 7418
2003-07-30 12:54:47 +00:00
Chris Lattner
9e520e120b
Conform to the new interface for describing target registers... even though
...
it's currently not used.
llvm-svn: 7416
2003-07-30 05:51:34 +00:00
Chris Lattner
d1b04c63c2
Add all of the necessary classes to describe the contents of the MRegister.h implementation
...
for a target.
llvm-svn: 7415
2003-07-30 05:50:12 +00:00
Chris Lattner
24ac5f5339
Only regenerate the .inc file if IT has changed, not just if the .td files
...
have changed.
llvm-svn: 7414
2003-07-30 05:49:17 +00:00
Chris Lattner
cf28d0f799
Use target specific interface instead of forcing it to be target-generic
...
llvm-svn: 7413
2003-07-30 05:33:48 +00:00
Chris Lattner
1933b89bfe
No this file is not actually Sparc.td :)
...
llvm-svn: 7405
2003-07-29 23:07:13 +00:00
Chris Lattner
89619f07a3
Do not use 'cpp' directly
...
llvm-svn: 7404
2003-07-29 23:04:41 +00:00
Chris Lattner
f59d363766
Add namespace specifier, add flags used by the X86 BE
...
llvm-svn: 7403
2003-07-29 23:02:49 +00:00
Misha Brukman
d0aaeba334
* Cleaned up and corrected comments wrt instruction formats
...
* Enabled STXFSR instructions
llvm-svn: 7400
2003-07-29 21:21:20 +00:00
Misha Brukman
6f2a6a5279
Make emitFarCall() public, and add a few comments to functions.
...
llvm-svn: 7399
2003-07-29 20:52:56 +00:00
Vikram S. Adve
ae84838162
Unify all constant evaluations that depend on register size
...
in ConvertConstantToIntType.
llvm-svn: 7395
2003-07-29 19:59:23 +00:00
Vikram S. Adve
c8b8a4088d
Rename 'dump-asm' to 'dump-input' and really print it just before code-gen.
...
llvm-svn: 7394
2003-07-29 19:58:00 +00:00
Vikram S. Adve
0a6bd349c2
Bug fix: don't unnecessarily pretty-print control-characters, some of
...
which were wrong (particularly, '\a' for '\007').
llvm-svn: 7393
2003-07-29 19:57:34 +00:00
Vikram S. Adve
98618cd85c
Add ConvertConstantToIntType() to unify all constant handling
...
that depends on machine register size.
Moved insertCallerSavingCode() to PhyRegAlloc and
moved isRegVolatile and modifiedByCall to TargetRegInfo: they are all
machine independent. Remove several dead functions.
llvm-svn: 7392
2003-07-29 19:54:41 +00:00
Vikram S. Adve
97e5e148b8
Add code to support stack spill/temp offsets that don't fit in the
...
immed. field. Moved insertCallerSavingCode() to PhyRegAlloc: it is
now machine independent. Remove all uses of PhyRegAlloc.
llvm-svn: 7391
2003-07-29 19:53:21 +00:00
Vikram S. Adve
1414fba288
All constant-evaluation code now unified into
...
TargetInstrInfo::ConvertConstantToIntType().
llvm-svn: 7390
2003-07-29 19:50:12 +00:00
Vikram S. Adve
b58f52ab45
1. Bug fix: Don't use branch operand reg. as temp. reg. when
...
spilling values used by an instruction in the delay slot of the branch
(which will eventually be moved before the branch).
2. Bug fix: Delete the delay slot instr, not the branch instr, when
moving delay slot instr. out!!!!
3. Move code to insert caller-saves moved here from SparcRegInfo:
it is now machine-independent.
llvm-svn: 7389
2003-07-29 19:49:21 +00:00
Vikram S. Adve
59e7da7437
Don't require a BB to look-up live variables, unless they may need to
...
be recomputed.
llvm-svn: 7388
2003-07-29 19:42:32 +00:00
Vikram S. Adve
42005e62b0
Add const version of getLiveRangeForValue().
...
llvm-svn: 7386
2003-07-29 19:38:22 +00:00
Vikram S. Adve
52859278d1
Code to insert caller-saves moved here from SparcRegInfo: it is now
...
machine-independent.
Fix problem with using branch operand reg. as temp. reg. when
spilling values used by an instruction in the delay slot of the branch
(which will eventually be moved before the branch).
llvm-svn: 7385
2003-07-29 19:37:41 +00:00
Misha Brukman
9bcbe0c3bc
* Correctly emit a far call if the target address does not fit into 30 bits
...
instead of assert()ing
* Fixed a nasty bug where '07' was used instead of register 'o7'
llvm-svn: 7382
2003-07-29 19:00:58 +00:00
Misha Brukman
442175ec3b
* Stop hard-coding a value for beginning of emitted code on Sparc since we can
...
now handle far calls (i.e., beyond the 30-bit limit in call instructions).
* As a side-effect, this allows us to unify and clean up the mmap() call and
code around it.
llvm-svn: 7381
2003-07-29 16:57:16 +00:00
Chris Lattner
8fdf81b97e
Move "register flags" definition the type of registers to be fully fledged
...
value types
llvm-svn: 7377
2003-07-29 05:14:16 +00:00
Chris Lattner
b6db3e9a88
Add support for Alpha intrinsics, contributed by Rahul Joshi
...
llvm-svn: 7373
2003-07-28 21:20:57 +00:00
Misha Brukman
c77e286633
Add rationale for the MAP_ANONYMOUS vs. MAP_ANON flags.
...
llvm-svn: 7368
2003-07-28 19:26:19 +00:00
Misha Brukman
bbfad09fa9
The RTLD_GLOBAL flag allows symbols to be globally accessible, which makes
...
resolution of symbols in the .so possible (currently assists debugging with
bugpoint).
llvm-svn: 7366
2003-07-28 19:19:58 +00:00
Misha Brukman
c0193ca460
Add ability for external C code to get pointers to functions given their name.
...
This us used by bugpoint -- when code is compiled to a shared object to be
JITted, it must use the JIT's lazy resolution method to find function addresses,
because some functions will not be available at .so load time, as they are in
the bytecode file.
llvm-svn: 7363
2003-07-28 19:09:06 +00:00
Misha Brukman
752c6f4548
Clean up code dealing with RTLD_SELF differences on Sparc and X86.
...
llvm-svn: 7362
2003-07-28 19:07:30 +00:00
Misha Brukman
cd6e03cb52
Fix reference to architecture.
...
llvm-svn: 7361
2003-07-28 19:06:50 +00:00
Misha Brukman
f4702ed4d1
Add in support to load shared objects (-load is provided by Support library).
...
llvm-svn: 7360
2003-07-28 19:06:19 +00:00
Chris Lattner
da51c38e57
Specify the value type for the register, not just the size.
...
llvm-svn: 7357
2003-07-28 04:25:36 +00:00
Chris Lattner
163559e702
Instead of specifying the SIZE of the register, go so far as to specify
...
what value type it is.
llvm-svn: 7356
2003-07-28 04:24:59 +00:00
Chris Lattner
40cc4c1392
Rename function to be more consistent with filename
...
llvm-svn: 7352
2003-07-26 23:49:58 +00:00
Chris Lattner
92dfc1ed32
Making this code const-correct would be a pain, so I'll hack it.
...
llvm-svn: 7350
2003-07-26 23:29:51 +00:00
Chris Lattner
2d6049baaf
Const correctness fixes
...
llvm-svn: 7349
2003-07-26 23:24:56 +00:00
Chris Lattner
e39696972d
Be const correct
...
llvm-svn: 7348
2003-07-26 23:23:41 +00:00
Chris Lattner
792286a084
Hrm, another necesary one :(
...
llvm-svn: 7347
2003-07-26 23:22:19 +00:00
Chris Lattner
f0df04752d
We don't modify the LLVM rep, remain const correct
...
llvm-svn: 7345
2003-07-26 23:06:00 +00:00
Chris Lattner
b92653f037
If the pass changes _anything_ it must return true
...
llvm-svn: 7344
2003-07-26 23:05:37 +00:00
Chris Lattner
406d31b4c2
This code doesn't modify the LLVM structure, keep stuff const
...
llvm-svn: 7343
2003-07-26 23:04:00 +00:00
Chris Lattner
ecc0501a97
Remove #include
...
llvm-svn: 7342
2003-07-26 23:01:04 +00:00
Chris Lattner
9224631d6b
Remove extraneous #includes
...
llvm-svn: 7341
2003-07-26 23:00:29 +00:00
Chris Lattner
36a7bf78fa
Fix another minor bug
...
llvm-svn: 7340
2003-07-26 23:00:05 +00:00
Vikram S. Adve
48144de834
(1) Major fix to the way unused regs. are marked and found for the FP
...
Single and FP double reg types (which share the same reg class).
Now all methods marking/finding unused regs consider the regType
within the reg class, and SparcFloatRegClass specializes this code.
(2) Remove machine-specific regalloc. methods that are no longer needed.
In particular, arguments and return value from a call do not need
machine-specific code for allocation.
(3) Rename TargetRegInfo::getRegType variants to avoid unintentional
overloading when an include file is omitted.
llvm-svn: 7334
2003-07-25 21:12:15 +00:00
Vikram S. Adve
a98599dc3b
1. Fix a case that was marking the invalid reg. num. (-1) as used,
...
causing a nasty array bound error later.
2. Fix silly typo causing logical shift of unsigned long to use
SRL instead of SRLX.
llvm-svn: 7330
2003-07-25 21:08:58 +00:00
Vikram S. Adve
57eb4ab6bc
(1) Change the way unused regs. are marked and found to consider regType
...
info (since multiple reg types may share the same reg class).
(2) Remove machine-specific regalloc. methods that are no longer needed.
In particular, arguments and return value from a call do not need
machine-specific code for allocation.
(3) Rename TargetRegInfo::getRegType variants to avoid unintentional
overloading when an include file is omitted.
llvm-svn: 7329
2003-07-25 21:06:09 +00:00
Vikram S. Adve
714fee31fd
Remove unused field. Change the way unused regs. are marked and
...
found to consider regType info (since multiple reg types may share
the same reg class, e.g., single and double on Sparc).
llvm-svn: 7327
2003-07-25 21:00:13 +00:00
Chris Lattner
752a4ca4c4
Dont' try to parse the colon
...
llvm-svn: 7323
2003-07-25 20:49:29 +00:00
Chris Lattner
915b998b3f
Add a more general check-flags which can be used to ensure arbitrary flags are set
...
llvm-svn: 7322
2003-07-25 20:45:40 +00:00
Brian Gaeke
991f66b7e2
Include llvm/Support/Mangler.h first. Don't include <iostream>, <set>,
...
<string>, or llvm/Value.h. Move up the inclusion of llvm/Support/Mangler.h.
llvm-svn: 7321
2003-07-25 20:21:20 +00:00
Brian Gaeke
11e6d7f2de
Don't include llvm/SlotCalculator.h, or <set>.
...
Move up the inclusion of llvm/Support/Mangler.h.
llvm-svn: 7320
2003-07-25 20:21:06 +00:00
Brian Gaeke
d9979a5529
Cleanups:
...
Mangler.cpp: Constify parameter to makeNameProper, and use const_iterator.
Make Count an unsigned int, and use utostr().
Don't name parameters things that start with underscore.
Mangler.h: All of the above, and also: Add Emacs mode-line. Include <set>.
llvm-svn: 7301
2003-07-24 21:37:57 +00:00
Brian Gaeke
e5ae59ad05
Factor out name-mangling from X86/Printer, which is derived from CWriter,
...
into this new support class.
llvm-svn: 7300
2003-07-24 20:20:58 +00:00
Brian Gaeke
dc07ea6681
Use unified CWriter-X86/Printer name mangler. Do not bother using
...
SlotCalculator in CWriter. (Unfortunately, all this means a lot of
X86/Printer's methods have to be de-constified again. Oh well.)
llvm-svn: 7299
2003-07-24 20:20:44 +00:00
Chris Lattner
c5b0f39c96
Instcombine: (A >> c1) << c2 for signed integers
...
llvm-svn: 7295
2003-07-24 18:38:56 +00:00
Chris Lattner
bf9589bf1f
Reorganization of code, no functional changes.
...
Now it shoudl be a bit more efficient
llvm-svn: 7292
2003-07-24 17:52:58 +00:00
Brian Gaeke
77b077a109
It doesn't appear that we need to #include these.
...
llvm-svn: 7291
2003-07-24 17:48:53 +00:00
Chris Lattner
785e8453f0
Allow folding several instructions into casts, which can simplify a lot
...
of codes. For example,
short kernel (short t1) {
t1 >>= 8; t1 <<= 8;
return t1;
}
became:
short %kernel(short %t1.1) {
%tmp.3 = shr short %t1.1, ubyte 8 ; <short> [#uses=1]
%tmp.5 = cast short %tmp.3 to int ; <int> [#uses=1]
%tmp.7 = shl int %tmp.5, ubyte 8 ; <int> [#uses=1]
%tmp.8 = cast int %tmp.7 to short ; <short> [#uses=1]
ret short %tmp.8
}
before, now it becomes:
short %kernel(short %t1.1) {
%tmp.3 = shr short %t1.1, ubyte 8 ; <short> [#uses=1]
%tmp.8 = shl short %tmp.3, ubyte 8 ; <short> [#uses=1]
ret short %tmp.8
}
which will become:
short %kernel(short %t1.1) {
%tmp.3 = and short %t1.1, 0xFF00
ret short %tmp.3
}
This implements cast-set.ll:test4 and test5
llvm-svn: 7290
2003-07-24 17:35:25 +00:00