Commit Graph

4146 Commits

Author SHA1 Message Date
Chris Lattner
48e6079478 Adjust files for move of mapping info stuff into the Sparc directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7802 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 02:38:16 +00:00
Chris Lattner
7f2438f170 Mapping directory no longer exists
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7801 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 02:37:24 +00:00
Chris Lattner
4c7fc1e813 Incorporate mapping library into the sparc library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7800 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 02:28:20 +00:00
Chris Lattner
c09f429499 Obsolete file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7799 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 02:27:13 +00:00
Brian Gaeke
99c27d7686 Just incorporating some notes I wrote for myself into a place where they won't
get lost...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7798 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 00:30:48 +00:00
Vikram S. Adve
feb3298fca For instructions in a delay slot of another instruction,
we no longer need to find the live-before set of the delayed
branch since that set is now included the live-before/after
set of the instructions in each delay slot.  Just assert that instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7796 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 22:22:24 +00:00
Vikram S. Adve
88d962aa58 For an instruction with delay slots, mark all live values before
the instruction as being live before/after the delay slot
instructions as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7795 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 22:19:59 +00:00
Brian Gaeke
aee2fdf069 Give std::map<BasicBlock *, BasicBlock *> the short name BBMap, because
it's used 7 different times.
Rename `getBackEdges' to `findAndInstrumentBackEdges', for clarity.
Remove some excess whitespace and commented-out code.
Use shorter forms of CallInst ctors.
Do not make `reopt_threshold' visible to the LLVM program, and do not
 pass it to the call to `reoptimizerInitialize'.  Don't pass the
 GlobalVariable representing it to any of our helper methods.
 `reopt_threshold' is an internal parameter of the reoptimizer, which
 InstLoops does not need to know about.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7794 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 22:00:24 +00:00
Chris Lattner
df17af1dc7 Allow pulling logical operations through shifts.
This implements InstCombine/shift.ll:test14*


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7793 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 21:53:41 +00:00
Chris Lattner
e9608e37fc Fix bug: Reassociate/2003-08-12-InfiniteLoop.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7792 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 21:45:24 +00:00
Chris Lattner
33fbad7024 Reenable optimized build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7788 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 20:46:50 +00:00
Chris Lattner
6007cb6c4d Assign finer grained ranks, make sure to reassociate top-level after reassociating bottom level
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7787 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 20:14:27 +00:00
Chris Lattner
e132d95b62 Simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7783 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 19:17:27 +00:00
Chris Lattner
67ca768927 Implement testcases InstCombine/or.ll:test16/test17
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7782 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 19:11:07 +00:00
Brian Gaeke
8ab1ef265a Add FunctionPassManager - it's like a PassManager, but it only deals in
FunctionPasses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7778 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 17:22:39 +00:00
Vikram S. Adve
20a3be3ba8 Disable emitting LLVM-to-MI maps, by default.
Add -emitmaps options to turn this back on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7774 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 15:51:02 +00:00
Chris Lattner
c12a61463a Rename DNVT_bool to DNVT_i1 to be consistent with type system
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7768 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 04:28:21 +00:00
Chris Lattner
c8477960b0 Add support for basicblocks, setCC instructions, and branches
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7767 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 04:17:29 +00:00
Vikram S. Adve
9d27514a21 Fix va_arg to generate LDDFi for floating point values, instead of LDXi.
All non-FP cases use LDXi as before.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7765 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 03:04:05 +00:00
Sumant Kowshik
233d0758a1 Bug fix: Some nodes pointed to by globals may not be marked incomplete and need to be tracked to find pool arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7763 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 00:45:13 +00:00
Chris Lattner
00b40943ab Add basic support for 16 and 32 bit function arguments!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7755 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 21:30:00 +00:00
Chris Lattner
c0bb13dc82 add frameidx support
Make load work
Make type inference infer from Arg1 to arg0 as well as from arg0 to arg1


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7754 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 21:29:40 +00:00
Chris Lattner
d59414fc85 Sort #includes, eliminate #include of "llvm/Type.h" which was redundant
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7746 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 20:06:16 +00:00
Chris Lattner
67488a9236 Cygwin apparently works with %'s on registers!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7745 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 20:04:57 +00:00
Chris Lattner
2bcee3400f Whoops, accidental checkin. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7743 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 19:35:46 +00:00
Chris Lattner
93c1afacd1 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7742 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 19:35:26 +00:00
Chris Lattner
2b3860faeb Add support to the mangler for targets which require _'s on global symbols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7741 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 19:34:29 +00:00
Brian Gaeke
2a09877519 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7737 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 19:05:46 +00:00
Vikram S. Adve
4ecff5df8c Register argument to va_start must be marked as defined!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7734 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 18:42:47 +00:00
Chris Lattner
e7e33c0543 Add (ret int) expander so that we can at least write testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7730 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 15:48:00 +00:00
Misha Brukman
bf2f8a9963 Converted tabs to spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7728 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 15:38:50 +00:00
Misha Brukman
859e5cc1f7 Removed `-debug' so that spurious printouts of patterns are not seen at
compilation time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7727 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 15:30:20 +00:00
Chris Lattner
7c2af6e93a Remove dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7726 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 15:24:02 +00:00
Chris Lattner
b84fe1c636 Add patterns for multiply, and, or, and xor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7725 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 15:23:25 +00:00
Chris Lattner
622003fd74 add support for more nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7724 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 15:23:05 +00:00
Chris Lattner
2aa3a66fb1 Until the pattern matching instruction selector is finished, enable debug output from it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7722 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 15:11:01 +00:00
Chris Lattner
1f28e8ce4d Fix handling of 'free' if it has absolutely no prototype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7721 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 15:05:08 +00:00
Chris Lattner
4c08840e4b Include the new selection library for the X86 target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7720 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 14:59:53 +00:00
Chris Lattner
ac0c8680ad Add support for a pattern matching instruction selector. This is still in
the early implementation phases, so it is disabled by default


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7719 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 14:59:22 +00:00
Chris Lattner
fa7ed53f32 Build the SelectionDAG library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7718 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 14:57:48 +00:00
Chris Lattner
78ec311bd5 Initial checkin of SelectionDAG implementation. This is still rough and
unfinished


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7717 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 14:57:33 +00:00
Chris Lattner
f8dfa6ff9b Make imm be a leaf instead of a nonterminal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7708 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-10 19:51:16 +00:00
Misha Brukman
da81eca4bb close() requires "unistd.h" .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7695 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 21:35:41 +00:00
Misha Brukman
f7066c76d2 Doxygen-ify the comments by using '///' instead of '//'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7694 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 21:34:25 +00:00
Misha Brukman
35d402fbba Remove references to `bugpoint' from the now-generic system utilities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7693 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 21:33:33 +00:00
Misha Brukman
3d1b0c7331 Moved removeFile() and getUniqueFilename() into FileUtilities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7691 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 21:28:50 +00:00
Misha Brukman
b8db66eb17 Implement LLVM intrinsics llvm.setjmp' and llvm.longjmp' as follows:
* setjmp() simply returns 0
* longjmp() simply calls abort()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7676 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 15:43:46 +00:00
Vikram S. Adve
2010f7baec Fix assertion in MachineInstr::substituteValue().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7675 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 15:01:48 +00:00
Vikram S. Adve
97a95bdbdd 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7674 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 15:01:26 +00:00
John Criswell
7d3c5795f9 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().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7673 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 14:43:13 +00:00
Chris Lattner
ec4f523178 Update tablegen interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7672 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 13:52:22 +00:00
Sumant Kowshik
8e37bd0330 Added code for pool allocating only the pool-allocatable data structures in the presence of collapsed nodes + a couple of bug fixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7662 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 05:29:28 +00:00
Chris Lattner
69666e552e This register is never used, disable it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7661 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 04:49:16 +00:00
Misha Brukman
fe8a796833 Changing command-line option formats to be more consistent with LLVM style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7658 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 23:25:25 +00:00
Misha Brukman
58ba50fea7 * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7657 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 23:06:21 +00:00
Misha Brukman
0870e970ff 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7653 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 22:19:18 +00:00
Chris Lattner
c232818432 Add a bunch of new Alpha Intrinsics for Rahul Joshi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7646 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 20:08:25 +00:00
Vikram S. Adve
e895a740c7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7645 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 18:48:40 +00:00
Vikram S. Adve
5ac1175ada 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7644 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 18:42:49 +00:00
Chris Lattner
326e40aa8b The HAVE_JUMP code is dead, these intrinsics should _never_ be expanded
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7642 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 18:04:40 +00:00
Chris Lattner
8043127860 Remove unnecessary use of NonCopyable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7641 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 17:16:24 +00:00
Misha Brukman
0897c60822 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()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7639 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 16:20:22 +00:00
Chris Lattner
2959b6ec49 Completely eliminate the isVoid TSFlag, shifting over all other fields
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7636 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 15:32:20 +00:00
Chris Lattner
d87b59c866 add a pattern for RET, immediates no longer need to be explicitly typed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7635 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 15:31:35 +00:00
Chris Lattner
3e77d6e44c Start adding usefulness to the DAG node definitions, add a new Expander
class


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7634 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 15:31:02 +00:00
Chris Lattner
3fd1f5bb6a Use a new local data structure instead of the MachineInstr::regsUsed set
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7621 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 22:11:13 +00:00
Chris Lattner
c393c57afc Add a map
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7620 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 22:09:31 +00:00
Chris Lattner
6ae3117582 Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7619 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 22:03:27 +00:00
Chris Lattner
3bed95b628 Physical registers no longer live in the regsUsed set for each machine instr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7618 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 21:55:58 +00:00
Chris Lattner
610234d5c9 Do not insert physical regsiters into the regsUsed set
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7617 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 21:55:20 +00:00
Tanya Lattner
11a49a722f Fixed minor bug in SafeToHoist and made some changes suggested by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7614 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 20:39:02 +00:00
Tanya Lattner
9966c03aad Fixed LICM bug that hoists trapping instructions that are not guaranteed to execute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7612 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 18:45:46 +00:00
Chris Lattner
c8afdc150c Minor changes:
* Expand most tabs into spaces
  * Move #define DEBUG_TYPE to top of file to avoid warning


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7611 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 18:44:12 +00:00
Chris Lattner
7ddb0139ad Add more verbose comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7610 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 18:38:37 +00:00
Sumant Kowshik
108421a8e5 Added function mergeInGlobalsGraph which merges in the entire globals graph with the graph of a function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7606 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 17:04:41 +00:00
Sumant Kowshik
f67e7fc7b1 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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7605 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 17:01:54 +00:00
Chris Lattner
3785fad56e Specify DEBUG_TYPE's for the JIT debug messages
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7604 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 17:00:32 +00:00
Chris Lattner
907b7dc9bd This method has now been changed to preserve flags for us!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7603 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 16:59:24 +00:00
Chris Lattner
a2dd745613 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7602 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 16:58:46 +00:00
Chris Lattner
c9bbfbc04e Factor shared code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7600 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 16:34:44 +00:00
Chris Lattner
122558b05b Fix bug: SimplifyCFG/2003-08-05-InvokeCrash.ll
Fix bug: SimplifyCFG/2003-08-05-MishandleInvoke.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7599 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 16:27:44 +00:00
Misha Brukman
f4de783582 * Removed `using' declaration, now use full namespace qualifier std::string
* Simplified code by using an inline function instead of copy-pasted code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7597 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 16:01:50 +00:00
Chris Lattner
7a012299ce Implement TODO: print out short form of Invoke if possible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7595 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 15:34:45 +00:00
Misha Brukman
c3cd8afe96 * 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7592 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 14:34:38 +00:00
Chris Lattner
8c8194500d Fix bugs handling ESP in alloca references
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7591 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 04:13:58 +00:00
Chris Lattner
d9ac6a7d3b Revert previous change, and be really anal about what physical registers can do.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7588 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 00:49:09 +00:00
Chris Lattner
02beda1221 This is the real fix for the previous register allocator problem.
Physical registers should not float around.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7587 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 00:48:47 +00:00
Misha Brukman
b10cea86a9 Reformatted code to match the prevalent LLVM style; fit code into 80 columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7586 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 00:02:06 +00:00
Misha Brukman
3683d9e842 ElectricFence found this bug where we were reading past the vector boundary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7585 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 23:48:40 +00:00
Chris Lattner
27615d7f21 Don't bother calculating info unless its needed. May reduce number of stack slots created.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7584 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 23:42:37 +00:00
Chris Lattner
b8822ad224 * Fix spelling of 'necessary'
* Add a lot more DEBUG output, which is better structured than before
* Fix bug: Jello/2003-08-04-PhysRegLiveFailure.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7583 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 23:36:39 +00:00
Chris Lattner
0bfd186db0 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7581 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 21:18:19 +00:00
Chris Lattner
c34921dc6a Change comments into something that TableGen can read!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7580 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 21:08:29 +00:00
Chris Lattner
244883e4af Allow instructions to have a DAG pattern associated with them.
Define a few preliminary node types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7579 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 21:07:37 +00:00
Chris Lattner
6770aedf7f Rename register classes to be upper case to make it obvious that they are X86
specific in the tree patterns


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7578 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 20:58:29 +00:00
Chris Lattner
e5bb2d94d9 There is nothing special about noops anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7568 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 05:11:37 +00:00
Chris Lattner
17d4d147dd There is nothing special about noops now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7567 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 05:11:19 +00:00
Chris Lattner
7cc7d987a4 Transition to using 'let X = y' instead of 'set X = y'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7565 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 05:03:18 +00:00
Chris Lattner
c8f4587efd transition to using let instead of set
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7564 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 04:59:56 +00:00
Chris Lattner
60e81db31c Transition to using let instead of set
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7563 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 04:58:12 +00:00
Chris Lattner
5e2cb8b991 Fix Bug: test/Regression/Jello/2003-08-03-CallArgLiveRanges.llx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7558 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 02:12:48 +00:00
Chris Lattner
72feb15563 Simplify some constant expressions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7556 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 01:04:59 +00:00
Chris Lattner
d587a84197 Remove illegal, unsupported escapes. This fixes program: Ptrdist-bc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7552 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 23:42:17 +00:00
Chris Lattner
e012132028 * 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7551 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 23:37:09 +00:00
Chris Lattner
7af9a38d0f Specify custom name for registers to get the ()'s in the name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7547 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 22:12:47 +00:00
Chris Lattner
76bf868ff3 Allow specifying custom names for registers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7546 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 22:12:37 +00:00
Chris Lattner
8d44ba8c5c Start using tablegen'd instruction enum list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7542 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 21:57:05 +00:00
Chris Lattner
113455be9d Resort tables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7541 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 21:56:36 +00:00
Chris Lattner
4d18d5ce1e Lump the base opcode in with the X86 TargetSpecific flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7540 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 21:56:22 +00:00
Chris Lattner
abf05b2dae * 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...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7539 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 21:55:55 +00:00
Chris Lattner
c01f39307e Start using tablegenerated instruction descriptions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7538 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 21:54:59 +00:00
Chris Lattner
1cca5e3a29 Add new TableGen instruction definitions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7537 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 21:54:21 +00:00
Chris Lattner
5302e28adb Remove the old .def file, it is now obsolete
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7536 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 21:54:06 +00:00
Chris Lattner
34a2068cb2 Rearrange fields yet again: Don't instantiate these lists ONCE PER INSTRUCTION.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7535 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 21:52:28 +00:00
Chris Lattner
e109de3166 Simplify code, eliminating the need for the X86 isVoid target instr flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7534 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 21:51:45 +00:00
Chris Lattner
4cc662b0ef Set debug types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7533 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 21:47:31 +00:00
Chris Lattner
cb53358778 Set debug types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7532 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 21:14:38 +00:00
Chris Lattner
925b771dc3 Remove using decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7531 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 20:24:29 +00:00
Chris Lattner
b77eb78afc Add Target class for X86 target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7523 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 18:19:37 +00:00
Chris Lattner
9eab316528 The RegisterInfo class is obsolete
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7522 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 18:18:48 +00:00
Chris Lattner
a5100d91ef Remove the RegisterInfo class in favor of a general Target class. Add instrinfo stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7521 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 18:18:31 +00:00
Chris Lattner
a67697867d Tell CVS to ignore all .inc files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7513 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 15:50:17 +00:00
Chris Lattner
832003578e Switch over to tablegen generated header files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7512 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 15:48:55 +00:00
Chris Lattner
7ad3e063f5 Switch over to TableGen generated register file description
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7511 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 15:48:14 +00:00
Chris Lattner
762fb5f704 Initial checkin of X86.td file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7510 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 15:47:49 +00:00
Chris Lattner
b76d6fc4d5 Initial checkin of X86 Register File description
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7509 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 15:47:25 +00:00
Chris Lattner
09ce077a2d Fix typeos in comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7505 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 13:50:14 +00:00
Chris Lattner
b889b693e4 Make it easier to debug by exposing a temporary
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7504 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 13:49:25 +00:00
Chris Lattner
d3fd79f699 Wrap at 80 columns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7503 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 13:49:03 +00:00
Chris Lattner
be84e3c87e Rename fields
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7498 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 22:21:49 +00:00
Chris Lattner
a11136b16c Move DEBUG to Debug.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7497 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 22:21:34 +00:00
Chris Lattner
556d89de58 DEBUG got moved to Debug.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7495 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 22:19:03 +00:00
Chris Lattner
038e05a917 Move debug functionality to Debug.cpp/Debug.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7494 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 22:15:41 +00:00
Chris Lattner
96a54db5e7 Describe the value name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7493 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 22:15:15 +00:00
Chris Lattner
6806f5614d DEBUG got moved to Support/Debug.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7492 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 22:15:03 +00:00
Chris Lattner
c648dabf65 DEBUG got moved to Debug.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7491 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 22:13:59 +00:00
Chris Lattner
7a6ff2b98e Check in the implementation of the FileUtilities!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7487 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 21:16:14 +00:00
Chris Lattner
02f7fa482a Remove makefile complexity by always running tablegen with its final output
directory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7485 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 20:34:56 +00:00
Chris Lattner
794a58ed19 Use the C++, more portable, deleter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7483 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 20:29:18 +00:00
Chris Lattner
fafac12dcd Move #include from a header to here
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7480 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 19:16:29 +00:00
Vikram S. Adve
72666e6c30 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7476 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 15:55:53 +00:00
Vikram S. Adve
97e02ebd86 *Both* operands of divide need sign-extension before divide (if smaller
than machine register size), not just the second operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7475 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 15:54:38 +00:00
Vikram S. Adve
248932b08a 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7474 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 15:53:24 +00:00
Chris Lattner
de04dd746f encode size information into each ValueType
Add new RegisterInfo class


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7469 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 05:18:03 +00:00
Chris Lattner
7296fb0421 This method is long dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7460 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 03:48:42 +00:00
Chris Lattner
71336a9c14 Fix the JIT in the Nightly tester. This was not a fun bug to track down.
See the comments in the patch for details.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7457 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-31 19:38:34 +00:00
Chris Lattner
396aecd032 Trivial cleanups: no need to include header twice. Global variable is local to file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7456 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-31 19:31:21 +00:00
Chris Lattner
b08f3dfe50 Remove more obsolete comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7455 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-31 17:56:05 +00:00
Misha Brukman
f31dc9841c Changed pointer to the JIT code to its current location, under LLI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7454 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-31 17:50:35 +00:00
Chris Lattner
f6b7ff92d6 Unbreak the CBE output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7453 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-31 17:47:24 +00:00
Brian Gaeke
002a50ac64 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7452 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-31 17:38:52 +00:00
John Criswell
506dad0664 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7449 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-31 15:11:08 +00:00
Tanya Lattner
ec127bb352 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7447 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-31 05:06:09 +00:00
Tanya Lattner
741bb0019d Added function to determine if an Instruction may trap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7442 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-31 04:05:50 +00:00
Chris Lattner
0ad1361837 Add comments
Make the register classes optionally take code fragments for allocation_order_*


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7441 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 22:16:41 +00:00
Chris Lattner
942e7230e5 We no longer need to preprocess SparcV9.td before sending it through tablegen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7437 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 21:00:37 +00:00
Chris Lattner
61972242f3 Fix a bug that brian reported
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7428 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 19:04:37 +00:00
Chris Lattner
9cf3d47702 Add support for "named positional arguments"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7421 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 17:34:02 +00:00
Vikram S. Adve
db68577691 When emitting a constant, check for ConstantExpr before
ordinary (primitive) types since ConstantExprs may be of primitive type!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7418 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 12:54:47 +00:00
Chris Lattner
7a3dd8651f Conform to the new interface for describing target registers... even though
it's currently not used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7416 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 05:51:34 +00:00
Chris Lattner
7c28952e7a Add all of the necessary classes to describe the contents of the MRegister.h implementation
for a target.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7415 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 05:50:12 +00:00
Chris Lattner
b4d3f46ba2 Only regenerate the .inc file if IT has changed, not just if the .td files
have changed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7414 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 05:49:17 +00:00
Chris Lattner
7db1fa9802 Use target specific interface instead of forcing it to be target-generic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7413 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 05:33:48 +00:00
Chris Lattner
ee6b5f69bd No this file is not actually Sparc.td :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7405 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 23:07:13 +00:00
Chris Lattner
dbc1ab88ae Do not use 'cpp' directly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7404 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 23:04:41 +00:00
Chris Lattner
84c40c1dce Add namespace specifier, add flags used by the X86 BE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7403 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 23:02:49 +00:00
Misha Brukman
92aa8ca9c5 * Cleaned up and corrected comments wrt instruction formats
* Enabled STXFSR instructions


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7400 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 21:21:20 +00:00
Misha Brukman
a21b8e8213 Make emitFarCall() public, and add a few comments to functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7399 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 20:52:56 +00:00
Vikram S. Adve
e6124d3b7c Unify all constant evaluations that depend on register size
in ConvertConstantToIntType.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7395 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:59:23 +00:00
Vikram S. Adve
deb9634f0e Rename 'dump-asm' to 'dump-input' and really print it just before code-gen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7394 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:58:00 +00:00
Vikram S. Adve
00477cf26d Bug fix: don't unnecessarily pretty-print control-characters, some of
which were wrong (particularly, '\a' for '\007').


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7393 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:57:34 +00:00
Vikram S. Adve
ada280faa9 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7392 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:54:41 +00:00
Vikram S. Adve
83d30c89e5 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7391 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:53:21 +00:00
Vikram S. Adve
b5161b60c2 All constant-evaluation code now unified into
TargetInstrInfo::ConvertConstantToIntType().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7390 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:50:12 +00:00
Vikram S. Adve
814030a0c5 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7389 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:49:21 +00:00
Vikram S. Adve
7a81a0fd13 Don't require a BB to look-up live variables, unless they may need to
be recomputed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7388 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:42:32 +00:00
Vikram S. Adve
b403b2c019 Add const version of getLiveRangeForValue().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7386 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:38:22 +00:00
Vikram S. Adve
102f295114 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7385 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:37:41 +00:00
Misha Brukman
a1f1fea105 * 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'


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7382 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:00:58 +00:00
Misha Brukman
89e8be00c5 * 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7381 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 16:57:16 +00:00
Chris Lattner
c8c377d111 Move "register flags" definition the type of registers to be fully fledged
value types


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7377 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 05:14:16 +00:00
Chris Lattner
2418b117ba Add support for Alpha intrinsics, contributed by Rahul Joshi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7373 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-28 21:20:57 +00:00
Misha Brukman
fd31a78124 Add rationale for the MAP_ANONYMOUS vs. MAP_ANON flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7368 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-28 19:26:19 +00:00
Misha Brukman
3ce4ac62a0 The RTLD_GLOBAL flag allows symbols to be globally accessible, which makes
resolution of symbols in the .so possible (currently assists debugging with
bugpoint).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7366 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-28 19:19:58 +00:00
Misha Brukman
d69c1e6dc2 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7363 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-28 19:09:06 +00:00
Misha Brukman
d94a50f99d Clean up code dealing with RTLD_SELF differences on Sparc and X86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7362 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-28 19:07:30 +00:00
Misha Brukman
df38dae949 Fix reference to architecture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7361 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-28 19:06:50 +00:00
Misha Brukman
248ea32cc9 Add in support to load shared objects (-load is provided by Support library).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7360 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-28 19:06:19 +00:00
Chris Lattner
38b8979da1 Specify the value type for the register, not just the size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7357 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-28 04:25:36 +00:00
Chris Lattner
b3aa319401 Instead of specifying the SIZE of the register, go so far as to specify
what value type it is.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7356 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-28 04:24:59 +00:00
Chris Lattner
d281de2181 Rename function to be more consistent with filename
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7352 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:49:58 +00:00
Chris Lattner
8d3f8e226d Making this code const-correct would be a pain, so I'll hack it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7350 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:29:51 +00:00
Chris Lattner
9e2dd8f8d7 Const correctness fixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7349 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:24:56 +00:00
Chris Lattner
9cdaa63f57 Be const correct
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7348 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:23:41 +00:00
Chris Lattner
e5a61ccdc5 Hrm, another necesary one :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7347 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:22:19 +00:00
Chris Lattner
dee1263c7c We don't modify the LLVM rep, remain const correct
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7345 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:06:00 +00:00
Chris Lattner
2a865b015b If the pass changes _anything_ it must return true
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7344 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:05:37 +00:00
Chris Lattner
6856d11231 This code doesn't modify the LLVM structure, keep stuff const
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7343 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:04:00 +00:00
Chris Lattner
1d598fa25a Remove #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7342 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:01:04 +00:00
Chris Lattner
bae47e5691 Remove extraneous #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7341 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:00:29 +00:00
Chris Lattner
1f2bbaa9cb Fix another minor bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7340 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:00:05 +00:00
Vikram S. Adve
7dc7de5391 (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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7334 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 21:12:15 +00:00
Vikram S. Adve
e9a567cc77 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7330 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 21:08:58 +00:00
Vikram S. Adve
bc001b24a1 (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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7329 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 21:06:09 +00:00
Vikram S. Adve
34a856749f 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7327 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 21:00:13 +00:00
Chris Lattner
e7e221ad24 Dont' try to parse the colon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7323 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 20:49:29 +00:00
Chris Lattner
f2d0134118 Add a more general check-flags which can be used to ensure arbitrary flags are set
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7322 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 20:45:40 +00:00
Brian Gaeke
6b902dcd5d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7321 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 20:21:20 +00:00
Brian Gaeke
49a178b9fd Don't include llvm/SlotCalculator.h, or <set>.
Move up the inclusion of llvm/Support/Mangler.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7320 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 20:21:06 +00:00
Brian Gaeke
4166445b7c 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>.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7301 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-24 21:37:57 +00:00
Brian Gaeke
b198ca304b Factor out name-mangling from X86/Printer, which is derived from CWriter,
into this new support class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7300 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-24 20:20:58 +00:00
Brian Gaeke
d9fb37ac98 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.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7299 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-24 20:20:44 +00:00
Chris Lattner
943c713c65 Instcombine: (A >> c1) << c2 for signed integers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7295 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-24 18:38:56 +00:00
Chris Lattner
08fd7abb42 Reorganization of code, no functional changes.
Now it shoudl be a bit more efficient


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7292 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-24 17:52:58 +00:00
Brian Gaeke
3d8d9f7e72 It doesn't appear that we need to #include these.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7291 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-24 17:48:53 +00:00
Chris Lattner
24c8e38455 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7290 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-24 17:35:25 +00:00
Chris Lattner
8baa92ef0b Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7289 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-24 17:31:56 +00:00
Brian Gaeke
b3011a01b5 Constify most methods. We could have constified doInitialization and
doFinalization too except that would have made them shadow, not override,
the parent class :-P.

Allow *any* constant cast expression between pointers and longs,
or vice-versa, or any widening (not just same-size) conversion that
isLosslesslyConvertibleTo approves. This fixes oopack.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7288 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-24 17:30:45 +00:00
Chris Lattner
1078d11854 Fix bug: FunctionResolve/2003-07-23-CPR-Reference.ll
This fixes a long time annoyance which caused prototypes for bzero, bcopy,
bcmp, fputs, and fputs_unlocked to never get deleted.  Grr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7285 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 22:03:18 +00:00
Chris Lattner
2cd9196e87 Add comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7283 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 21:41:57 +00:00
Chris Lattner
eca0c5c379 Remove explicit check for: not (not X) = X, it is already handled because xor is commutative
- InstCombine: (X & C1) ^ C2 --> (X & C1) | C2 iff (C1&C2) == 0
  - InstCombine: (X | C1) ^ C2 --> (X | C1) & ~C2 iff (C1&C2) == C2


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7282 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 21:37:07 +00:00
Chris Lattner
d4e8d31e40 Fix program: SingleSource/UnitTests/2003-07-09-SignedArgs with the CBE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7276 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 20:45:31 +00:00
Brian Gaeke
de420aee32 Printer.cpp: Ditch addRequired/getAnalysis, because they leave
Printer::doFinalization() out in the cold.  Now we pass in a TargetMachine
  to Printer's constructor and get the TargetData from the TargetMachine.
 Don't pass TargetMachine or MRegisterInfo objects around in the Printer.
 Constify TargetData references.
X86.h: Update comment and prototype of createX86CodePrinterPass().
X86TargetMachine.cpp: Update callers of createX86CodePrinterPass().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7275 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 20:25:08 +00:00
Chris Lattner
b6ede8aaa0 Make Module::getNamedFunction prefer non-external functions if there is more than
one function of the same name


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7274 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 20:21:30 +00:00
Chris Lattner
a84983ea72 Fix space
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7273 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 20:21:06 +00:00
Chris Lattner
06782f804f InstCombine: (X ^ C1) & C2 --> (X & C2) iff (C1&C2) == 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7272 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 19:36:21 +00:00
Chris Lattner
5840326ae6 - InstCombine: (X | C1) & C2 --> X & C2 iff C1 & C1 == 0
- InstCombine: (X | C) & C --> C
  - InstCombine: (X | C1) & C2 --> (X | (C1&C2)) & C2


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7269 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 19:25:52 +00:00
Brian Gaeke
92bdfe6951 Add, rewrite, and/or reformat many comments.
Stop passing ostreams around: we already have one perfectly good ostream
and we can all share it.

Stop stashing a pointer to TargetData in the Pass object, because that will
lead to a crash if there are no functions in the module (ouch!)  Instead,
use addRequired() and getAnalysis(), like we always should have done.

Move the check for ConstantExpr up before the check for isPrimitiveType,
because we need to be able to catch e.g. ubyte (cast bool false to ubyte),
whose type is primitive but which is nevertheless a ConstantExpr, by calling
our specialized handler instead of the AsmWriter. This would result in
assembler errors when we would try to output something like ".byte (cast
bool false to ubyte)".

GC some unused variable declarations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7265 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 18:37:06 +00:00
Chris Lattner
ad44ebfff0 IC: (X & C1) | C2 --> (X | C2) & (C1|C2)
IC: (X ^ C1) | C2 --> (X | C2) ^ (C1&~C2)

We are now guaranteed that all 'or's will be inside of 'and's, and all 'and's
will be inside of 'xor's, if the second operands are constants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7264 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 18:29:44 +00:00
Chris Lattner
c6a8aff3f6 IC: (X ^ C1) & C2 --> (X & C2) ^ (C1&C2)
Minor code cleanup


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7262 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 17:57:01 +00:00
Chris Lattner
00b1a7e23e InstCombine: (X ^ 4) == 8 --> X == 12
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7260 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 17:26:36 +00:00
Chris Lattner
30780ccf15 Add support for ~ operator on constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7258 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 17:21:17 +00:00
Chris Lattner
bc5d414823 IC: (X & 5) == 13 --> false
IC: (X | 8) == 4  --> false


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7257 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 17:02:11 +00:00
Chris Lattner
832688a6d2 Remove redundant const qualifier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7254 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 15:30:32 +00:00
Chris Lattner
949a362802 Remove redundant const qualifiers from cast<> expressions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7253 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 15:30:06 +00:00
Chris Lattner
c07736a397 Simplify code by using ConstantInt::getRawValue instead of checking to see
whether the constant is signed or unsigned, then casting


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7252 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 15:22:26 +00:00
Chris Lattner
c8bf87af3e Remove unnecessary casts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7250 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 15:17:51 +00:00
Chris Lattner
bfcdf14d83 Fit code into 80 columns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7249 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 15:17:01 +00:00
Chris Lattner
28a128e37a Eliminate old-style cast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7248 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 15:16:40 +00:00
Chris Lattner
9daa8a12d3 Random cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7247 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 14:59:40 +00:00
Chris Lattner
1815383276 Remove using decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7246 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 14:55:59 +00:00
Chris Lattner
987cb2c3da Remove explicit const qualifiers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7245 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 14:54:33 +00:00
Chris Lattner
00f185fbfd Fix bug: TailDup/2003-07-22-InfiniteLoop.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7243 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 03:32:41 +00:00
Chris Lattner
1ba5bcd1ae - InstCombine (cast (xor A, B) to bool) ==> (setne A, B)
- InstCombine (cast (and X, (1 << size(X)-1)) to bool) ==> x < 0


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7241 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-22 21:46:59 +00:00
Vikram S. Adve
40c600e8f3 Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7227 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-22 12:08:58 +00:00
Chris Lattner
43234493de Simplify code a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7217 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-21 19:56:49 +00:00
John Criswell
067947380c Added code that checks to see if a global variable is external before replacing
a load of the global variable with the variable's constant value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7216 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-21 19:42:57 +00:00
Misha Brukman
8f9f9a2901 Eliminated dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7209 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-21 16:34:35 +00:00
Anand Shukla
6da69e75ec Added special consideration for instrumentation strategy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7208 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-20 15:39:30 +00:00
Anand Shukla
a235e14eaf Added check for inlinable function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7206 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-18 20:55:26 +00:00