Chris Lattner
7ceba534ba
rename X86InstrX86-64.td -> X86Instr64bit.td
...
llvm-svn: 45826
2008-01-10 05:50:42 +00:00
Chris Lattner
6ad01a9965
remove explicit sets of 'neverHasSideEffects' that can now be
...
inferred from the instr patterns.
llvm-svn: 45824
2008-01-10 05:45:39 +00:00
Chris Lattner
9b4f2b2316
get def use info more correct.
...
llvm-svn: 45821
2008-01-10 05:12:37 +00:00
Chris Lattner
8e486a6b25
verify that the frame index is immutable before remat'ing (still disabled)
...
or being side-effect free.
llvm-svn: 45816
2008-01-10 04:16:31 +00:00
Evan Cheng
8846740401
Mark byval parameter stack objects mutable for now.
...
llvm-svn: 45813
2008-01-10 02:24:25 +00:00
Dale Johannesen
fdd4b3846f
Emit unused EH frames for weak definitions on Darwin,
...
because assembler/linker can't cope with weak absolutes.
PR 1880.
llvm-svn: 45811
2008-01-10 02:03:30 +00:00
Evan Cheng
f6fd56d085
Do not use the stack pointer directly, issue a copyfromreg instead. Otherwise we can end up with something like ADD32ri %esp, x which two-address pass won't like.
...
llvm-svn: 45798
2008-01-10 00:37:26 +00:00
Evan Cheng
7581a2a634
Remove comments that do not correspond to anything after recent refactoring.
...
llvm-svn: 45792
2008-01-10 00:09:10 +00:00
Chris Lattner
c465555fe6
add a testcase
...
llvm-svn: 45768
2008-01-09 00:37:18 +00:00
Duncan Sands
6f28b87039
Use size_t to store Pos, avoid truncating value
...
on 64-bit builds. Analysis and original patch
by Török Edwin. Code audit found another place
with the same problem, also fixed here.
llvm-svn: 45746
2008-01-08 10:06:15 +00:00
Evan Cheng
e7fd8ad117
Minor fix to enable x86-64 pic jit (still fails for other reasons).
...
llvm-svn: 45734
2008-01-08 02:07:10 +00:00
Evan Cheng
165d39b8e4
Fix a x86-64 static codegen bug. This fixes a lot of x86-64 jit failures.
...
llvm-svn: 45733
2008-01-08 02:06:11 +00:00
Bill Wendling
e859abc363
Silence warning about loss of precision.
...
llvm-svn: 45731
2008-01-08 00:52:29 +00:00
Evan Cheng
ae2f627ea8
Unbreak x86-64.
...
llvm-svn: 45725
2008-01-07 23:08:23 +00:00
Chris Lattner
184daf9101
add a note that is important for some fp apps.
...
llvm-svn: 45723
2008-01-07 21:59:58 +00:00
Duncan Sands
fbbbb24641
Unbreak x86-32 darwin long double!
...
llvm-svn: 45703
2008-01-07 16:36:38 +00:00
Duncan Sands
93959fc16a
Fix long double support on x86-32 linux.
...
llvm-svn: 45701
2008-01-07 13:44:22 +00:00
Bill Wendling
b94c1f2999
Operand 1 should be a register. We don't care if it's a preg, vreg, or 0.
...
llvm-svn: 45699
2008-01-07 08:05:29 +00:00
Chris Lattner
f83aae613c
rename TargetInstrDescriptor -> TargetInstrDesc.
...
Make MachineInstr::getDesc return a reference instead
of a pointer, since it can never be null.
llvm-svn: 45695
2008-01-07 07:27:27 +00:00
Chris Lattner
9b987de2c5
rename hasVariableOperands() -> isVariadic(). Add some comments.
...
Evan, please review the comments I added to getNumDefs to make sure
that they are accurate, thx.
llvm-svn: 45687
2008-01-07 05:19:29 +00:00
Chris Lattner
9d38dfa4a5
Move a bunch more accessors from TargetInstrInfo to TargetInstrDescriptor
...
llvm-svn: 45680
2008-01-07 03:13:06 +00:00
Chris Lattner
55343065e3
remove MachineOpCode typedef.
...
llvm-svn: 45679
2008-01-07 02:48:55 +00:00
Chris Lattner
93e1e6ee12
Add predicates methods to TargetOperandInfo, and switch all clients
...
over to using them, instead of diddling Flags directly. Change the
various flags from const variables to enums.
llvm-svn: 45677
2008-01-07 02:39:19 +00:00
Chris Lattner
f7f96d818f
Rename MachineInstr::getInstrDescriptor -> getDesc(), which reflects
...
that it is cheap and efficient to get.
Move a variety of predicates from TargetInstrInfo into
TargetInstrDescriptor, which makes it much easier to query a predicate
when you don't have TII around. Now you can use MI->getDesc()->isBranch()
instead of going through TII, and this is much more efficient anyway. Not
all of the predicates have been moved over yet.
Update old code that used MI->getInstrDescriptor()->Flags to use the
new predicates in many places.
llvm-svn: 45674
2008-01-07 01:56:04 +00:00
Owen Anderson
f19692b2f6
Move even more functionality from MRegisterInfo into TargetInstrInfo.
...
Some day I'll get it all moved over...
llvm-svn: 45672
2008-01-07 01:35:02 +00:00
Chris Lattner
6b6e6f1f6e
The pic base can't be duplicated.
...
llvm-svn: 45668
2008-01-06 23:49:32 +00:00
Chris Lattner
14310afe42
rename isLoad -> isSimpleLoad due to evan's desire to have such a predicate.
...
llvm-svn: 45667
2008-01-06 23:38:27 +00:00
Bill Wendling
703a1fc174
Fix comment.
...
llvm-svn: 45638
2008-01-05 23:30:51 +00:00
Nate Begeman
ff49dc59ff
Remove an incorrect optimization that is performed correctly by
...
the target independent legalizer.
llvm-svn: 45631
2008-01-05 20:51:30 +00:00
Gordon Henriksen
f4e137838b
Refactoring the x86 and x86-64 calling convention implementations,
...
unifying the copied algorithms and saving over 500 LOC. There should
be no functionality change, but please test on your favorite x86
target.
llvm-svn: 45627
2008-01-05 16:56:59 +00:00
Bill Wendling
ecf0f85985
Chris and Evan noticed that this check was compleatly fubared. I was
...
checking that there was a from a global instead of a load from the stub
for a global, which is the one that's safe to hoist.
Consider this program:
volatile char G[100];
int B(char *F, int N) {
for (; N > 0; --N)
F[N] = G[N];
}
In static mode, we shouldn't be hoisting the load from G:
$ llc -relocation-model=static -o - a.bc -march=x86 -machine-licm
LBB1_1: # bb.preheader
leal -1(%eax), %edx
testl %edx, %edx
movl $1, %edx
cmovns %eax, %edx
xorl %esi, %esi
LBB1_2: # bb
movb _G(%eax), %bl
movb %bl, (%ecx,%eax)
llvm-svn: 45626
2008-01-05 09:18:04 +00:00
Chris Lattner
f1493e7b58
enable sinking and licm of loads from the argument area. I'd like to enable this
...
for remat, but can't due to an RA bug.
llvm-svn: 45623
2008-01-05 06:10:42 +00:00
Chris Lattner
aad6c09a14
simplify some code by using shorter accessors.
...
llvm-svn: 45622
2008-01-05 05:28:30 +00:00
Chris Lattner
6e948ea2e6
revert my previous patch.
...
llvm-svn: 45621
2008-01-05 05:26:26 +00:00
Chris Lattner
86ca5928b5
factor some code better to avoid redundancy between
...
isReallySideEffectFree and isReallyTriviallyReMaterializable. Why is a load from
a global considered side-effect-free but not rematable?
llvm-svn: 45620
2008-01-05 05:19:56 +00:00
Chris Lattner
6ad8e32f6b
getting the pic base has no side effects.
...
llvm-svn: 45618
2008-01-05 03:54:32 +00:00
Evan Cheng
759f389846
X86 JIT PIC jumptable support.
...
llvm-svn: 45616
2008-01-05 02:26:58 +00:00
Evan Cheng
5b9282f3b5
Combine MovePCtoStack + POP32r into one instruction MOVPC32r so it can be moved if needed.
...
llvm-svn: 45605
2008-01-05 00:41:47 +00:00
Owen Anderson
2adf8c5533
Move some more functionality from MRegisterInfo to TargetInstrInfo.
...
llvm-svn: 45603
2008-01-04 23:57:37 +00:00
Evan Cheng
6dbcca7903
Unbreak tailcall opt in JIT.
...
llvm-svn: 45576
2008-01-04 10:50:28 +00:00
Evan Cheng
7322e4dec4
X86 PIC JIT support fixes: encoding bugs, add lazy pointer stubs support.
...
llvm-svn: 45575
2008-01-04 10:46:51 +00:00
Gordon Henriksen
d3af8e0ab3
First steps in in X86 calling convention cleanup.
...
llvm-svn: 45536
2008-01-03 16:47:34 +00:00
Evan Cheng
fb2bc4fc95
Change MachineRelocation::DoesntNeedFnStub to NeedStub. This fields will be used
...
for non-function GV relocations that require function address stubs (e.g. Mac OS X in non-static mode).
llvm-svn: 45527
2008-01-03 02:56:28 +00:00
Evan Cheng
ba1fd9fc76
X86 PIC JIT bug fix: relocations for constantpool and jumptable.
...
llvm-svn: 45515
2008-01-02 23:38:59 +00:00
Bill Wendling
92d8ff0471
Machine LICM will check that operands are defined outside of the loop. Also
...
check that register isn't 0 before going further.
llvm-svn: 45498
2008-01-02 21:10:40 +00:00
Chris Lattner
4a0d9c7836
darwin9 and above support aligned common symbols.
...
llvm-svn: 45494
2008-01-02 19:44:55 +00:00
Owen Anderson
e6856128ab
Move some more instruction creation methods from RegisterInfo into InstrInfo.
...
llvm-svn: 45484
2008-01-01 21:11:32 +00:00
Chris Lattner
04a35e9a8c
Fix a bug in my previous patch: refer to the impl not the pure virtual version. It's unclear why gcc would ever compile this...
...
llvm-svn: 45476
2008-01-01 01:05:34 +00:00
Chris Lattner
1285ec2ae7
Fix a problem where lib/Target/TargetInstrInfo.h would include and use
...
a header file from libcodegen. This violates a layering order: codegen
depends on target, not the other way around. The fix to this is to
split TII into two classes, TII and TargetInstrInfoImpl, which defines
stuff that depends on libcodegen. It is defined in libcodegen, where
the base is not.
llvm-svn: 45475
2008-01-01 01:03:04 +00:00
Owen Anderson
ae7e2c1e03
Move copyRegToReg from MRegisterInfo to TargetInstrInfo. This is part of the
...
Machine-level API cleanup instigated by Chris.
llvm-svn: 45470
2007-12-31 06:32:00 +00:00