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
Chris Lattner [Sat, 22 Jan 2005 18:38:13 +0000 (18:38 +0000)]
Implement factoring of instruction pattern strings. In particular, instead of
emitting code like this:
case PPC::ADD: O << "add "; printOperand(MI, 0, MVT::i64); O << ", "; prin
tOperand(MI, 1, MVT::i64); O << ", "; printOperand(MI, 2, MVT::i64); O << '\n
'; break;
case PPC::ADDC: O << "addc "; printOperand(MI, 0, MVT::i64); O << ", "; pr
intOperand(MI, 1, MVT::i64); O << ", "; printOperand(MI, 2, MVT::i64); O << '
\n'; break;
case PPC::ADDE: O << "adde "; printOperand(MI, 0, MVT::i64); O << ", "; pr
intOperand(MI, 1, MVT::i64); O << ", "; printOperand(MI, 2, MVT::i64); O << '
\n'; break;
...
Emit code like this:
case PPC::ADD:
case PPC::ADDC:
case PPC::ADDE:
...
switch (MI->getOpcode()) {
case PPC::ADD: O << "add "; break;
case PPC::ADDC: O << "addc "; break;
case PPC::ADDE: O << "adde "; break;
...
}
printOperand(MI, 0, MVT::i64);
O << ", ";
printOperand(MI, 1, MVT::i64);
O << ", ";
printOperand(MI, 2, MVT::i64);
O << "\n";
break;
This shrinks the PPC asm writer from 24785->15205 bytes (even though the new
asmwriter has much more whitespace than the old one), and the X86 printers shrink
quite a bit too. The important implication of this is that GCC no longer hits swap
when building the PPC backend in optimized mode. Thus this fixes PR448.
-Chris
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19755
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 22 Jan 2005 18:18:59 +0000 (18:18 +0000)]
Fix the ::: problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19754
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 22 Jan 2005 17:40:38 +0000 (17:40 +0000)]
Minor refactoring, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19753
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Sat, 22 Jan 2005 17:37:13 +0000 (17:37 +0000)]
oops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19752
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Sat, 22 Jan 2005 17:36:17 +0000 (17:36 +0000)]
Use binary mode for reading/writing bytecode files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19751
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Sat, 22 Jan 2005 17:35:30 +0000 (17:35 +0000)]
Add (non-working) project bugpoint to Visual Studio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19750
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 22 Jan 2005 17:32:42 +0000 (17:32 +0000)]
Seperate asmstring parsing from emission. This allows the code to be simpler
and more understandable. It also allows us to do simple things like fold
consequtive literal strings together. For example, instead of emitting this
for the X86 backend:
O << "adc" << "l" << " ";
we now generate this:
O << "adcl ";
*whoa* :)
This shrinks the X86 asmwriters from 62729->58267 and 65176->58644 bytes
for the intel/att asm writers respectively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19749
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Sat, 22 Jan 2005 16:32:47 +0000 (16:32 +0000)]
Don't exclude FileUtilies and ToolRunner from VC++ build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19748
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Sat, 22 Jan 2005 16:30:58 +0000 (16:30 +0000)]
Fix VC++ complaint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19747
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Sat, 22 Jan 2005 16:28:33 +0000 (16:28 +0000)]
Fix destroyDirectory bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19746
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 22 Jan 2005 00:49:16 +0000 (00:49 +0000)]
Implicitly defined registers can clobber callee saved registers too!
This fixes the return-address-not-being-saved problem in the Alpha backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19741
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Sat, 22 Jan 2005 00:35:22 +0000 (00:35 +0000)]
make double-dollar properly escape asmstrings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19740
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 22 Jan 2005 00:33:03 +0000 (00:33 +0000)]
More bugfixes for IA64 shifts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19739
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 22 Jan 2005 00:31:52 +0000 (00:31 +0000)]
Fix problems with non-x86 targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19738
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 22 Jan 2005 00:20:42 +0000 (00:20 +0000)]
Add a nasty hack to fix Alpha/IA64 multiplies by a power of two.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19737
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 21 Jan 2005 23:43:12 +0000 (23:43 +0000)]
Remove unneeded line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19736
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 21 Jan 2005 23:38:56 +0000 (23:38 +0000)]
test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19735
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 21 Jan 2005 23:06:49 +0000 (23:06 +0000)]
Handle comparisons of gep instructions that have different typed indices
as long as they are the same size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19734
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 21 Jan 2005 21:43:02 +0000 (21:43 +0000)]
Speed up folding operations into loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19733
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 21 Jan 2005 21:39:38 +0000 (21:39 +0000)]
Keep track of node depth for each node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19732
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 21 Jan 2005 21:35:14 +0000 (21:35 +0000)]
The ever-important vanity pass name :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19731
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 21 Jan 2005 19:59:37 +0000 (19:59 +0000)]
If the interpreter tries to execute an external function, kill it. Of course
since we are dirty, special case __main. This should fix the infinite loop
horrible stuff that happens on linux-alpha when configuring llvm-gcc. It
might also help cygwin, who knows??
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19729
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 21 Jan 2005 19:46:38 +0000 (19:46 +0000)]
Fix a FIXME: realize that argument stores are all independent (don't alias)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19728
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 21 Jan 2005 18:01:22 +0000 (18:01 +0000)]
Unary token factor nodes are unneeded.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19727
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 21 Jan 2005 06:05:23 +0000 (06:05 +0000)]
Refactor libcall code a bit. Initial implementation of expanding int -> FP
operations for 64-bit integers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19724
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 20 Jan 2005 23:31:35 +0000 (23:31 +0000)]
Apparently destroyFile() now throws an exception. Since this class is
designed to be put on the stack, that's not cool. Catch and ignore the
exception.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19723
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 20 Jan 2005 20:58:42 +0000 (20:58 +0000)]
Remove this test. This test is already in PR269, so it should be
readded when the bug is fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19722
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 20 Jan 2005 20:29:23 +0000 (20:29 +0000)]
Simplify the shift-expansion code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19721
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 20 Jan 2005 18:53:00 +0000 (18:53 +0000)]
Implement ADD_PARTS/SUB_PARTS so that 64-bit integer add/sub work. This
fixes most of the remaining llc-beta failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19716
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 20 Jan 2005 18:52:28 +0000 (18:52 +0000)]
Expand add/sub into ADD_PARTS/SUB_PARTS instead of a non-existant libcall.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19715
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 20 Jan 2005 18:50:55 +0000 (18:50 +0000)]
implement add_parts/sub_parts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19714
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 20 Jan 2005 18:50:39 +0000 (18:50 +0000)]
Eliminate the unimplemented ADDC/SUBB operations, add ADD_PARTS/SUB_PARTS instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19713
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 20 Jan 2005 17:32:28 +0000 (17:32 +0000)]
Add missing entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19712
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 20 Jan 2005 16:50:16 +0000 (16:50 +0000)]
Fix a crash compiling 134.perl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19711
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Thu, 20 Jan 2005 05:19:40 +0000 (05:19 +0000)]
Get analyze to show all analysis options when compiled with VC++
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19710
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Thu, 20 Jan 2005 04:52:59 +0000 (04:52 +0000)]
Add analyze project to Visual Studio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19709
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Thu, 20 Jan 2005 04:41:49 +0000 (04:41 +0000)]
Add project llvm-proj to Visual Studio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19708
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 22:31:21 +0000 (22:31 +0000)]
Support targets that do not use i8 shift amounts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19707
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 21:50:18 +0000 (21:50 +0000)]
Add two optimizations. The first folds (X+Y)-X -> Y
The second folds operations into selects, e.g. (select C, (X+Y), (Y+Z))
-> (Y+(select C, X, Z)
This occurs a few times across spec, e.g.
select add/sub
mesa: 83 0
povray: 5 2
gcc 4 2
parser 0 22
perlbmk 13 30
twolf 0 3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19706
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 21:48:31 +0000 (21:48 +0000)]
Add some new tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19705
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 21:32:07 +0000 (21:32 +0000)]
Add an assertion that would have made more sense to duraid
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19704
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 20:24:35 +0000 (20:24 +0000)]
Add support for targets that pass args in registers to calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19703
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 20:19:58 +0000 (20:19 +0000)]
Add an accessor for targets that pass args in regs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19702
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 19:10:54 +0000 (19:10 +0000)]
Fold single use token factor nodes into other token factor nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19701
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 18:02:17 +0000 (18:02 +0000)]
Realize the individual pieces of an expanded copytoreg/store/load are
independent of each other.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19700
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 18:01:40 +0000 (18:01 +0000)]
Know some identities about tokenfactor nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19699
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 17:29:49 +0000 (17:29 +0000)]
Know some simple identities. This improves codegen for (1LL << N).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19698
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 17:24:34 +0000 (17:24 +0000)]
Fix a problem where were were literally selecting for INCREASED register
pressure, not decreases register pressure. Fix problem where we accidentally
swapped the operands of SHLD, which caused fourinarow to fail. This fixes
fourinarow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19697
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 17:11:51 +0000 (17:11 +0000)]
Just in case, handle something that is both a use and a def.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19696
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 17:09:15 +0000 (17:09 +0000)]
When an instruction moves, make sure to update the VarInfo::Kills list as
well as all of teh other stuff in livevar. This fixes the compiler crash
on fourinarow last night.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19695
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 16:55:52 +0000 (16:55 +0000)]
When commuting these instructions, make sure to actually swap the operands too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19694
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 16:16:35 +0000 (16:16 +0000)]
Fix 'raise' to work with packed types. Patch by Morten Ofstad.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19693
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 08:07:05 +0000 (08:07 +0000)]
Implement Regression/CodeGen/X86/rotate.ll: emit rotate instructions (which
typically cost 1 cycle) instead of shld/shrd instruction (which are typically
6 or more cycles). This also saves code space.
For example, instead of emitting:
rotr:
mov %EAX, DWORD PTR [%ESP + 4]
mov %CL, BYTE PTR [%ESP + 8]
shrd %EAX, %EAX, %CL
ret
rotli:
mov %EAX, DWORD PTR [%ESP + 4]
shrd %EAX, %EAX, 27
ret
Emit:
rotr32:
mov %CL, BYTE PTR [%ESP + 8]
mov %EAX, DWORD PTR [%ESP + 4]
ror %EAX, %CL
ret
rotli32:
mov %EAX, DWORD PTR [%ESP + 4]
ror %EAX, 27
ret
We also emit byte rotate instructions which do not have a sh[lr]d counterpart
at all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19692
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 08:04:08 +0000 (08:04 +0000)]
New testcase for rotate instructions. Each function should codegen to a
rotate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19691
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 07:50:03 +0000 (07:50 +0000)]
Add rotate instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19690
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 07:37:26 +0000 (07:37 +0000)]
Match 16-bit shld/shrd instructions as well, implementing shift-double.llx:test5
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19689
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 07:37:01 +0000 (07:37 +0000)]
Add a test for 16-bit sh*d.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19688
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 07:31:24 +0000 (07:31 +0000)]
Improve coverage of the X86 instruction set by adding 16-bit shift doubles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19687
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 07:11:01 +0000 (07:11 +0000)]
Teach the code generator that shrd/shld is commutable if it has an immediate.
This allows us to generate this:
foo:
mov %EAX, DWORD PTR [%ESP + 4]
mov %EDX, DWORD PTR [%ESP + 8]
shld %EDX, %EDX, 2
shl %EAX, 2
ret
instead of this:
foo:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, DWORD PTR [%ESP + 8]
mov %EDX, %EAX
shrd %EDX, %ECX, 30
shl %EAX, 2
ret
Note the magically transmogrifying immediate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19686
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 07:08:42 +0000 (07:08 +0000)]
Use the TargetInstrInfo::commuteInstruction method to commute instructions
instead of doing it manually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19685
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 06:53:34 +0000 (06:53 +0000)]
Finegrainify namespacification
Add default impl of commuteInstruction
Add notes about ugly V9 code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19684
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Jan 2005 06:53:02 +0000 (06:53 +0000)]
Add a new method, described in the comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19683
91177308-0d34-0410-b5e6-
96231b3b80d8