Chris Lattner [Sat, 29 Jan 2005 00:33:00 +0000 (00:33 +0000)]
Adjust to changes in the User class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19888
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:32:51 +0000 (00:32 +0000)]
Adjust to changes in the User class. Introduce a new UnaryInstruction
class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19887
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:32:00 +0000 (00:32 +0000)]
Adjust to user changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19886
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:31:36 +0000 (00:31 +0000)]
Many changes to cope with the User.h changes. Instructions now generally
directly embed their operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19885
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:30:52 +0000 (00:30 +0000)]
Adjust to User.h changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19884
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Jan 2005 00:29:39 +0000 (00:29 +0000)]
Instead of storing operands as std::vector<Use>, just maintain a pointer
and num operands in the User class. this allows us to embed the operands
directly in the subclasses if possible. For example, for binary operators
we store the two operands in the derived class.
The has several effects:
1. it improves locality because the operands and instruction are together
2. it makes accesses to operands faster (one less load) if you access them
through the derived class pointer. For example this:
Value *GetBinaryOperatorOp(BinaryOperator *I, int i) {
return I->getOperand(i);
}
Was compiled to:
_Z19GetBinaryOperatorOpPN4llvm14BinaryOperatorEi:
movl 4(%esp), %edx
movl 8(%esp), %eax
sall $4, %eax
movl 24(%edx), %ecx
addl %ecx, %eax
movl (%eax), %eax
ret
and is now compiled to:
_Z19GetBinaryOperatorOpPN4llvm14BinaryOperatorEi:
movl 8(%esp), %eax
movl 4(%esp), %edx
sall $4, %eax
addl %edx, %eax
movl 44(%eax), %eax
ret
Accesses through "Instruction*" are unmodified.
3. This reduces memory consumption (by about 3%) by eliminating 1 word of
vector overhead and a malloc header on a seperate object.
4. This speeds up gccas about 10% (both debug and release builds) on
large things (such as 176.gcc). For example, it takes a debug build
from 172.9 -> 155.6s and a release gccas from 67.7 -> 61.8s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19883
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 28 Jan 2005 23:17:54 +0000 (23:17 +0000)]
fix ExprMap, partially teach about add long
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19882
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 23:17:27 +0000 (23:17 +0000)]
Fix a nasty thinko in my previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19881
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 22:58:25 +0000 (22:58 +0000)]
Alpha doesn't have a native f32 extload instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19880
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 22:52:50 +0000 (22:52 +0000)]
implement legalization of truncates whose results and sources need to be
truncated, e.g. (truncate:i8 something:i16) on a 32 or 64-bit RISC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19879
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 22:29:18 +0000 (22:29 +0000)]
Get alpha working with memset/memcpy/memmove
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19878
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Fri, 28 Jan 2005 19:52:32 +0000 (19:52 +0000)]
Fix some typos in the Makefile.rules.
Patch contributed by Vladimer Merzliakov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19877
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 19:37:35 +0000 (19:37 +0000)]
Hrm, who knows what 'uint' is, but it seems to work sometimes? Wierd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19876
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 19:32:01 +0000 (19:32 +0000)]
* add some DEBUG statements
* Properly compile this:
struct a {};
int test() {
struct a b[2];
if (&b[0] != &b[1])
abort ();
return 0;
}
to 'return 0', not abort().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19875
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 19:09:51 +0000 (19:09 +0000)]
Fix ConstProp/2005-01-28-SetCCGEP.ll: indexing over zero sized elements does
not change the address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19874
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 19:08:32 +0000 (19:08 +0000)]
New testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19873
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 17:22:53 +0000 (17:22 +0000)]
Add some initial documentation for the SelectionDAG based instruction selectors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19872
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 16:08:23 +0000 (16:08 +0000)]
Do not clean up if the MappedFile was never used or if the client already
closed the file. This unbreaks the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19871
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 28 Jan 2005 14:06:46 +0000 (14:06 +0000)]
fix ExprMap and constant check in setcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19870
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Fri, 28 Jan 2005 07:29:32 +0000 (07:29 +0000)]
Get VC++ compiling again
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19869
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Fri, 28 Jan 2005 07:22:20 +0000 (07:22 +0000)]
Convert some old C-style casts to C++ style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19868
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 28 Jan 2005 06:57:18 +0000 (06:57 +0000)]
move FP into it's own select
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19867
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 06:27:38 +0000 (06:27 +0000)]
CopyFromReg produces two values. Make sure that we remember that both are
legalized, and actually return the correct result when we legalize the chain first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19866
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 06:13:52 +0000 (06:13 +0000)]
These passes are no more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19865
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Jan 2005 06:12:46 +0000 (06:12 +0000)]
Remove this code as it is currently completely broken and unmaintained.
If needed, this can be resurrected from CVS.
Note that several of the interfaces (e.g. the IPModRef ones) are supersumed
by generic AliasAnalysis interfaces that have been written since this code
was developed (and they are not DSA specific).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19864
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Fri, 28 Jan 2005 01:17:07 +0000 (01:17 +0000)]
Properly close mapped files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19863
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Thu, 27 Jan 2005 17:59:51 +0000 (17:59 +0000)]
Mark -parallel pass as `experimental'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19858
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Thu, 27 Jan 2005 08:31:19 +0000 (08:31 +0000)]
stack frame fix and zero FP reg fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19857
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Thu, 27 Jan 2005 07:58:15 +0000 (07:58 +0000)]
Floating point instructions like Floating point registers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19856
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Thu, 27 Jan 2005 07:50:35 +0000 (07:50 +0000)]
int to float conversion and another setcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19855
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Thu, 27 Jan 2005 06:46:38 +0000 (06:46 +0000)]
Fix grammar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19854
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Thu, 27 Jan 2005 03:49:45 +0000 (03:49 +0000)]
teach isel about comparison with constants and zero extending bits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19853
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Thu, 27 Jan 2005 03:49:03 +0000 (03:49 +0000)]
Fix some Path bugs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19852
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Thu, 27 Jan 2005 01:22:48 +0000 (01:22 +0000)]
perhaps this will let me have calls again
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19851
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Thu, 27 Jan 2005 00:52:26 +0000 (00:52 +0000)]
minor bug fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19850
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Thu, 27 Jan 2005 00:51:05 +0000 (00:51 +0000)]
minor bug fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19849
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Wed, 26 Jan 2005 23:56:48 +0000 (23:56 +0000)]
added instructions for fp to int to fp moves
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19848
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Wed, 26 Jan 2005 21:54:09 +0000 (21:54 +0000)]
initial fp support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19847
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 26 Jan 2005 07:09:44 +0000 (07:09 +0000)]
xfail this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19846
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 26 Jan 2005 07:08:42 +0000 (07:08 +0000)]
XFAIL this for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19845
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Wed, 26 Jan 2005 02:53:56 +0000 (02:53 +0000)]
hum, writing on one machine, testing on another...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19844
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Wed, 26 Jan 2005 01:24:38 +0000 (01:24 +0000)]
add some operations, fix others. should compile several more tests now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19843
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 25 Jan 2005 20:35:10 +0000 (20:35 +0000)]
We can fold promoted and non-promoted loads into divs also!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19835
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 25 Jan 2005 20:03:11 +0000 (20:03 +0000)]
Fold promoted loads into binary ops for FP, allowing us to generate m32 forms
of FP ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19834
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Tue, 25 Jan 2005 19:58:40 +0000 (19:58 +0000)]
problems with bools, and their work arounds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19833
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Tue, 25 Jan 2005 16:23:57 +0000 (16:23 +0000)]
Add a dependency to the trace library so that it gets pulled in
automatically.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19828
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Tue, 25 Jan 2005 05:04:49 +0000 (05:04 +0000)]
Document the --load option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19822
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Tue, 25 Jan 2005 00:35:34 +0000 (00:35 +0000)]
more load choices, better add with imm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19821
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 24 Jan 2005 20:00:14 +0000 (20:00 +0000)]
Make -ds-aa more useful, allowing it to be updated as xforms hack on the program.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19818
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 24 Jan 2005 19:55:34 +0000 (19:55 +0000)]
Add some methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19817
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Mon, 24 Jan 2005 19:44:07 +0000 (19:44 +0000)]
Clean ups, and taught the instruction selector about immediate forms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19816
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Mon, 24 Jan 2005 18:48:22 +0000 (18:48 +0000)]
Alpha JIT prune
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19815
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Mon, 24 Jan 2005 18:45:41 +0000 (18:45 +0000)]
include prune and JIT prune
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19814
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Mon, 24 Jan 2005 18:37:48 +0000 (18:37 +0000)]
Pruned includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19813
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Mon, 24 Jan 2005 17:33:52 +0000 (17:33 +0000)]
let configure recognize Alphas
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19811
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Mon, 24 Jan 2005 17:25:41 +0000 (17:25 +0000)]
let configure recognize Alphas
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19810
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 24 Jan 2005 16:29:24 +0000 (16:29 +0000)]
Mark CVS versions different from releases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19809
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 24 Jan 2005 16:28:03 +0000 (16:28 +0000)]
`primitive' has no `a'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19808
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 24 Jan 2005 16:00:52 +0000 (16:00 +0000)]
Do not return true from isSized for things without a size (like functions and
labels) even though they are concrete. This fixes the DSA regressions from
last night.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19807
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 24 Jan 2005 02:08:34 +0000 (02:08 +0000)]
This giant patch speeds up Type::isSized(). Before, this would have to search
large nested types over and over again to determine if they are sized or not.
Now, isSized() is able to make snap decisions about all concrete types, which
are a common occurance (and includes all primitives).
On 177.mesa, this speeds up DSE from 39.5s -> 21.3s and GCSE from
13.2s -> 11.3s, reducing gccas time from 80s -> 61s (this is a debug build).
DSE and GCSE are still too slow on this testcase, but this is a simple
improvement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19800
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 24 Jan 2005 01:40:18 +0000 (01:40 +0000)]
Fix a spurious warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19799
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 23:20:06 +0000 (23:20 +0000)]
Silence a warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19798
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 23:19:44 +0000 (23:19 +0000)]
Silence optimized warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19797
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 23:13:59 +0000 (23:13 +0000)]
Allow the FP stackifier to completely ignore functions that do not use FP at
all. This should speed up the X86 backend fairly significantly on integer
codes. Now if only we didn't have to compute livevar still... ;-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19796
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 23:13:12 +0000 (23:13 +0000)]
Simplify/speedup the PEI by not having to scan for uses of the callee saved
registers. This information is computed directly by the register allocator
now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19795
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 22:57:27 +0000 (22:57 +0000)]
Add an accessor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19794
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 22:55:45 +0000 (22:55 +0000)]
Update physregsused info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19793
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 22:51:56 +0000 (22:51 +0000)]
Update this pass to set PhysRegsUsed info in MachineFunction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19792
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 22:45:13 +0000 (22:45 +0000)]
Update these register allocators to set the PhysRegUsed info in MachineFunction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19791
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 22:13:58 +0000 (22:13 +0000)]
Add support for the PhysRegsUsed array.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19789
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 22:13:36 +0000 (22:13 +0000)]
Expose more information from register allocation to passes that run after
it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19788
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 21:45:01 +0000 (21:45 +0000)]
Speed this up a bit by making ModifiedRegs a vector<char> not vector<bool>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19787
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 20:26:55 +0000 (20:26 +0000)]
Get rid of a several dozen more and instructions in specint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19786
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 06:02:40 +0000 (06:02 +0000)]
Fix crash comparing empty file against nonempty file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19782
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 04:42:50 +0000 (04:42 +0000)]
Adjust to changes in SelectionDAG interfaces
The first half of correct chain insertion for libcalls. This is not enough
to fix Fhourstones yet though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19781
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 04:39:44 +0000 (04:39 +0000)]
Remove the 3 HACK HACK HACKs I put in before, fixing them properly with
the new TLI that is available.
Implement support for handling out of range shifts. This allows us to
compile this code (a 64-bit rotate):
unsigned long long f3(unsigned long long x) {
return (x << 32) | (x >> (64-32));
}
into this:
f3:
mov %EDX, DWORD PTR [%ESP + 4]
mov %EAX, DWORD PTR [%ESP + 8]
ret
GCC produces this:
$ gcc t.c -masm=intel -O3 -S -o - -fomit-frame-pointer
..
f3:
push %ebx
mov %ebx, DWORD PTR [%esp+12]
mov %ecx, DWORD PTR [%esp+8]
mov %eax, %ebx
mov %edx, %ecx
pop %ebx
ret
The Simple ISEL produces (eww gross):
f3:
sub %ESP, 4
mov DWORD PTR [%ESP], %ESI
mov %EDX, DWORD PTR [%ESP + 8]
mov %ECX, DWORD PTR [%ESP + 12]
mov %EAX, 0
mov %ESI, 0
or %EAX, %ECX
or %EDX, %ESI
mov %ESI, DWORD PTR [%ESP]
add %ESP, 4
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19780
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 04:36:26 +0000 (04:36 +0000)]
Adjust to changes in SelectionDAG interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19779
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 04:36:06 +0000 (04:36 +0000)]
Give SelectionDAG a TargetLowering instance instead of TM instance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19778
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 04:34:46 +0000 (04:34 +0000)]
Build Alpha by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19777
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 23 Jan 2005 04:32:47 +0000 (04:32 +0000)]
Fix alloca support for Cygwin. On cygwin its __alloca not __builtin_alloca
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19776
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 23 Jan 2005 03:52:14 +0000 (03:52 +0000)]
Support Cygwin assembly generation. The cygwin version of Gnu ASsembler
doesn't support certain directives and symbols on cygwin are prefixed with
an underscore. This patch makes the necessary adjustments to the output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19775
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 03:45:26 +0000 (03:45 +0000)]
Add support for fp tolerances
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19774
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 03:32:16 +0000 (03:32 +0000)]
This method takes sys::Path objects now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19773
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 03:31:39 +0000 (03:31 +0000)]
Adjust to changed interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19772
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 03:31:02 +0000 (03:31 +0000)]
Make DiffFilesWithTolerance take sys::Path's instead of std::strings
Delete dead functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19771
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 03:30:39 +0000 (03:30 +0000)]
Remove two dead methods and improve the comments for DiffFilesWithTolerance.
Also, make DiffFilesWithTolerance take sys::Path objects instead of std::strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19770
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 03:19:13 +0000 (03:19 +0000)]
Fix a bug in previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19769
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 03:16:56 +0000 (03:16 +0000)]
Drop dead #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19768
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 03:15:47 +0000 (03:15 +0000)]
The meat of this utility has been moved to FileUtilities, where it can be
used by other tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19767
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 03:13:43 +0000 (03:13 +0000)]
Add a new method, refactored out of fpcmp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19766
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 23 Jan 2005 03:11:38 +0000 (03:11 +0000)]
New method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19765
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Sat, 22 Jan 2005 23:41:55 +0000 (23:41 +0000)]
Let me introduce you to the early stages of the llvm backend for the alpha processor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19764
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 22 Jan 2005 23:04:37 +0000 (23:04 +0000)]
Get this to work for 64-bit systems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19763
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 22 Jan 2005 21:29:42 +0000 (21:29 +0000)]
We're working towards LLVM 1.5 now so bump the version number. This change
won't be propagated to the configure script until there's a need to change
configure.ac for some larger purpose.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19762
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 22 Jan 2005 20:59:38 +0000 (20:59 +0000)]
Minor fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19761
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 22 Jan 2005 20:31:17 +0000 (20:31 +0000)]
This is the final big of factoring. This shares cases in suboperand
differences, which means that identical instructions (after stripping off
the first literal string) do not run any different code at all. On the X86,
this turns this code:
switch (MI->getOpcode()) {
case X86::ADC32mi: printOperand(MI, 4, MVT::i32); break;
case X86::ADC32mi8: printOperand(MI, 4, MVT::i8); break;
case X86::ADC32mr: printOperand(MI, 4, MVT::i32); break;
case X86::ADD32mi: printOperand(MI, 4, MVT::i32); break;
case X86::ADD32mi8: printOperand(MI, 4, MVT::i8); break;
case X86::ADD32mr: printOperand(MI, 4, MVT::i32); break;
case X86::AND32mi: printOperand(MI, 4, MVT::i32); break;
case X86::AND32mi8: printOperand(MI, 4, MVT::i8); break;
case X86::AND32mr: printOperand(MI, 4, MVT::i32); break;
case X86::CMP32mi: printOperand(MI, 4, MVT::i32); break;
case X86::CMP32mr: printOperand(MI, 4, MVT::i32); break;
case X86::MOV32mi: printOperand(MI, 4, MVT::i32); break;
case X86::MOV32mr: printOperand(MI, 4, MVT::i32); break;
case X86::OR32mi: printOperand(MI, 4, MVT::i32); break;
case X86::OR32mi8: printOperand(MI, 4, MVT::i8); break;
case X86::OR32mr: printOperand(MI, 4, MVT::i32); break;
case X86::ROL32mi: printOperand(MI, 4, MVT::i8); break;
case X86::ROR32mi: printOperand(MI, 4, MVT::i8); break;
case X86::SAR32mi: printOperand(MI, 4, MVT::i8); break;
case X86::SBB32mi: printOperand(MI, 4, MVT::i32); break;
case X86::SBB32mi8: printOperand(MI, 4, MVT::i8); break;
case X86::SBB32mr: printOperand(MI, 4, MVT::i32); break;
case X86::SHL32mi: printOperand(MI, 4, MVT::i8); break;
case X86::SHLD32mrCL: printOperand(MI, 4, MVT::i32); break;
case X86::SHR32mi: printOperand(MI, 4, MVT::i8); break;
case X86::SHRD32mrCL: printOperand(MI, 4, MVT::i32); break;
case X86::SUB32mi: printOperand(MI, 4, MVT::i32); break;
case X86::SUB32mi8: printOperand(MI, 4, MVT::i8); break;
case X86::SUB32mr: printOperand(MI, 4, MVT::i32); break;
case X86::TEST32mi: printOperand(MI, 4, MVT::i32); break;
case X86::TEST32mr: printOperand(MI, 4, MVT::i32); break;
case X86::TEST8mi: printOperand(MI, 4, MVT::i8); break;
case X86::XCHG32mr: printOperand(MI, 4, MVT::i32); break;
case X86::XOR32mi: printOperand(MI, 4, MVT::i32); break;
case X86::XOR32mi8: printOperand(MI, 4, MVT::i8); break;
case X86::XOR32mr: printOperand(MI, 4, MVT::i32); break;
}
into this:
switch (MI->getOpcode()) {
case X86::ADC32mi:
case X86::ADC32mr:
case X86::ADD32mi:
case X86::ADD32mr:
case X86::AND32mi:
case X86::AND32mr:
case X86::CMP32mi:
case X86::CMP32mr:
case X86::MOV32mi:
case X86::MOV32mr:
case X86::OR32mi:
case X86::OR32mr:
case X86::SBB32mi:
case X86::SBB32mr:
case X86::SHLD32mrCL:
case X86::SHRD32mrCL:
case X86::SUB32mi:
case X86::SUB32mr:
case X86::TEST32mi:
case X86::TEST32mr:
case X86::XCHG32mr:
case X86::XOR32mi:
case X86::XOR32mr: printOperand(MI, 4, MVT::i32); break;
case X86::ADC32mi8:
case X86::ADD32mi8:
case X86::AND32mi8:
case X86::OR32mi8:
case X86::ROL32mi:
case X86::ROR32mi:
case X86::SAR32mi:
case X86::SBB32mi8:
case X86::SHL32mi:
case X86::SHR32mi:
case X86::SUB32mi8:
case X86::TEST8mi:
case X86::XOR32mi8: printOperand(MI, 4, MVT::i8); break;
}
After this, the generated asmwriters look pretty much as though they were
generated by hand. This shrinks the X86 asmwriter.inc files from 55101->39669
and 55429->39551 bytes each, and PPC from 16766->12859 bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19760
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 22 Jan 2005 19:22:23 +0000 (19:22 +0000)]
Implement *even more* factoring. In particular, if all of the instruction
strings starts out with a constant string, we emit the string first, using
a table lookup (instead of a switch statement).
Because this is usually the opcode portion of the asm string, the differences
between the instructions have now been greatly reduced. This allows many
more case statements to be grouped together.
This patch also allows instruction cases to be grouped together when the
instruction patterns are exactly identical (common after the opcode string
has been ripped off), and when the differing operand is a MachineInstr
operand that needs to be formatted.
The end result of this is a mean and lean generated AsmPrinter!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19759
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 22 Jan 2005 18:58:51 +0000 (18:58 +0000)]
Refactor code for numbering instructions into CodeGenTarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19758
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Sat, 22 Jan 2005 18:50:10 +0000 (18:50 +0000)]
Fix VC++ compilation error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19757
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 22 Jan 2005 18:45:35 +0000 (18:45 +0000)]
QOI feature implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19756
91177308-0d34-0410-b5e6-
96231b3b80d8